Update auto-generated bindings to 0.0.102
[ldk-java] / src / main / java / org / ldk / impl / bindings.java
1 package org.ldk.impl;
2 import org.ldk.enums.*;
3 import org.ldk.impl.version;
4 import java.io.File;
5 import java.io.InputStream;
6 import java.io.IOException;
7 import java.nio.file.Files;
8 import java.nio.file.Path;
9 import java.nio.file.StandardCopyOption;
10
11 public class bindings {
12         public static class VecOrSliceDef {
13                 public long dataptr;
14                 public long datalen;
15                 public long stride;
16                 public VecOrSliceDef(long dataptr, long datalen, long stride) {
17                         this.dataptr = dataptr; this.datalen = datalen; this.stride = stride;
18                 }
19         }
20         static {
21                 try {
22                         // Try to load natively first, this works on Android and in testing.
23                         System.loadLibrary("lightningjni");
24                 } catch (UnsatisfiedLinkError system_load_err) {
25                         // Otherwise try to load from the library jar.
26                         File tmpdir = new File(System.getProperty("java.io.tmpdir"), "ldk-java-nativelib");
27                         tmpdir.mkdir(); // If it fails to create, assume it was there already
28                         tmpdir.deleteOnExit();
29                         String libname = "liblightningjni_" + System.getProperty("os.name").replaceAll(" ", "") +
30                                 "-" + System.getProperty("os.arch").replaceAll(" ", "") + ".nativelib";
31                         try (InputStream is = bindings.class.getResourceAsStream("/" + libname)) {
32                                 Path libpath = new File(tmpdir.toPath().toString(), "liblightningjni.so").toPath();
33                                 Files.copy(is, libpath, StandardCopyOption.REPLACE_EXISTING);
34                                 Runtime.getRuntime().load(libpath.toString());
35                         } catch (Exception e) {
36                                 System.err.println("Failed to load LDK native library.");
37                                 System.err.println("System LDK native library load failed with: " + system_load_err);
38                                 System.err.println("Resource-based LDK native library load failed with: " + e);
39                                 throw new IllegalArgumentException(e);
40                         }
41                 }
42                 init(java.lang.Enum.class, VecOrSliceDef.class);
43                 init_class_cache();
44                 if (!get_lib_version_string().equals(version.get_ldk_java_bindings_version()))
45                         throw new IllegalArgumentException("Compiled LDK library and LDK class failes do not match");
46                 // Fetching the LDK versions from C also checks that the header and binaries match
47                 get_ldk_c_bindings_version();
48                 get_ldk_version();
49         }
50         static native void init(java.lang.Class c, java.lang.Class slicedef);
51         static native void init_class_cache();
52         static native String get_lib_version_string();
53
54         public static native String get_ldk_c_bindings_version();
55         public static native String get_ldk_version();
56
57         public static native boolean deref_bool(long ptr);
58         public static native long deref_long(long ptr);
59         public static native void free_heap_ptr(long ptr);
60         public static native byte[] read_bytes(long ptr, long len);
61         public static native byte[] get_u8_slice_bytes(long slice_ptr);
62         public static native long bytes_to_u8_vec(byte[] bytes);
63         public static native long new_txpointer_copy_data(byte[] txdata);
64         public static native void txpointer_free(long ptr);
65         public static native byte[] txpointer_get_buffer(long ptr);
66         public static native long vec_slice_len(long vec);
67         public static native long new_empty_slice_vec();
68
69         static { AccessError.values(); /* Force enum statics to run */ }
70         static { ChannelMonitorUpdateErr.values(); /* Force enum statics to run */ }
71         static { ConfirmationTarget.values(); /* Force enum statics to run */ }
72         static { CreationError.values(); /* Force enum statics to run */ }
73         static { Currency.values(); /* Force enum statics to run */ }
74         static { IOError.values(); /* Force enum statics to run */ }
75         static { Level.values(); /* Force enum statics to run */ }
76         static { Network.values(); /* Force enum statics to run */ }
77         static { Secp256k1Error.values(); /* Force enum statics to run */ }
78         static { SemanticError.values(); /* Force enum statics to run */ }
79         static { SiPrefix.values(); /* Force enum statics to run */ }
80         public static native long LDKCVec_u8Z_new(byte[] elems);
81         // struct LDKCVec_u8Z TxOut_get_script_pubkey (struct LDKTxOut* thing)
82         public static native byte[] TxOut_get_script_pubkey(long thing);
83         // uint64_t TxOut_get_value (struct LDKTxOut* thing)
84         public static native long TxOut_get_value(long thing);
85         public static native boolean LDKCResult_SecretKeyErrorZ_result_ok(long arg);
86         public static native byte[] LDKCResult_SecretKeyErrorZ_get_ok(long arg);
87         public static native Secp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
88         public static native boolean LDKCResult_PublicKeyErrorZ_result_ok(long arg);
89         public static native byte[] LDKCResult_PublicKeyErrorZ_get_ok(long arg);
90         public static native Secp256k1Error LDKCResult_PublicKeyErrorZ_get_err(long arg);
91         public static native boolean LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(long arg);
92         public static native long LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(long arg);
93         public static native long LDKCResult_TxCreationKeysDecodeErrorZ_get_err(long arg);
94         public static native boolean LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(long arg);
95         public static native long LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(long arg);
96         public static native long LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(long arg);
97         public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
98         public static native long LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
99         public static native Secp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
100         public static class LDKCOption_u32Z {
101                 private LDKCOption_u32Z() {}
102                 public final static class Some extends LDKCOption_u32Z {
103                         public int some;
104                         Some(int some) { this.some = some; }
105                 }
106                 public final static class None extends LDKCOption_u32Z {
107                         None() { }
108                 }
109                 static native void init();
110         }
111         static { LDKCOption_u32Z.init(); }
112         public static native LDKCOption_u32Z LDKCOption_u32Z_ref_from_ptr(long ptr);
113         public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
114         public static native long LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
115         public static native long LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
116         public static native boolean LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
117         public static native long LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
118         public static native long LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
119         public static native boolean LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
120         public static native long LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
121         public static native long LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
122         public static native boolean LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(long arg);
123         public static native long LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long arg);
124         public static native long LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long arg);
125         public static native boolean LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(long arg);
126         public static native long LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
127         public static native long LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
128         public static native boolean LDKCResult_TrustedClosingTransactionNoneZ_result_ok(long arg);
129         public static native long LDKCResult_TrustedClosingTransactionNoneZ_get_ok(long arg);
130         public static native void LDKCResult_TrustedClosingTransactionNoneZ_get_err(long arg);
131         public static native boolean LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(long arg);
132         public static native long LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(long arg);
133         public static native long LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(long arg);
134         public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
135         public static native long LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
136         public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
137         public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
138         public static native byte[][] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
139         public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
140         public static native boolean LDKCResult_ShutdownScriptDecodeErrorZ_result_ok(long arg);
141         public static native long LDKCResult_ShutdownScriptDecodeErrorZ_get_ok(long arg);
142         public static native long LDKCResult_ShutdownScriptDecodeErrorZ_get_err(long arg);
143         public static native boolean LDKCResult_ShutdownScriptInvalidShutdownScriptZ_result_ok(long arg);
144         public static native long LDKCResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(long arg);
145         public static native long LDKCResult_ShutdownScriptInvalidShutdownScriptZ_get_err(long arg);
146         public static native boolean LDKCResult_NoneErrorZ_result_ok(long arg);
147         public static native void LDKCResult_NoneErrorZ_get_ok(long arg);
148         public static native IOError LDKCResult_NoneErrorZ_get_err(long arg);
149         public static native boolean LDKCResult_RouteHopDecodeErrorZ_result_ok(long arg);
150         public static native long LDKCResult_RouteHopDecodeErrorZ_get_ok(long arg);
151         public static native long LDKCResult_RouteHopDecodeErrorZ_get_err(long arg);
152         public static native long LDKCVec_RouteHopZ_new(long[] elems);
153         public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
154         public static native long LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
155         public static native long LDKCResult_RouteDecodeErrorZ_get_err(long arg);
156         public static class LDKCOption_u64Z {
157                 private LDKCOption_u64Z() {}
158                 public final static class Some extends LDKCOption_u64Z {
159                         public long some;
160                         Some(long some) { this.some = some; }
161                 }
162                 public final static class None extends LDKCOption_u64Z {
163                         None() { }
164                 }
165                 static native void init();
166         }
167         static { LDKCOption_u64Z.init(); }
168         public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
169         public static native long LDKCVec_ChannelDetailsZ_new(long[] elems);
170         public static native long LDKCVec_RouteHintZ_new(long[] elems);
171         public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
172         public static native long LDKCResult_RouteLightningErrorZ_get_ok(long arg);
173         public static native long LDKCResult_RouteLightningErrorZ_get_err(long arg);
174         public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
175         public static native long LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
176         public static native AccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
177         public static native long LDKC2Tuple_usizeTransactionZ_new(long a, byte[] b);
178         // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
179         public static native long C2Tuple_usizeTransactionZ_get_a(long tuple);
180         // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
181         public static native byte[] C2Tuple_usizeTransactionZ_get_b(long tuple);
182         public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(long[] elems);
183         public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
184         public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
185         public static native ChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
186         public static class LDKMonitorEvent {
187                 private LDKMonitorEvent() {}
188                 public final static class HTLCEvent extends LDKMonitorEvent {
189                         public long htlc_event;
190                         HTLCEvent(long htlc_event) { this.htlc_event = htlc_event; }
191                 }
192                 public final static class CommitmentTxConfirmed extends LDKMonitorEvent {
193                         public long commitment_tx_confirmed;
194                         CommitmentTxConfirmed(long commitment_tx_confirmed) { this.commitment_tx_confirmed = commitment_tx_confirmed; }
195                 }
196                 static native void init();
197         }
198         static { LDKMonitorEvent.init(); }
199         public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
200         public static native long LDKCVec_MonitorEventZ_new(long[] elems);
201         public static class LDKCOption_C2Tuple_usizeTransactionZZ {
202                 private LDKCOption_C2Tuple_usizeTransactionZZ() {}
203                 public final static class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
204                         public long some;
205                         Some(long some) { this.some = some; }
206                 }
207                 public final static class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
208                         None() { }
209                 }
210                 static native void init();
211         }
212         static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
213         public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
214         public static class LDKNetworkUpdate {
215                 private LDKNetworkUpdate() {}
216                 public final static class ChannelUpdateMessage extends LDKNetworkUpdate {
217                         public long msg;
218                         ChannelUpdateMessage(long msg) { this.msg = msg; }
219                 }
220                 public final static class ChannelClosed extends LDKNetworkUpdate {
221                         public long short_channel_id;
222                         public boolean is_permanent;
223                         ChannelClosed(long short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
224                 }
225                 public final static class NodeFailure extends LDKNetworkUpdate {
226                         public byte[] node_id;
227                         public boolean is_permanent;
228                         NodeFailure(byte[] node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
229                 }
230                 static native void init();
231         }
232         static { LDKNetworkUpdate.init(); }
233         public static native LDKNetworkUpdate LDKNetworkUpdate_ref_from_ptr(long ptr);
234         public static class LDKCOption_NetworkUpdateZ {
235                 private LDKCOption_NetworkUpdateZ() {}
236                 public final static class Some extends LDKCOption_NetworkUpdateZ {
237                         public long some;
238                         Some(long some) { this.some = some; }
239                 }
240                 public final static class None extends LDKCOption_NetworkUpdateZ {
241                         None() { }
242                 }
243                 static native void init();
244         }
245         static { LDKCOption_NetworkUpdateZ.init(); }
246         public static native LDKCOption_NetworkUpdateZ LDKCOption_NetworkUpdateZ_ref_from_ptr(long ptr);
247         public static class LDKSpendableOutputDescriptor {
248                 private LDKSpendableOutputDescriptor() {}
249                 public final static class StaticOutput extends LDKSpendableOutputDescriptor {
250                         public long outpoint;
251                         public long output;
252                         StaticOutput(long outpoint, long output) { this.outpoint = outpoint; this.output = output; }
253                 }
254                 public final static class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
255                         public long delayed_payment_output;
256                         DelayedPaymentOutput(long delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
257                 }
258                 public final static class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
259                         public long static_payment_output;
260                         StaticPaymentOutput(long static_payment_output) { this.static_payment_output = static_payment_output; }
261                 }
262                 static native void init();
263         }
264         static { LDKSpendableOutputDescriptor.init(); }
265         public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
266         public static native long LDKCVec_SpendableOutputDescriptorZ_new(long[] elems);
267         public static class LDKErrorAction {
268                 private LDKErrorAction() {}
269                 public final static class DisconnectPeer extends LDKErrorAction {
270                         public long msg;
271                         DisconnectPeer(long msg) { this.msg = msg; }
272                 }
273                 public final static class IgnoreError extends LDKErrorAction {
274                         IgnoreError() { }
275                 }
276                 public final static class IgnoreAndLog extends LDKErrorAction {
277                         public Level ignore_and_log;
278                         IgnoreAndLog(Level ignore_and_log) { this.ignore_and_log = ignore_and_log; }
279                 }
280                 public final static class SendErrorMessage extends LDKErrorAction {
281                         public long msg;
282                         SendErrorMessage(long msg) { this.msg = msg; }
283                 }
284                 static native void init();
285         }
286         static { LDKErrorAction.init(); }
287         public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
288         public static class LDKMessageSendEvent {
289                 private LDKMessageSendEvent() {}
290                 public final static class SendAcceptChannel extends LDKMessageSendEvent {
291                         public byte[] node_id;
292                         public long msg;
293                         SendAcceptChannel(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
294                 }
295                 public final static class SendOpenChannel extends LDKMessageSendEvent {
296                         public byte[] node_id;
297                         public long msg;
298                         SendOpenChannel(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
299                 }
300                 public final static class SendFundingCreated extends LDKMessageSendEvent {
301                         public byte[] node_id;
302                         public long msg;
303                         SendFundingCreated(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
304                 }
305                 public final static class SendFundingSigned extends LDKMessageSendEvent {
306                         public byte[] node_id;
307                         public long msg;
308                         SendFundingSigned(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
309                 }
310                 public final static class SendFundingLocked extends LDKMessageSendEvent {
311                         public byte[] node_id;
312                         public long msg;
313                         SendFundingLocked(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
314                 }
315                 public final static class SendAnnouncementSignatures extends LDKMessageSendEvent {
316                         public byte[] node_id;
317                         public long msg;
318                         SendAnnouncementSignatures(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
319                 }
320                 public final static class UpdateHTLCs extends LDKMessageSendEvent {
321                         public byte[] node_id;
322                         public long updates;
323                         UpdateHTLCs(byte[] node_id, long updates) { this.node_id = node_id; this.updates = updates; }
324                 }
325                 public final static class SendRevokeAndACK extends LDKMessageSendEvent {
326                         public byte[] node_id;
327                         public long msg;
328                         SendRevokeAndACK(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
329                 }
330                 public final static class SendClosingSigned extends LDKMessageSendEvent {
331                         public byte[] node_id;
332                         public long msg;
333                         SendClosingSigned(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
334                 }
335                 public final static class SendShutdown extends LDKMessageSendEvent {
336                         public byte[] node_id;
337                         public long msg;
338                         SendShutdown(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
339                 }
340                 public final static class SendChannelReestablish extends LDKMessageSendEvent {
341                         public byte[] node_id;
342                         public long msg;
343                         SendChannelReestablish(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
344                 }
345                 public final static class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
346                         public long msg;
347                         public long update_msg;
348                         BroadcastChannelAnnouncement(long msg, long update_msg) { this.msg = msg; this.update_msg = update_msg; }
349                 }
350                 public final static class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
351                         public long msg;
352                         BroadcastNodeAnnouncement(long msg) { this.msg = msg; }
353                 }
354                 public final static class BroadcastChannelUpdate extends LDKMessageSendEvent {
355                         public long msg;
356                         BroadcastChannelUpdate(long msg) { this.msg = msg; }
357                 }
358                 public final static class SendChannelUpdate extends LDKMessageSendEvent {
359                         public byte[] node_id;
360                         public long msg;
361                         SendChannelUpdate(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
362                 }
363                 public final static class HandleError extends LDKMessageSendEvent {
364                         public byte[] node_id;
365                         public long action;
366                         HandleError(byte[] node_id, long action) { this.node_id = node_id; this.action = action; }
367                 }
368                 public final static class SendChannelRangeQuery extends LDKMessageSendEvent {
369                         public byte[] node_id;
370                         public long msg;
371                         SendChannelRangeQuery(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
372                 }
373                 public final static class SendShortIdsQuery extends LDKMessageSendEvent {
374                         public byte[] node_id;
375                         public long msg;
376                         SendShortIdsQuery(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
377                 }
378                 public final static class SendReplyChannelRange extends LDKMessageSendEvent {
379                         public byte[] node_id;
380                         public long msg;
381                         SendReplyChannelRange(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
382                 }
383                 static native void init();
384         }
385         static { LDKMessageSendEvent.init(); }
386         public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
387         public static native long LDKCVec_MessageSendEventZ_new(long[] elems);
388         public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
389         public static native long LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
390         public static native long LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
391         public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
392         public static native long LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
393         public static native long LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
394         public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
395         public static native long LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
396         public static native long LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
397         public static native boolean LDKCResult_InvoiceFeaturesDecodeErrorZ_result_ok(long arg);
398         public static native long LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
399         public static native long LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
400         public static native boolean LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
401         public static native long LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
402         public static native long LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
403         public static native boolean LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
404         public static native long LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
405         public static native long LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
406         public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
407         public static native long LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
408         public static native long LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
409         public static native boolean LDKCResult_NoneNoneZ_result_ok(long arg);
410         public static native void LDKCResult_NoneNoneZ_get_ok(long arg);
411         public static native void LDKCResult_NoneNoneZ_get_err(long arg);
412         public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(byte[] a, byte[][] b);
413         // struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
414         public static native byte[] C2Tuple_SignatureCVec_SignatureZZ_get_a(long tuple);
415         // struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
416         public static native byte[][] C2Tuple_SignatureCVec_SignatureZZ_get_b(long tuple);
417         public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
418         public static native long LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
419         public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
420         public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
421         public static native byte[] LDKCResult_SignatureNoneZ_get_ok(long arg);
422         public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
423         public interface LDKBaseSign {
424                  byte[] get_per_commitment_point(long idx);
425                  byte[] release_commitment_secret(long idx);
426                  long validate_holder_commitment(long holder_tx);
427                  byte[] channel_keys_id();
428                  long sign_counterparty_commitment(long commitment_tx);
429                  long validate_counterparty_revocation(long idx, byte[] secret);
430                  long sign_holder_commitment_and_htlcs(long commitment_tx);
431                  long sign_justice_revoked_output(byte[] justice_tx, long input, long amount, byte[] per_commitment_key);
432                  long sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
433                  long sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc);
434                  long sign_closing_transaction(long closing_tx);
435                  long sign_channel_announcement(long msg);
436                  void ready_channel(long channel_parameters);
437         }
438         public static native long LDKBaseSign_new(LDKBaseSign impl, long pubkeys);
439         // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
440         public static native byte[] BaseSign_get_per_commitment_point(long this_arg, long idx);
441         // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
442         public static native byte[] BaseSign_release_commitment_secret(long this_arg, long idx);
443         // LDKCResult_NoneNoneZ BaseSign_validate_holder_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR holder_tx
444         public static native long BaseSign_validate_holder_commitment(long this_arg, long holder_tx);
445         // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
446         public static native byte[] BaseSign_channel_keys_id(long this_arg);
447         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
448         public static native long BaseSign_sign_counterparty_commitment(long this_arg, long commitment_tx);
449         // LDKCResult_NoneNoneZ BaseSign_validate_counterparty_revocation LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx, const uint8_t (*secret)[32]
450         public static native long BaseSign_validate_counterparty_revocation(long this_arg, long idx, byte[] secret);
451         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
452         public static native long BaseSign_sign_holder_commitment_and_htlcs(long this_arg, long commitment_tx);
453         // LDKCResult_SignatureNoneZ BaseSign_sign_justice_revoked_output LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32]
454         public static native long BaseSign_sign_justice_revoked_output(long this_arg, byte[] justice_tx, long input, long amount, byte[] per_commitment_key);
455         // LDKCResult_SignatureNoneZ BaseSign_sign_justice_revoked_htlc LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
456         public static native long BaseSign_sign_justice_revoked_htlc(long this_arg, byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
457         // LDKCResult_SignatureNoneZ BaseSign_sign_counterparty_htlc_transaction LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
458         public static native long BaseSign_sign_counterparty_htlc_transaction(long this_arg, byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc);
459         // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, const struct LDKClosingTransaction *NONNULL_PTR closing_tx
460         public static native long BaseSign_sign_closing_transaction(long this_arg, long closing_tx);
461         // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
462         public static native long BaseSign_sign_channel_announcement(long this_arg, long msg);
463         // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
464         public static native void BaseSign_ready_channel(long this_arg, long channel_parameters);
465         // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
466         public static native long BaseSign_get_pubkeys(long this_arg);
467         public interface LDKSign {
468                  byte[] write();
469         }
470         public static native long LDKSign_new(LDKSign impl, LDKBaseSign BaseSign, long pubkeys);
471         public static native long LDKSign_get_BaseSign(long arg);
472         // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
473         public static native byte[] Sign_write(long this_arg);
474         public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
475         public static native long LDKCResult_SignDecodeErrorZ_get_ok(long arg);
476         public static native long LDKCResult_SignDecodeErrorZ_get_err(long arg);
477         public static native boolean LDKCResult_RecoverableSignatureNoneZ_result_ok(long arg);
478         public static native byte[] LDKCResult_RecoverableSignatureNoneZ_get_ok(long arg);
479         public static native void LDKCResult_RecoverableSignatureNoneZ_get_err(long arg);
480         public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
481         public static native byte[][] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
482         public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
483         public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
484         public static native long LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
485         public static native long LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
486         public static native long LDKCVec_TxOutZ_new(long[] elems);
487         public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
488         public static native byte[] LDKCResult_TransactionNoneZ_get_ok(long arg);
489         public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
490         public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(byte[] a, long b);
491         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
492         public static native byte[] C2Tuple_BlockHashChannelMonitorZ_get_a(long tuple);
493         // struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
494         public static native long C2Tuple_BlockHashChannelMonitorZ_get_b(long tuple);
495         public static native long LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(long[] elems);
496         public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
497         public static native long[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
498         public static native IOError LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_err(long arg);
499         public static native boolean LDKCResult_PaymentIdDecodeErrorZ_result_ok(long arg);
500         public static native long LDKCResult_PaymentIdDecodeErrorZ_get_ok(long arg);
501         public static native long LDKCResult_PaymentIdDecodeErrorZ_get_err(long arg);
502         public static class LDKCOption_u16Z {
503                 private LDKCOption_u16Z() {}
504                 public final static class Some extends LDKCOption_u16Z {
505                         public short some;
506                         Some(short some) { this.some = some; }
507                 }
508                 public final static class None extends LDKCOption_u16Z {
509                         None() { }
510                 }
511                 static native void init();
512         }
513         static { LDKCOption_u16Z.init(); }
514         public static native LDKCOption_u16Z LDKCOption_u16Z_ref_from_ptr(long ptr);
515         public static class LDKAPIError {
516                 private LDKAPIError() {}
517                 public final static class APIMisuseError extends LDKAPIError {
518                         public String err;
519                         APIMisuseError(String err) { this.err = err; }
520                 }
521                 public final static class FeeRateTooHigh extends LDKAPIError {
522                         public String err;
523                         public int feerate;
524                         FeeRateTooHigh(String err, int feerate) { this.err = err; this.feerate = feerate; }
525                 }
526                 public final static class RouteError extends LDKAPIError {
527                         public String err;
528                         RouteError(String err) { this.err = err; }
529                 }
530                 public final static class ChannelUnavailable extends LDKAPIError {
531                         public String err;
532                         ChannelUnavailable(String err) { this.err = err; }
533                 }
534                 public final static class MonitorUpdateFailed extends LDKAPIError {
535                         MonitorUpdateFailed() { }
536                 }
537                 public final static class IncompatibleShutdownScript extends LDKAPIError {
538                         public long script;
539                         IncompatibleShutdownScript(long script) { this.script = script; }
540                 }
541                 static native void init();
542         }
543         static { LDKAPIError.init(); }
544         public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
545         public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
546         public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
547         public static native long LDKCResult_NoneAPIErrorZ_get_err(long arg);
548         public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(long[] elems);
549         public static native long LDKCVec_APIErrorZ_new(long[] elems);
550         public static native boolean LDKCResult__u832APIErrorZ_result_ok(long arg);
551         public static native byte[] LDKCResult__u832APIErrorZ_get_ok(long arg);
552         public static native long LDKCResult__u832APIErrorZ_get_err(long arg);
553         public static class LDKPaymentSendFailure {
554                 private LDKPaymentSendFailure() {}
555                 public final static class ParameterError extends LDKPaymentSendFailure {
556                         public long parameter_error;
557                         ParameterError(long parameter_error) { this.parameter_error = parameter_error; }
558                 }
559                 public final static class PathParameterError extends LDKPaymentSendFailure {
560                         public long[] path_parameter_error;
561                         PathParameterError(long[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
562                 }
563                 public final static class AllFailedRetrySafe extends LDKPaymentSendFailure {
564                         public long[] all_failed_retry_safe;
565                         AllFailedRetrySafe(long[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
566                 }
567                 public final static class PartialFailure extends LDKPaymentSendFailure {
568                         public long[] partial_failure;
569                         PartialFailure(long[] partial_failure) { this.partial_failure = partial_failure; }
570                 }
571                 static native void init();
572         }
573         static { LDKPaymentSendFailure.init(); }
574         public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
575         public static native boolean LDKCResult_PaymentIdPaymentSendFailureZ_result_ok(long arg);
576         public static native long LDKCResult_PaymentIdPaymentSendFailureZ_get_ok(long arg);
577         public static native long LDKCResult_PaymentIdPaymentSendFailureZ_get_err(long arg);
578         public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
579         public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
580         public static native long LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
581         public static native long LDKC2Tuple_PaymentHashPaymentIdZ_new(byte[] a, long b);
582         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_a(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR tuple);
583         public static native byte[] C2Tuple_PaymentHashPaymentIdZ_get_a(long tuple);
584         // struct LDKPaymentId C2Tuple_PaymentHashPaymentIdZ_get_b(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR tuple);
585         public static native long C2Tuple_PaymentHashPaymentIdZ_get_b(long tuple);
586         public static native boolean LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_result_ok(long arg);
587         public static native long LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(long arg);
588         public static native long LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(long arg);
589         public static class LDKNetAddress {
590                 private LDKNetAddress() {}
591                 public final static class IPv4 extends LDKNetAddress {
592                         public byte[] addr;
593                         public short port;
594                         IPv4(byte[] addr, short port) { this.addr = addr; this.port = port; }
595                 }
596                 public final static class IPv6 extends LDKNetAddress {
597                         public byte[] addr;
598                         public short port;
599                         IPv6(byte[] addr, short port) { this.addr = addr; this.port = port; }
600                 }
601                 public final static class OnionV2 extends LDKNetAddress {
602                         public byte[] addr;
603                         public short port;
604                         OnionV2(byte[] addr, short port) { this.addr = addr; this.port = port; }
605                 }
606                 public final static class OnionV3 extends LDKNetAddress {
607                         public byte[] ed25519_pubkey;
608                         public short checksum;
609                         public byte version;
610                         public short port;
611                         OnionV3(byte[] ed25519_pubkey, short checksum, byte version, short port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
612                 }
613                 static native void init();
614         }
615         static { LDKNetAddress.init(); }
616         public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
617         public static native long LDKCVec_NetAddressZ_new(long[] elems);
618         public static native long LDKC2Tuple_PaymentHashPaymentSecretZ_new(byte[] a, byte[] b);
619         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
620         public static native byte[] C2Tuple_PaymentHashPaymentSecretZ_get_a(long tuple);
621         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
622         public static native byte[] C2Tuple_PaymentHashPaymentSecretZ_get_b(long tuple);
623         public static native boolean LDKCResult_PaymentSecretAPIErrorZ_result_ok(long arg);
624         public static native byte[] LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
625         public static native long LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
626         public static native long LDKCVec_ChannelMonitorZ_new(long[] elems);
627         public interface LDKWatch {
628                  long watch_channel(long funding_txo, long monitor);
629                  long update_channel(long funding_txo, long update);
630                  long[] release_pending_monitor_events();
631         }
632         public static native long LDKWatch_new(LDKWatch impl);
633         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
634         public static native long Watch_watch_channel(long this_arg, long funding_txo, long monitor);
635         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
636         public static native long Watch_update_channel(long this_arg, long funding_txo, long update);
637         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
638         public static native long[] Watch_release_pending_monitor_events(long this_arg);
639         public interface LDKBroadcasterInterface {
640                  void broadcast_transaction(byte[] tx);
641         }
642         public static native long LDKBroadcasterInterface_new(LDKBroadcasterInterface impl);
643         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
644         public static native void BroadcasterInterface_broadcast_transaction(long this_arg, byte[] tx);
645         public interface LDKKeysInterface {
646                  byte[] get_node_secret();
647                  byte[] get_destination_script();
648                  long get_shutdown_scriptpubkey();
649                  long get_channel_signer(boolean inbound, long channel_value_satoshis);
650                  byte[] get_secure_random_bytes();
651                  long read_chan_signer(byte[] reader);
652                  long sign_invoice(byte[] invoice_preimage);
653         }
654         public static native long LDKKeysInterface_new(LDKKeysInterface impl);
655         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
656         public static native byte[] KeysInterface_get_node_secret(long this_arg);
657         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
658         public static native byte[] KeysInterface_get_destination_script(long this_arg);
659         // LDKShutdownScript KeysInterface_get_shutdown_scriptpubkey LDKKeysInterface *NONNULL_PTR this_arg
660         public static native long KeysInterface_get_shutdown_scriptpubkey(long this_arg);
661         // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
662         public static native long KeysInterface_get_channel_signer(long this_arg, boolean inbound, long channel_value_satoshis);
663         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
664         public static native byte[] KeysInterface_get_secure_random_bytes(long this_arg);
665         // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
666         public static native long KeysInterface_read_chan_signer(long this_arg, byte[] reader);
667         // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
668         public static native long KeysInterface_sign_invoice(long this_arg, byte[] invoice_preimage);
669         public interface LDKFeeEstimator {
670                  int get_est_sat_per_1000_weight(ConfirmationTarget confirmation_target);
671         }
672         public static native long LDKFeeEstimator_new(LDKFeeEstimator impl);
673         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
674         public static native int FeeEstimator_get_est_sat_per_1000_weight(long this_arg, ConfirmationTarget confirmation_target);
675         public interface LDKLogger {
676                  void log(String record);
677         }
678         public static native long LDKLogger_new(LDKLogger impl);
679         public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(byte[] a, long b);
680         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
681         public static native byte[] C2Tuple_BlockHashChannelManagerZ_get_a(long tuple);
682         // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
683         public static native long C2Tuple_BlockHashChannelManagerZ_get_b(long tuple);
684         public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
685         public static native long LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
686         public static native long LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
687         public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
688         public static native long LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
689         public static native long LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
690         public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
691         public static native long LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
692         public static native long LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
693         public interface LDKType {
694                  short type_id();
695                  String debug_str();
696                  byte[] write();
697         }
698         public static native long LDKType_new(LDKType impl);
699         // uint16_t Type_type_id LDKType *NONNULL_PTR this_arg
700         public static native short Type_type_id(long this_arg);
701         // LDKStr Type_debug_str LDKType *NONNULL_PTR this_arg
702         public static native String Type_debug_str(long this_arg);
703         // LDKCVec_u8Z Type_write LDKType *NONNULL_PTR this_arg
704         public static native byte[] Type_write(long this_arg);
705         public static class LDKCOption_TypeZ {
706                 private LDKCOption_TypeZ() {}
707                 public final static class Some extends LDKCOption_TypeZ {
708                         public long some;
709                         Some(long some) { this.some = some; }
710                 }
711                 public final static class None extends LDKCOption_TypeZ {
712                         None() { }
713                 }
714                 static native void init();
715         }
716         static { LDKCOption_TypeZ.init(); }
717         public static native LDKCOption_TypeZ LDKCOption_TypeZ_ref_from_ptr(long ptr);
718         public static native boolean LDKCResult_COption_TypeZDecodeErrorZ_result_ok(long arg);
719         public static native long LDKCResult_COption_TypeZDecodeErrorZ_get_ok(long arg);
720         public static native long LDKCResult_COption_TypeZDecodeErrorZ_get_err(long arg);
721         public static native boolean LDKCResult_SiPrefixNoneZ_result_ok(long arg);
722         public static native SiPrefix LDKCResult_SiPrefixNoneZ_get_ok(long arg);
723         public static native void LDKCResult_SiPrefixNoneZ_get_err(long arg);
724         public static native boolean LDKCResult_InvoiceNoneZ_result_ok(long arg);
725         public static native long LDKCResult_InvoiceNoneZ_get_ok(long arg);
726         public static native void LDKCResult_InvoiceNoneZ_get_err(long arg);
727         public static native boolean LDKCResult_SignedRawInvoiceNoneZ_result_ok(long arg);
728         public static native long LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
729         public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
730         public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_new(long a, byte[] b, long c);
731         // struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
732         public static native long C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(long tuple);
733         // struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
734         public static native byte[] C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(long tuple);
735         // struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
736         public static native long C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(long tuple);
737         public static native boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
738         public static native long LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
739         public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
740         public static native long LDKCVec_PrivateRouteZ_new(long[] elems);
741         public static native boolean LDKCResult_PositiveTimestampCreationErrorZ_result_ok(long arg);
742         public static native long LDKCResult_PositiveTimestampCreationErrorZ_get_ok(long arg);
743         public static native CreationError LDKCResult_PositiveTimestampCreationErrorZ_get_err(long arg);
744         public static native boolean LDKCResult_NoneSemanticErrorZ_result_ok(long arg);
745         public static native void LDKCResult_NoneSemanticErrorZ_get_ok(long arg);
746         public static native SemanticError LDKCResult_NoneSemanticErrorZ_get_err(long arg);
747         public static native boolean LDKCResult_InvoiceSemanticErrorZ_result_ok(long arg);
748         public static native long LDKCResult_InvoiceSemanticErrorZ_get_ok(long arg);
749         public static native SemanticError LDKCResult_InvoiceSemanticErrorZ_get_err(long arg);
750         public static native boolean LDKCResult_DescriptionCreationErrorZ_result_ok(long arg);
751         public static native long LDKCResult_DescriptionCreationErrorZ_get_ok(long arg);
752         public static native CreationError LDKCResult_DescriptionCreationErrorZ_get_err(long arg);
753         public static native boolean LDKCResult_ExpiryTimeCreationErrorZ_result_ok(long arg);
754         public static native long LDKCResult_ExpiryTimeCreationErrorZ_get_ok(long arg);
755         public static native CreationError LDKCResult_ExpiryTimeCreationErrorZ_get_err(long arg);
756         public static native boolean LDKCResult_PrivateRouteCreationErrorZ_result_ok(long arg);
757         public static native long LDKCResult_PrivateRouteCreationErrorZ_get_ok(long arg);
758         public static native CreationError LDKCResult_PrivateRouteCreationErrorZ_get_err(long arg);
759         public static native boolean LDKCResult_StringErrorZ_result_ok(long arg);
760         public static native String LDKCResult_StringErrorZ_get_ok(long arg);
761         public static native Secp256k1Error LDKCResult_StringErrorZ_get_err(long arg);
762         public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
763         public static native long LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
764         public static native long LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
765         public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
766         public static native long LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
767         public static native long LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
768         public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
769         public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
770         public static native long LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
771         public static native long LDKC2Tuple_OutPointScriptZ_new(long a, byte[] b);
772         // struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
773         public static native long C2Tuple_OutPointScriptZ_get_a(long tuple);
774         // struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
775         public static native byte[] C2Tuple_OutPointScriptZ_get_b(long tuple);
776         public static native long LDKC2Tuple_u32ScriptZ_new(int a, byte[] b);
777         // uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
778         public static native int C2Tuple_u32ScriptZ_get_a(long tuple);
779         // struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
780         public static native byte[] C2Tuple_u32ScriptZ_get_b(long tuple);
781         public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(long[] elems);
782         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(byte[] a, long[] b);
783         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
784         public static native byte[] C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long tuple);
785         // struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
786         public static native long[] C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long tuple);
787         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(long[] elems);
788         public static class LDKPaymentPurpose {
789                 private LDKPaymentPurpose() {}
790                 public final static class InvoicePayment extends LDKPaymentPurpose {
791                         public byte[] payment_preimage;
792                         public byte[] payment_secret;
793                         public long user_payment_id;
794                         InvoicePayment(byte[] payment_preimage, byte[] payment_secret, long user_payment_id) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; this.user_payment_id = user_payment_id; }
795                 }
796                 public final static class SpontaneousPayment extends LDKPaymentPurpose {
797                         public byte[] spontaneous_payment;
798                         SpontaneousPayment(byte[] spontaneous_payment) { this.spontaneous_payment = spontaneous_payment; }
799                 }
800                 static native void init();
801         }
802         static { LDKPaymentPurpose.init(); }
803         public static native LDKPaymentPurpose LDKPaymentPurpose_ref_from_ptr(long ptr);
804         public static class LDKClosureReason {
805                 private LDKClosureReason() {}
806                 public final static class CounterpartyForceClosed extends LDKClosureReason {
807                         public String peer_msg;
808                         CounterpartyForceClosed(String peer_msg) { this.peer_msg = peer_msg; }
809                 }
810                 public final static class HolderForceClosed extends LDKClosureReason {
811                         HolderForceClosed() { }
812                 }
813                 public final static class CooperativeClosure extends LDKClosureReason {
814                         CooperativeClosure() { }
815                 }
816                 public final static class CommitmentTxConfirmed extends LDKClosureReason {
817                         CommitmentTxConfirmed() { }
818                 }
819                 public final static class ProcessingError extends LDKClosureReason {
820                         public String err;
821                         ProcessingError(String err) { this.err = err; }
822                 }
823                 public final static class DisconnectedPeer extends LDKClosureReason {
824                         DisconnectedPeer() { }
825                 }
826                 public final static class OutdatedChannelManager extends LDKClosureReason {
827                         OutdatedChannelManager() { }
828                 }
829                 static native void init();
830         }
831         static { LDKClosureReason.init(); }
832         public static native LDKClosureReason LDKClosureReason_ref_from_ptr(long ptr);
833         public static class LDKEvent {
834                 private LDKEvent() {}
835                 public final static class FundingGenerationReady extends LDKEvent {
836                         public byte[] temporary_channel_id;
837                         public long channel_value_satoshis;
838                         public byte[] output_script;
839                         public long user_channel_id;
840                         FundingGenerationReady(byte[] temporary_channel_id, long channel_value_satoshis, byte[] output_script, long user_channel_id) { this.temporary_channel_id = temporary_channel_id; this.channel_value_satoshis = channel_value_satoshis; this.output_script = output_script; this.user_channel_id = user_channel_id; }
841                 }
842                 public final static class PaymentReceived extends LDKEvent {
843                         public byte[] payment_hash;
844                         public long amt;
845                         public long purpose;
846                         PaymentReceived(byte[] payment_hash, long amt, long purpose) { this.payment_hash = payment_hash; this.amt = amt; this.purpose = purpose; }
847                 }
848                 public final static class PaymentSent extends LDKEvent {
849                         public byte[] payment_preimage;
850                         public byte[] payment_hash;
851                         PaymentSent(byte[] payment_preimage, byte[] payment_hash) { this.payment_preimage = payment_preimage; this.payment_hash = payment_hash; }
852                 }
853                 public final static class PaymentPathFailed extends LDKEvent {
854                         public byte[] payment_hash;
855                         public boolean rejected_by_dest;
856                         public long network_update;
857                         public boolean all_paths_failed;
858                         public long[] path;
859                         public long short_channel_id;
860                         PaymentPathFailed(byte[] payment_hash, boolean rejected_by_dest, long network_update, boolean all_paths_failed, long[] path, long short_channel_id) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; this.network_update = network_update; this.all_paths_failed = all_paths_failed; this.path = path; this.short_channel_id = short_channel_id; }
861                 }
862                 public final static class PendingHTLCsForwardable extends LDKEvent {
863                         public long time_forwardable;
864                         PendingHTLCsForwardable(long time_forwardable) { this.time_forwardable = time_forwardable; }
865                 }
866                 public final static class SpendableOutputs extends LDKEvent {
867                         public long[] outputs;
868                         SpendableOutputs(long[] outputs) { this.outputs = outputs; }
869                 }
870                 public final static class PaymentForwarded extends LDKEvent {
871                         public long fee_earned_msat;
872                         public boolean claim_from_onchain_tx;
873                         PaymentForwarded(long fee_earned_msat, boolean claim_from_onchain_tx) { this.fee_earned_msat = fee_earned_msat; this.claim_from_onchain_tx = claim_from_onchain_tx; }
874                 }
875                 public final static class ChannelClosed extends LDKEvent {
876                         public byte[] channel_id;
877                         public long user_channel_id;
878                         public long reason;
879                         ChannelClosed(byte[] channel_id, long user_channel_id, long reason) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.reason = reason; }
880                 }
881                 public final static class DiscardFunding extends LDKEvent {
882                         public byte[] channel_id;
883                         public byte[] transaction;
884                         DiscardFunding(byte[] channel_id, byte[] transaction) { this.channel_id = channel_id; this.transaction = transaction; }
885                 }
886                 static native void init();
887         }
888         static { LDKEvent.init(); }
889         public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
890         public static native long LDKCVec_EventZ_new(long[] elems);
891         public static native long LDKC2Tuple_u32TxOutZ_new(int a, long b);
892         // uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
893         public static native int C2Tuple_u32TxOutZ_get_a(long tuple);
894         // struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
895         public static native long C2Tuple_u32TxOutZ_get_b(long tuple);
896         public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(long[] elems);
897         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(byte[] a, long[] b);
898         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
899         public static native byte[] C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long tuple);
900         // struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
901         public static native long[] C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long tuple);
902         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(long[] elems);
903         public static class LDKBalance {
904                 private LDKBalance() {}
905                 public final static class ClaimableOnChannelClose extends LDKBalance {
906                         public long claimable_amount_satoshis;
907                         ClaimableOnChannelClose(long claimable_amount_satoshis) { this.claimable_amount_satoshis = claimable_amount_satoshis; }
908                 }
909                 public final static class ClaimableAwaitingConfirmations extends LDKBalance {
910                         public long claimable_amount_satoshis;
911                         public int confirmation_height;
912                         ClaimableAwaitingConfirmations(long claimable_amount_satoshis, int confirmation_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.confirmation_height = confirmation_height; }
913                 }
914                 public final static class ContentiousClaimable extends LDKBalance {
915                         public long claimable_amount_satoshis;
916                         public int timeout_height;
917                         ContentiousClaimable(long claimable_amount_satoshis, int timeout_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.timeout_height = timeout_height; }
918                 }
919                 public final static class MaybeClaimableHTLCAwaitingTimeout extends LDKBalance {
920                         public long claimable_amount_satoshis;
921                         public int claimable_height;
922                         MaybeClaimableHTLCAwaitingTimeout(long claimable_amount_satoshis, int claimable_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.claimable_height = claimable_height; }
923                 }
924                 static native void init();
925         }
926         static { LDKBalance.init(); }
927         public static native LDKBalance LDKBalance_ref_from_ptr(long ptr);
928         public static native long LDKCVec_BalanceZ_new(long[] elems);
929         public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
930         public static native long LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
931         public static native long LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
932         public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
933         public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
934         public static native long LDKCResult_NoneLightningErrorZ_get_err(long arg);
935         public static native long LDKC2Tuple_PublicKeyTypeZ_new(byte[] a, long b);
936         // struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
937         public static native byte[] C2Tuple_PublicKeyTypeZ_get_a(long tuple);
938         // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
939         public static native long C2Tuple_PublicKeyTypeZ_get_b(long tuple);
940         public static native long LDKCVec_C2Tuple_PublicKeyTypeZZ_new(long[] elems);
941         public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
942         public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
943         public static native long LDKCResult_boolLightningErrorZ_get_err(long arg);
944         public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(long a, long b, long c);
945         // struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
946         public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long tuple);
947         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
948         public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long tuple);
949         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
950         public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long tuple);
951         public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(long[] elems);
952         public static native long LDKCVec_NodeAnnouncementZ_new(long[] elems);
953         public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
954         public static native byte[] LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
955         public static native long LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
956         public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
957         public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
958         public static native long LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
959         public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
960         public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
961         public static native long LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
962         public static native boolean LDKCResult_NodeIdDecodeErrorZ_result_ok(long arg);
963         public static native long LDKCResult_NodeIdDecodeErrorZ_get_ok(long arg);
964         public static native long LDKCResult_NodeIdDecodeErrorZ_get_err(long arg);
965         public interface LDKAccess {
966                  long get_utxo(byte[] genesis_hash, long short_channel_id);
967         }
968         public static native long LDKAccess_new(LDKAccess impl);
969         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
970         public static native long Access_get_utxo(long this_arg, byte[] genesis_hash, long short_channel_id);
971         public static class LDKCOption_AccessZ {
972                 private LDKCOption_AccessZ() {}
973                 public final static class Some extends LDKCOption_AccessZ {
974                         public long some;
975                         Some(long some) { this.some = some; }
976                 }
977                 public final static class None extends LDKCOption_AccessZ {
978                         None() { }
979                 }
980                 static native void init();
981         }
982         static { LDKCOption_AccessZ.init(); }
983         public static native LDKCOption_AccessZ LDKCOption_AccessZ_ref_from_ptr(long ptr);
984         public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
985         public static native long LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
986         public static native long LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
987         public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
988         public static native long LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
989         public static native long LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
990         public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
991         public static native long LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
992         public static native long LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
993         public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
994         public static native long LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
995         public static native long LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
996         public static native long LDKCVec_u64Z_new(long[] elems);
997         public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
998         public static native long LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
999         public static native long LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
1000         public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
1001         public static native long LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
1002         public static native long LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
1003         public static class LDKCOption_CVec_NetAddressZZ {
1004                 private LDKCOption_CVec_NetAddressZZ() {}
1005                 public final static class Some extends LDKCOption_CVec_NetAddressZZ {
1006                         public long[] some;
1007                         Some(long[] some) { this.some = some; }
1008                 }
1009                 public final static class None extends LDKCOption_CVec_NetAddressZZ {
1010                         None() { }
1011                 }
1012                 static native void init();
1013         }
1014         static { LDKCOption_CVec_NetAddressZZ.init(); }
1015         public static native LDKCOption_CVec_NetAddressZZ LDKCOption_CVec_NetAddressZZ_ref_from_ptr(long ptr);
1016         public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
1017         public static native long LDKCResult_NetAddressu8Z_get_ok(long arg);
1018         public static native byte LDKCResult_NetAddressu8Z_get_err(long arg);
1019         public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
1020         public static native long LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
1021         public static native long LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
1022         public static native boolean LDKCResult_NetAddressDecodeErrorZ_result_ok(long arg);
1023         public static native long LDKCResult_NetAddressDecodeErrorZ_get_ok(long arg);
1024         public static native long LDKCResult_NetAddressDecodeErrorZ_get_err(long arg);
1025         public static native long LDKCVec_UpdateAddHTLCZ_new(long[] elems);
1026         public static native long LDKCVec_UpdateFulfillHTLCZ_new(long[] elems);
1027         public static native long LDKCVec_UpdateFailHTLCZ_new(long[] elems);
1028         public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(long[] elems);
1029         public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
1030         public static native long LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
1031         public static native long LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
1032         public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
1033         public static native long LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
1034         public static native long LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
1035         public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
1036         public static native long LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
1037         public static native long LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
1038         public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
1039         public static native long LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
1040         public static native long LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
1041         public static native boolean LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_result_ok(long arg);
1042         public static native long LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(long arg);
1043         public static native long LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(long arg);
1044         public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
1045         public static native long LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
1046         public static native long LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
1047         public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
1048         public static native long LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
1049         public static native long LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
1050         public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
1051         public static native long LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
1052         public static native long LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
1053         public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
1054         public static native long LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
1055         public static native long LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
1056         public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
1057         public static native long LDKCResult_InitDecodeErrorZ_get_ok(long arg);
1058         public static native long LDKCResult_InitDecodeErrorZ_get_err(long arg);
1059         public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
1060         public static native long LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
1061         public static native long LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
1062         public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
1063         public static native long LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
1064         public static native long LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
1065         public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
1066         public static native long LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
1067         public static native long LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
1068         public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
1069         public static native long LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
1070         public static native long LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
1071         public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
1072         public static native long LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
1073         public static native long LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
1074         public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
1075         public static native long LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
1076         public static native long LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
1077         public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
1078         public static native long LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
1079         public static native long LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
1080         public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
1081         public static native long LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
1082         public static native long LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
1083         public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
1084         public static native long LDKCResult_PingDecodeErrorZ_get_ok(long arg);
1085         public static native long LDKCResult_PingDecodeErrorZ_get_err(long arg);
1086         public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
1087         public static native long LDKCResult_PongDecodeErrorZ_get_ok(long arg);
1088         public static native long LDKCResult_PongDecodeErrorZ_get_err(long arg);
1089         public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1090         public static native long LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1091         public static native long LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
1092         public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1093         public static native long LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1094         public static native long LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
1095         public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
1096         public static native long LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
1097         public static native long LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
1098         public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
1099         public static native long LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
1100         public static native long LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
1101         public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
1102         public static native long LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
1103         public static native long LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
1104         public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
1105         public static native long LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
1106         public static native long LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
1107         public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
1108         public static native long LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
1109         public static native long LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
1110         public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
1111         public static native long LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
1112         public static native long LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
1113         public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
1114         public static native long LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1115         public static native long LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1116         public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
1117         public static native long LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1118         public static native long LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1119         public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
1120         public static native long LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1121         public static native long LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1122         public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
1123         public static native long LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1124         public static native long LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1125         public static class LDKSignOrCreationError {
1126                 private LDKSignOrCreationError() {}
1127                 public final static class SignError extends LDKSignOrCreationError {
1128                         SignError() { }
1129                 }
1130                 public final static class CreationError extends LDKSignOrCreationError {
1131                         public org.ldk.enums.CreationError creation_error;
1132                         CreationError(org.ldk.enums.CreationError creation_error) { this.creation_error = creation_error; }
1133                 }
1134                 static native void init();
1135         }
1136         static { LDKSignOrCreationError.init(); }
1137         public static native LDKSignOrCreationError LDKSignOrCreationError_ref_from_ptr(long ptr);
1138         public static native boolean LDKCResult_InvoiceSignOrCreationErrorZ_result_ok(long arg);
1139         public static native long LDKCResult_InvoiceSignOrCreationErrorZ_get_ok(long arg);
1140         public static native long LDKCResult_InvoiceSignOrCreationErrorZ_get_err(long arg);
1141         public interface LDKFilter {
1142                  void register_tx(byte[] txid, byte[] script_pubkey);
1143                  long register_output(long output);
1144         }
1145         public static native long LDKFilter_new(LDKFilter impl);
1146         // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1147         public static native void Filter_register_tx(long this_arg, byte[] txid, byte[] script_pubkey);
1148         // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
1149         public static native long Filter_register_output(long this_arg, long output);
1150         public static class LDKCOption_FilterZ {
1151                 private LDKCOption_FilterZ() {}
1152                 public final static class Some extends LDKCOption_FilterZ {
1153                         public long some;
1154                         Some(long some) { this.some = some; }
1155                 }
1156                 public final static class None extends LDKCOption_FilterZ {
1157                         None() { }
1158                 }
1159                 static native void init();
1160         }
1161         static { LDKCOption_FilterZ.init(); }
1162         public static native LDKCOption_FilterZ LDKCOption_FilterZ_ref_from_ptr(long ptr);
1163         public static native boolean LDKCResult_LockedChannelMonitorNoneZ_result_ok(long arg);
1164         public static native long LDKCResult_LockedChannelMonitorNoneZ_get_ok(long arg);
1165         public static native void LDKCResult_LockedChannelMonitorNoneZ_get_err(long arg);
1166         public static native long LDKCVec_OutPointZ_new(long[] elems);
1167         public interface LDKMessageSendEventsProvider {
1168                  long[] get_and_clear_pending_msg_events();
1169         }
1170         public static native long LDKMessageSendEventsProvider_new(LDKMessageSendEventsProvider impl);
1171         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1172         public static native long[] MessageSendEventsProvider_get_and_clear_pending_msg_events(long this_arg);
1173         public interface LDKEventHandler {
1174                  void handle_event(long event);
1175         }
1176         public static native long LDKEventHandler_new(LDKEventHandler impl);
1177         // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, const struct LDKEvent *NONNULL_PTR event
1178         public static native void EventHandler_handle_event(long this_arg, long event);
1179         public interface LDKEventsProvider {
1180                  void process_pending_events(long handler);
1181         }
1182         public static native long LDKEventsProvider_new(LDKEventsProvider impl);
1183         // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
1184         public static native void EventsProvider_process_pending_events(long this_arg, long handler);
1185         public interface LDKListen {
1186                  void block_connected(byte[] block, int height);
1187                  void block_disconnected(byte[] header, int height);
1188         }
1189         public static native long LDKListen_new(LDKListen impl);
1190         // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1191         public static native void Listen_block_connected(long this_arg, byte[] block, int height);
1192         // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1193         public static native void Listen_block_disconnected(long this_arg, byte[] header, int height);
1194         public interface LDKConfirm {
1195                  void transactions_confirmed(byte[] header, long[] txdata, int height);
1196                  void transaction_unconfirmed(byte[] txid);
1197                  void best_block_updated(byte[] header, int height);
1198                  byte[][] get_relevant_txids();
1199         }
1200         public static native long LDKConfirm_new(LDKConfirm impl);
1201         // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
1202         public static native void Confirm_transactions_confirmed(long this_arg, byte[] header, long[] txdata, int height);
1203         // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
1204         public static native void Confirm_transaction_unconfirmed(long this_arg, byte[] txid);
1205         // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1206         public static native void Confirm_best_block_updated(long this_arg, byte[] header, int height);
1207         // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
1208         public static native byte[][] Confirm_get_relevant_txids(long this_arg);
1209         public interface LDKPersist {
1210                  long persist_new_channel(long id, long data);
1211                  long update_persisted_channel(long id, long update, long data);
1212         }
1213         public static native long LDKPersist_new(LDKPersist impl);
1214         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1215         public static native long Persist_persist_new_channel(long this_arg, long id, long data);
1216         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data
1217         public static native long Persist_update_persisted_channel(long this_arg, long id, long update, long data);
1218         public interface LDKChannelMessageHandler {
1219                  void handle_open_channel(byte[] their_node_id, long their_features, long msg);
1220                  void handle_accept_channel(byte[] their_node_id, long their_features, long msg);
1221                  void handle_funding_created(byte[] their_node_id, long msg);
1222                  void handle_funding_signed(byte[] their_node_id, long msg);
1223                  void handle_funding_locked(byte[] their_node_id, long msg);
1224                  void handle_shutdown(byte[] their_node_id, long their_features, long msg);
1225                  void handle_closing_signed(byte[] their_node_id, long msg);
1226                  void handle_update_add_htlc(byte[] their_node_id, long msg);
1227                  void handle_update_fulfill_htlc(byte[] their_node_id, long msg);
1228                  void handle_update_fail_htlc(byte[] their_node_id, long msg);
1229                  void handle_update_fail_malformed_htlc(byte[] their_node_id, long msg);
1230                  void handle_commitment_signed(byte[] their_node_id, long msg);
1231                  void handle_revoke_and_ack(byte[] their_node_id, long msg);
1232                  void handle_update_fee(byte[] their_node_id, long msg);
1233                  void handle_announcement_signatures(byte[] their_node_id, long msg);
1234                  void peer_disconnected(byte[] their_node_id, boolean no_connection_possible);
1235                  void peer_connected(byte[] their_node_id, long msg);
1236                  void handle_channel_reestablish(byte[] their_node_id, long msg);
1237                  void handle_channel_update(byte[] their_node_id, long msg);
1238                  void handle_error(byte[] their_node_id, long msg);
1239         }
1240         public static native long LDKChannelMessageHandler_new(LDKChannelMessageHandler impl, LDKMessageSendEventsProvider MessageSendEventsProvider);
1241         public static native long LDKChannelMessageHandler_get_MessageSendEventsProvider(long arg);
1242         // void ChannelMessageHandler_handle_open_channel LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKOpenChannel *NONNULL_PTR msg
1243         public static native void ChannelMessageHandler_handle_open_channel(long this_arg, byte[] their_node_id, long their_features, long msg);
1244         // void ChannelMessageHandler_handle_accept_channel LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKInitFeatures their_features, const struct LDKAcceptChannel *NONNULL_PTR msg
1245         public static native void ChannelMessageHandler_handle_accept_channel(long this_arg, byte[] their_node_id, long their_features, long msg);
1246         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1247         public static native void ChannelMessageHandler_handle_funding_created(long this_arg, byte[] their_node_id, long msg);
1248         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1249         public static native void ChannelMessageHandler_handle_funding_signed(long this_arg, byte[] their_node_id, long msg);
1250         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1251         public static native void ChannelMessageHandler_handle_funding_locked(long this_arg, byte[] their_node_id, long msg);
1252         // void ChannelMessageHandler_handle_shutdown LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInitFeatures *NONNULL_PTR their_features, const struct LDKShutdown *NONNULL_PTR msg
1253         public static native void ChannelMessageHandler_handle_shutdown(long this_arg, byte[] their_node_id, long their_features, long msg);
1254         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1255         public static native void ChannelMessageHandler_handle_closing_signed(long this_arg, byte[] their_node_id, long msg);
1256         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1257         public static native void ChannelMessageHandler_handle_update_add_htlc(long this_arg, byte[] their_node_id, long msg);
1258         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1259         public static native void ChannelMessageHandler_handle_update_fulfill_htlc(long this_arg, byte[] their_node_id, long msg);
1260         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1261         public static native void ChannelMessageHandler_handle_update_fail_htlc(long this_arg, byte[] their_node_id, long msg);
1262         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1263         public static native void ChannelMessageHandler_handle_update_fail_malformed_htlc(long this_arg, byte[] their_node_id, long msg);
1264         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1265         public static native void ChannelMessageHandler_handle_commitment_signed(long this_arg, byte[] their_node_id, long msg);
1266         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1267         public static native void ChannelMessageHandler_handle_revoke_and_ack(long this_arg, byte[] their_node_id, long msg);
1268         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1269         public static native void ChannelMessageHandler_handle_update_fee(long this_arg, byte[] their_node_id, long msg);
1270         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1271         public static native void ChannelMessageHandler_handle_announcement_signatures(long this_arg, byte[] their_node_id, long msg);
1272         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1273         public static native void ChannelMessageHandler_peer_disconnected(long this_arg, byte[] their_node_id, boolean no_connection_possible);
1274         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1275         public static native void ChannelMessageHandler_peer_connected(long this_arg, byte[] their_node_id, long msg);
1276         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1277         public static native void ChannelMessageHandler_handle_channel_reestablish(long this_arg, byte[] their_node_id, long msg);
1278         // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
1279         public static native void ChannelMessageHandler_handle_channel_update(long this_arg, byte[] their_node_id, long msg);
1280         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1281         public static native void ChannelMessageHandler_handle_error(long this_arg, byte[] their_node_id, long msg);
1282         public interface LDKRoutingMessageHandler {
1283                  long handle_node_announcement(long msg);
1284                  long handle_channel_announcement(long msg);
1285                  long handle_channel_update(long msg);
1286                  long[] get_next_channel_announcements(long starting_point, byte batch_amount);
1287                  long[] get_next_node_announcements(byte[] starting_point, byte batch_amount);
1288                  void sync_routing_table(byte[] their_node_id, long init);
1289                  long handle_reply_channel_range(byte[] their_node_id, long msg);
1290                  long handle_reply_short_channel_ids_end(byte[] their_node_id, long msg);
1291                  long handle_query_channel_range(byte[] their_node_id, long msg);
1292                  long handle_query_short_channel_ids(byte[] their_node_id, long msg);
1293         }
1294         public static native long LDKRoutingMessageHandler_new(LDKRoutingMessageHandler impl, LDKMessageSendEventsProvider MessageSendEventsProvider);
1295         public static native long LDKRoutingMessageHandler_get_MessageSendEventsProvider(long arg);
1296         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1297         public static native long RoutingMessageHandler_handle_node_announcement(long this_arg, long msg);
1298         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1299         public static native long RoutingMessageHandler_handle_channel_announcement(long this_arg, long msg);
1300         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1301         public static native long RoutingMessageHandler_handle_channel_update(long this_arg, long msg);
1302         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
1303         public static native long[] RoutingMessageHandler_get_next_channel_announcements(long this_arg, long starting_point, byte batch_amount);
1304         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1305         public static native long[] RoutingMessageHandler_get_next_node_announcements(long this_arg, byte[] starting_point, byte batch_amount);
1306         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1307         public static native void RoutingMessageHandler_sync_routing_table(long this_arg, byte[] their_node_id, long init);
1308         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1309         public static native long RoutingMessageHandler_handle_reply_channel_range(long this_arg, byte[] their_node_id, long msg);
1310         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1311         public static native long RoutingMessageHandler_handle_reply_short_channel_ids_end(long this_arg, byte[] their_node_id, long msg);
1312         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1313         public static native long RoutingMessageHandler_handle_query_channel_range(long this_arg, byte[] their_node_id, long msg);
1314         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1315         public static native long RoutingMessageHandler_handle_query_short_channel_ids(long this_arg, byte[] their_node_id, long msg);
1316         public interface LDKCustomMessageReader {
1317                  long read(short message_type, byte[] buffer);
1318         }
1319         public static native long LDKCustomMessageReader_new(LDKCustomMessageReader impl);
1320         // LDKCResult_COption_TypeZDecodeErrorZ CustomMessageReader_read LDKCustomMessageReader *NONNULL_PTR this_arg, uint16_t message_type, struct LDKu8slice buffer
1321         public static native long CustomMessageReader_read(long this_arg, short message_type, byte[] buffer);
1322         public interface LDKCustomMessageHandler {
1323                  long handle_custom_message(long msg, byte[] sender_node_id);
1324                  long[] get_and_clear_pending_msg();
1325         }
1326         public static native long LDKCustomMessageHandler_new(LDKCustomMessageHandler impl, LDKCustomMessageReader CustomMessageReader);
1327         public static native long LDKCustomMessageHandler_get_CustomMessageReader(long arg);
1328         // LDKCResult_NoneLightningErrorZ CustomMessageHandler_handle_custom_message LDKCustomMessageHandler *NONNULL_PTR this_arg, struct LDKType msg, struct LDKPublicKey sender_node_id
1329         public static native long CustomMessageHandler_handle_custom_message(long this_arg, long msg, byte[] sender_node_id);
1330         // LDKCVec_C2Tuple_PublicKeyTypeZZ CustomMessageHandler_get_and_clear_pending_msg LDKCustomMessageHandler *NONNULL_PTR this_arg
1331         public static native long[] CustomMessageHandler_get_and_clear_pending_msg(long this_arg);
1332         public interface LDKSocketDescriptor {
1333                  long send_data(byte[] data, boolean resume_read);
1334                  void disconnect_socket();
1335                  boolean eq(long other_arg);
1336                  long hash();
1337         }
1338         public static native long LDKSocketDescriptor_new(LDKSocketDescriptor impl);
1339         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
1340         public static native long SocketDescriptor_send_data(long this_arg, byte[] data, boolean resume_read);
1341         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
1342         public static native void SocketDescriptor_disconnect_socket(long this_arg);
1343         // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
1344         public static native long SocketDescriptor_hash(long this_arg);
1345         public interface LDKScore {
1346                  long channel_penalty_msat(long short_channel_id);
1347         }
1348         public static native long LDKScore_new(LDKScore impl);
1349         // uint64_t Score_channel_penalty_msat LDKScore *NONNULL_PTR this_arg, uint64_t short_channel_id
1350         public static native long Score_channel_penalty_msat(long this_arg, long short_channel_id);
1351         public interface LDKChannelManagerPersister {
1352                  long persist_manager(long channel_manager);
1353         }
1354         public static native long LDKChannelManagerPersister_new(LDKChannelManagerPersister impl);
1355         // LDKCResult_NoneErrorZ ChannelManagerPersister_persist_manager LDKChannelManagerPersister *NONNULL_PTR this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager
1356         public static native long ChannelManagerPersister_persist_manager(long this_arg, long channel_manager);
1357         public static class LDKFallback {
1358                 private LDKFallback() {}
1359                 public final static class SegWitProgram extends LDKFallback {
1360                         public byte version;
1361                         public byte[] program;
1362                         SegWitProgram(byte version, byte[] program) { this.version = version; this.program = program; }
1363                 }
1364                 public final static class PubKeyHash extends LDKFallback {
1365                         public byte[] pub_key_hash;
1366                         PubKeyHash(byte[] pub_key_hash) { this.pub_key_hash = pub_key_hash; }
1367                 }
1368                 public final static class ScriptHash extends LDKFallback {
1369                         public byte[] script_hash;
1370                         ScriptHash(byte[] script_hash) { this.script_hash = script_hash; }
1371                 }
1372                 static native void init();
1373         }
1374         static { LDKFallback.init(); }
1375         public static native LDKFallback LDKFallback_ref_from_ptr(long ptr);
1376         // struct LDKStr _ldk_get_compiled_version(void);
1377         public static native String _ldk_get_compiled_version();
1378         // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
1379         public static native String _ldk_c_bindings_get_compiled_version();
1380         // void Transaction_free(struct LDKTransaction _res);
1381         public static native void Transaction_free(byte[] _res);
1382         // struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
1383         public static native long TxOut_new(byte[] script_pubkey, long value);
1384         // void TxOut_free(struct LDKTxOut _res);
1385         public static native void TxOut_free(long _res);
1386         // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
1387         public static native long TxOut_clone(long orig);
1388         // void Str_free(struct LDKStr _res);
1389         public static native void Str_free(String _res);
1390         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
1391         public static native long CResult_SecretKeyErrorZ_ok(byte[] o);
1392         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
1393         public static native long CResult_SecretKeyErrorZ_err(Secp256k1Error e);
1394         // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
1395         public static native void CResult_SecretKeyErrorZ_free(long _res);
1396         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
1397         public static native long CResult_PublicKeyErrorZ_ok(byte[] o);
1398         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
1399         public static native long CResult_PublicKeyErrorZ_err(Secp256k1Error e);
1400         // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
1401         public static native void CResult_PublicKeyErrorZ_free(long _res);
1402         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
1403         public static native long CResult_PublicKeyErrorZ_clone(long orig);
1404         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
1405         public static native long CResult_TxCreationKeysDecodeErrorZ_ok(long o);
1406         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
1407         public static native long CResult_TxCreationKeysDecodeErrorZ_err(long e);
1408         // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
1409         public static native void CResult_TxCreationKeysDecodeErrorZ_free(long _res);
1410         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
1411         public static native long CResult_TxCreationKeysDecodeErrorZ_clone(long orig);
1412         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
1413         public static native long CResult_ChannelPublicKeysDecodeErrorZ_ok(long o);
1414         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
1415         public static native long CResult_ChannelPublicKeysDecodeErrorZ_err(long e);
1416         // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
1417         public static native void CResult_ChannelPublicKeysDecodeErrorZ_free(long _res);
1418         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
1419         public static native long CResult_ChannelPublicKeysDecodeErrorZ_clone(long orig);
1420         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
1421         public static native long CResult_TxCreationKeysErrorZ_ok(long o);
1422         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
1423         public static native long CResult_TxCreationKeysErrorZ_err(Secp256k1Error e);
1424         // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
1425         public static native void CResult_TxCreationKeysErrorZ_free(long _res);
1426         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
1427         public static native long CResult_TxCreationKeysErrorZ_clone(long orig);
1428         // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
1429         public static native long COption_u32Z_some(int o);
1430         // struct LDKCOption_u32Z COption_u32Z_none(void);
1431         public static native long COption_u32Z_none();
1432         // void COption_u32Z_free(struct LDKCOption_u32Z _res);
1433         public static native void COption_u32Z_free(long _res);
1434         // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
1435         public static native long COption_u32Z_clone(long orig);
1436         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
1437         public static native long CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(long o);
1438         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
1439         public static native long CResult_HTLCOutputInCommitmentDecodeErrorZ_err(long e);
1440         // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
1441         public static native void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(long _res);
1442         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
1443         public static native long CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(long orig);
1444         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
1445         public static native long CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(long o);
1446         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1447         public static native long CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(long e);
1448         // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
1449         public static native void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(long _res);
1450         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1451         public static native long CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(long orig);
1452         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
1453         public static native long CResult_ChannelTransactionParametersDecodeErrorZ_ok(long o);
1454         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1455         public static native long CResult_ChannelTransactionParametersDecodeErrorZ_err(long e);
1456         // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
1457         public static native void CResult_ChannelTransactionParametersDecodeErrorZ_free(long _res);
1458         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1459         public static native long CResult_ChannelTransactionParametersDecodeErrorZ_clone(long orig);
1460         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
1461         public static native void CVec_SignatureZ_free(byte[][] _res);
1462         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
1463         public static native long CResult_HolderCommitmentTransactionDecodeErrorZ_ok(long o);
1464         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1465         public static native long CResult_HolderCommitmentTransactionDecodeErrorZ_err(long e);
1466         // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
1467         public static native void CResult_HolderCommitmentTransactionDecodeErrorZ_free(long _res);
1468         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1469         public static native long CResult_HolderCommitmentTransactionDecodeErrorZ_clone(long orig);
1470         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
1471         public static native long CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(long o);
1472         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1473         public static native long CResult_BuiltCommitmentTransactionDecodeErrorZ_err(long e);
1474         // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
1475         public static native void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(long _res);
1476         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1477         public static native long CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(long orig);
1478         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_ok(struct LDKTrustedClosingTransaction o);
1479         public static native long CResult_TrustedClosingTransactionNoneZ_ok(long o);
1480         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_err(void);
1481         public static native long CResult_TrustedClosingTransactionNoneZ_err();
1482         // void CResult_TrustedClosingTransactionNoneZ_free(struct LDKCResult_TrustedClosingTransactionNoneZ _res);
1483         public static native void CResult_TrustedClosingTransactionNoneZ_free(long _res);
1484         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
1485         public static native long CResult_CommitmentTransactionDecodeErrorZ_ok(long o);
1486         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1487         public static native long CResult_CommitmentTransactionDecodeErrorZ_err(long e);
1488         // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
1489         public static native void CResult_CommitmentTransactionDecodeErrorZ_free(long _res);
1490         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1491         public static native long CResult_CommitmentTransactionDecodeErrorZ_clone(long orig);
1492         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
1493         public static native long CResult_TrustedCommitmentTransactionNoneZ_ok(long o);
1494         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
1495         public static native long CResult_TrustedCommitmentTransactionNoneZ_err();
1496         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
1497         public static native void CResult_TrustedCommitmentTransactionNoneZ_free(long _res);
1498         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
1499         public static native long CResult_CVec_SignatureZNoneZ_ok(byte[][] o);
1500         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
1501         public static native long CResult_CVec_SignatureZNoneZ_err();
1502         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
1503         public static native void CResult_CVec_SignatureZNoneZ_free(long _res);
1504         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
1505         public static native long CResult_CVec_SignatureZNoneZ_clone(long orig);
1506         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_ok(struct LDKShutdownScript o);
1507         public static native long CResult_ShutdownScriptDecodeErrorZ_ok(long o);
1508         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_err(struct LDKDecodeError e);
1509         public static native long CResult_ShutdownScriptDecodeErrorZ_err(long e);
1510         // void CResult_ShutdownScriptDecodeErrorZ_free(struct LDKCResult_ShutdownScriptDecodeErrorZ _res);
1511         public static native void CResult_ShutdownScriptDecodeErrorZ_free(long _res);
1512         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_clone(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR orig);
1513         public static native long CResult_ShutdownScriptDecodeErrorZ_clone(long orig);
1514         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_ok(struct LDKShutdownScript o);
1515         public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_ok(long o);
1516         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_err(struct LDKInvalidShutdownScript e);
1517         public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_err(long e);
1518         // void CResult_ShutdownScriptInvalidShutdownScriptZ_free(struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ _res);
1519         public static native void CResult_ShutdownScriptInvalidShutdownScriptZ_free(long _res);
1520         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
1521         public static native long CResult_NoneErrorZ_ok();
1522         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
1523         public static native long CResult_NoneErrorZ_err(IOError e);
1524         // void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
1525         public static native void CResult_NoneErrorZ_free(long _res);
1526         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig);
1527         public static native long CResult_NoneErrorZ_clone(long orig);
1528         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
1529         public static native long CResult_RouteHopDecodeErrorZ_ok(long o);
1530         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
1531         public static native long CResult_RouteHopDecodeErrorZ_err(long e);
1532         // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
1533         public static native void CResult_RouteHopDecodeErrorZ_free(long _res);
1534         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
1535         public static native long CResult_RouteHopDecodeErrorZ_clone(long orig);
1536         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
1537         public static native void CVec_RouteHopZ_free(long[] _res);
1538         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
1539         public static native void CVec_CVec_RouteHopZZ_free(long[][] _res);
1540         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
1541         public static native long CResult_RouteDecodeErrorZ_ok(long o);
1542         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
1543         public static native long CResult_RouteDecodeErrorZ_err(long e);
1544         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
1545         public static native void CResult_RouteDecodeErrorZ_free(long _res);
1546         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
1547         public static native long CResult_RouteDecodeErrorZ_clone(long orig);
1548         // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
1549         public static native long COption_u64Z_some(long o);
1550         // struct LDKCOption_u64Z COption_u64Z_none(void);
1551         public static native long COption_u64Z_none();
1552         // void COption_u64Z_free(struct LDKCOption_u64Z _res);
1553         public static native void COption_u64Z_free(long _res);
1554         // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
1555         public static native long COption_u64Z_clone(long orig);
1556         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
1557         public static native void CVec_ChannelDetailsZ_free(long[] _res);
1558         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
1559         public static native void CVec_RouteHintZ_free(long[] _res);
1560         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
1561         public static native long CResult_RouteLightningErrorZ_ok(long o);
1562         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
1563         public static native long CResult_RouteLightningErrorZ_err(long e);
1564         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
1565         public static native void CResult_RouteLightningErrorZ_free(long _res);
1566         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
1567         public static native long CResult_RouteLightningErrorZ_clone(long orig);
1568         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
1569         public static native long CResult_TxOutAccessErrorZ_ok(long o);
1570         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
1571         public static native long CResult_TxOutAccessErrorZ_err(AccessError e);
1572         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
1573         public static native void CResult_TxOutAccessErrorZ_free(long _res);
1574         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
1575         public static native long CResult_TxOutAccessErrorZ_clone(long orig);
1576         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
1577         public static native long C2Tuple_usizeTransactionZ_clone(long orig);
1578         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
1579         public static native long C2Tuple_usizeTransactionZ_new(long a, byte[] b);
1580         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
1581         public static native void C2Tuple_usizeTransactionZ_free(long _res);
1582         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
1583         public static native void CVec_C2Tuple_usizeTransactionZZ_free(long[] _res);
1584         // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
1585         public static native void CVec_TxidZ_free(byte[][] _res);
1586         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
1587         public static native long CResult_NoneChannelMonitorUpdateErrZ_ok();
1588         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
1589         public static native long CResult_NoneChannelMonitorUpdateErrZ_err(ChannelMonitorUpdateErr e);
1590         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
1591         public static native void CResult_NoneChannelMonitorUpdateErrZ_free(long _res);
1592         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
1593         public static native long CResult_NoneChannelMonitorUpdateErrZ_clone(long orig);
1594         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
1595         public static native void CVec_MonitorEventZ_free(long[] _res);
1596         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
1597         public static native long COption_C2Tuple_usizeTransactionZZ_some(long o);
1598         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
1599         public static native long COption_C2Tuple_usizeTransactionZZ_none();
1600         // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
1601         public static native void COption_C2Tuple_usizeTransactionZZ_free(long _res);
1602         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
1603         public static native long COption_C2Tuple_usizeTransactionZZ_clone(long orig);
1604         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o);
1605         public static native long COption_NetworkUpdateZ_some(long o);
1606         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void);
1607         public static native long COption_NetworkUpdateZ_none();
1608         // void COption_NetworkUpdateZ_free(struct LDKCOption_NetworkUpdateZ _res);
1609         public static native void COption_NetworkUpdateZ_free(long _res);
1610         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_clone(const struct LDKCOption_NetworkUpdateZ *NONNULL_PTR orig);
1611         public static native long COption_NetworkUpdateZ_clone(long orig);
1612         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
1613         public static native void CVec_SpendableOutputDescriptorZ_free(long[] _res);
1614         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
1615         public static native void CVec_MessageSendEventZ_free(long[] _res);
1616         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
1617         public static native long CResult_InitFeaturesDecodeErrorZ_ok(long o);
1618         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
1619         public static native long CResult_InitFeaturesDecodeErrorZ_err(long e);
1620         // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
1621         public static native void CResult_InitFeaturesDecodeErrorZ_free(long _res);
1622         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
1623         public static native long CResult_NodeFeaturesDecodeErrorZ_ok(long o);
1624         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
1625         public static native long CResult_NodeFeaturesDecodeErrorZ_err(long e);
1626         // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
1627         public static native void CResult_NodeFeaturesDecodeErrorZ_free(long _res);
1628         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
1629         public static native long CResult_ChannelFeaturesDecodeErrorZ_ok(long o);
1630         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
1631         public static native long CResult_ChannelFeaturesDecodeErrorZ_err(long e);
1632         // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
1633         public static native void CResult_ChannelFeaturesDecodeErrorZ_free(long _res);
1634         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
1635         public static native long CResult_InvoiceFeaturesDecodeErrorZ_ok(long o);
1636         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
1637         public static native long CResult_InvoiceFeaturesDecodeErrorZ_err(long e);
1638         // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
1639         public static native void CResult_InvoiceFeaturesDecodeErrorZ_free(long _res);
1640         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
1641         public static native long CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(long o);
1642         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
1643         public static native long CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(long e);
1644         // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
1645         public static native void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(long _res);
1646         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
1647         public static native long CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(long orig);
1648         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
1649         public static native long CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(long o);
1650         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
1651         public static native long CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(long e);
1652         // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
1653         public static native void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(long _res);
1654         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
1655         public static native long CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(long orig);
1656         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
1657         public static native long CResult_SpendableOutputDescriptorDecodeErrorZ_ok(long o);
1658         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
1659         public static native long CResult_SpendableOutputDescriptorDecodeErrorZ_err(long e);
1660         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
1661         public static native void CResult_SpendableOutputDescriptorDecodeErrorZ_free(long _res);
1662         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
1663         public static native long CResult_SpendableOutputDescriptorDecodeErrorZ_clone(long orig);
1664         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_ok(void);
1665         public static native long CResult_NoneNoneZ_ok();
1666         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_err(void);
1667         public static native long CResult_NoneNoneZ_err();
1668         // void CResult_NoneNoneZ_free(struct LDKCResult_NoneNoneZ _res);
1669         public static native void CResult_NoneNoneZ_free(long _res);
1670         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_clone(const struct LDKCResult_NoneNoneZ *NONNULL_PTR orig);
1671         public static native long CResult_NoneNoneZ_clone(long orig);
1672         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
1673         public static native long C2Tuple_SignatureCVec_SignatureZZ_clone(long orig);
1674         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
1675         public static native long C2Tuple_SignatureCVec_SignatureZZ_new(byte[] a, byte[][] b);
1676         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
1677         public static native void C2Tuple_SignatureCVec_SignatureZZ_free(long _res);
1678         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
1679         public static native long CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(long o);
1680         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
1681         public static native long CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
1682         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
1683         public static native void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(long _res);
1684         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
1685         public static native long CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(long orig);
1686         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
1687         public static native long CResult_SignatureNoneZ_ok(byte[] o);
1688         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
1689         public static native long CResult_SignatureNoneZ_err();
1690         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
1691         public static native void CResult_SignatureNoneZ_free(long _res);
1692         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
1693         public static native long CResult_SignatureNoneZ_clone(long orig);
1694         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
1695         public static native long CResult_SignDecodeErrorZ_ok(long o);
1696         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
1697         public static native long CResult_SignDecodeErrorZ_err(long e);
1698         // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
1699         public static native void CResult_SignDecodeErrorZ_free(long _res);
1700         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
1701         public static native long CResult_SignDecodeErrorZ_clone(long orig);
1702         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
1703         public static native void CVec_u8Z_free(byte[] _res);
1704         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
1705         public static native long CResult_RecoverableSignatureNoneZ_ok(byte[] arg);
1706         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
1707         public static native long CResult_RecoverableSignatureNoneZ_err();
1708         // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
1709         public static native void CResult_RecoverableSignatureNoneZ_free(long _res);
1710         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
1711         public static native long CResult_RecoverableSignatureNoneZ_clone(long orig);
1712         // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
1713         public static native void CVec_CVec_u8ZZ_free(byte[][] _res);
1714         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
1715         public static native long CResult_CVec_CVec_u8ZZNoneZ_ok(byte[][] o);
1716         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
1717         public static native long CResult_CVec_CVec_u8ZZNoneZ_err();
1718         // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
1719         public static native void CResult_CVec_CVec_u8ZZNoneZ_free(long _res);
1720         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
1721         public static native long CResult_CVec_CVec_u8ZZNoneZ_clone(long orig);
1722         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
1723         public static native long CResult_InMemorySignerDecodeErrorZ_ok(long o);
1724         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
1725         public static native long CResult_InMemorySignerDecodeErrorZ_err(long e);
1726         // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
1727         public static native void CResult_InMemorySignerDecodeErrorZ_free(long _res);
1728         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
1729         public static native long CResult_InMemorySignerDecodeErrorZ_clone(long orig);
1730         // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
1731         public static native void CVec_TxOutZ_free(long[] _res);
1732         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
1733         public static native long CResult_TransactionNoneZ_ok(byte[] o);
1734         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
1735         public static native long CResult_TransactionNoneZ_err();
1736         // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
1737         public static native void CResult_TransactionNoneZ_free(long _res);
1738         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
1739         public static native long CResult_TransactionNoneZ_clone(long orig);
1740         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_clone(const struct LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR orig);
1741         public static native long C2Tuple_BlockHashChannelMonitorZ_clone(long orig);
1742         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
1743         public static native long C2Tuple_BlockHashChannelMonitorZ_new(byte[] a, long b);
1744         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
1745         public static native void C2Tuple_BlockHashChannelMonitorZ_free(long _res);
1746         // void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res);
1747         public static native void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(long[] _res);
1748         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o);
1749         public static native long CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(long[] o);
1750         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e);
1751         public static native long CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(IOError e);
1752         // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
1753         public static native void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(long _res);
1754         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(const struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR orig);
1755         public static native long CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(long orig);
1756         // struct LDKCResult_PaymentIdDecodeErrorZ CResult_PaymentIdDecodeErrorZ_ok(struct LDKPaymentId o);
1757         public static native long CResult_PaymentIdDecodeErrorZ_ok(long o);
1758         // struct LDKCResult_PaymentIdDecodeErrorZ CResult_PaymentIdDecodeErrorZ_err(struct LDKDecodeError e);
1759         public static native long CResult_PaymentIdDecodeErrorZ_err(long e);
1760         // void CResult_PaymentIdDecodeErrorZ_free(struct LDKCResult_PaymentIdDecodeErrorZ _res);
1761         public static native void CResult_PaymentIdDecodeErrorZ_free(long _res);
1762         // struct LDKCResult_PaymentIdDecodeErrorZ CResult_PaymentIdDecodeErrorZ_clone(const struct LDKCResult_PaymentIdDecodeErrorZ *NONNULL_PTR orig);
1763         public static native long CResult_PaymentIdDecodeErrorZ_clone(long orig);
1764         // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
1765         public static native long COption_u16Z_some(short o);
1766         // struct LDKCOption_u16Z COption_u16Z_none(void);
1767         public static native long COption_u16Z_none();
1768         // void COption_u16Z_free(struct LDKCOption_u16Z _res);
1769         public static native void COption_u16Z_free(long _res);
1770         // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
1771         public static native long COption_u16Z_clone(long orig);
1772         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
1773         public static native long CResult_NoneAPIErrorZ_ok();
1774         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
1775         public static native long CResult_NoneAPIErrorZ_err(long e);
1776         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
1777         public static native void CResult_NoneAPIErrorZ_free(long _res);
1778         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
1779         public static native long CResult_NoneAPIErrorZ_clone(long orig);
1780         // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
1781         public static native void CVec_CResult_NoneAPIErrorZZ_free(long[] _res);
1782         // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
1783         public static native void CVec_APIErrorZ_free(long[] _res);
1784         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_ok(struct LDKThirtyTwoBytes o);
1785         public static native long CResult__u832APIErrorZ_ok(byte[] o);
1786         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_err(struct LDKAPIError e);
1787         public static native long CResult__u832APIErrorZ_err(long e);
1788         // void CResult__u832APIErrorZ_free(struct LDKCResult__u832APIErrorZ _res);
1789         public static native void CResult__u832APIErrorZ_free(long _res);
1790         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_clone(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR orig);
1791         public static native long CResult__u832APIErrorZ_clone(long orig);
1792         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_ok(struct LDKPaymentId o);
1793         public static native long CResult_PaymentIdPaymentSendFailureZ_ok(long o);
1794         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
1795         public static native long CResult_PaymentIdPaymentSendFailureZ_err(long e);
1796         // void CResult_PaymentIdPaymentSendFailureZ_free(struct LDKCResult_PaymentIdPaymentSendFailureZ _res);
1797         public static native void CResult_PaymentIdPaymentSendFailureZ_free(long _res);
1798         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_clone(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR orig);
1799         public static native long CResult_PaymentIdPaymentSendFailureZ_clone(long orig);
1800         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
1801         public static native long CResult_NonePaymentSendFailureZ_ok();
1802         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
1803         public static native long CResult_NonePaymentSendFailureZ_err(long e);
1804         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
1805         public static native void CResult_NonePaymentSendFailureZ_free(long _res);
1806         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
1807         public static native long CResult_NonePaymentSendFailureZ_clone(long orig);
1808         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_clone(const struct LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR orig);
1809         public static native long C2Tuple_PaymentHashPaymentIdZ_clone(long orig);
1810         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_new(struct LDKThirtyTwoBytes a, struct LDKPaymentId b);
1811         public static native long C2Tuple_PaymentHashPaymentIdZ_new(byte[] a, long b);
1812         // void C2Tuple_PaymentHashPaymentIdZ_free(struct LDKC2Tuple_PaymentHashPaymentIdZ _res);
1813         public static native void C2Tuple_PaymentHashPaymentIdZ_free(long _res);
1814         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(struct LDKC2Tuple_PaymentHashPaymentIdZ o);
1815         public static native long CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(long o);
1816         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
1817         public static native long CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(long e);
1818         // void CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ _res);
1819         public static native void CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(long _res);
1820         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR orig);
1821         public static native long CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(long orig);
1822         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
1823         public static native void CVec_NetAddressZ_free(long[] _res);
1824         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
1825         public static native long C2Tuple_PaymentHashPaymentSecretZ_clone(long orig);
1826         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
1827         public static native long C2Tuple_PaymentHashPaymentSecretZ_new(byte[] a, byte[] b);
1828         // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
1829         public static native void C2Tuple_PaymentHashPaymentSecretZ_free(long _res);
1830         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
1831         public static native long CResult_PaymentSecretAPIErrorZ_ok(byte[] o);
1832         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
1833         public static native long CResult_PaymentSecretAPIErrorZ_err(long e);
1834         // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
1835         public static native void CResult_PaymentSecretAPIErrorZ_free(long _res);
1836         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
1837         public static native long CResult_PaymentSecretAPIErrorZ_clone(long orig);
1838         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
1839         public static native void CVec_ChannelMonitorZ_free(long[] _res);
1840         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
1841         public static native long C2Tuple_BlockHashChannelManagerZ_new(byte[] a, long b);
1842         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
1843         public static native void C2Tuple_BlockHashChannelManagerZ_free(long _res);
1844         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
1845         public static native long CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(long o);
1846         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
1847         public static native long CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(long e);
1848         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
1849         public static native void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(long _res);
1850         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
1851         public static native long CResult_ChannelConfigDecodeErrorZ_ok(long o);
1852         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
1853         public static native long CResult_ChannelConfigDecodeErrorZ_err(long e);
1854         // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
1855         public static native void CResult_ChannelConfigDecodeErrorZ_free(long _res);
1856         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
1857         public static native long CResult_ChannelConfigDecodeErrorZ_clone(long orig);
1858         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
1859         public static native long CResult_OutPointDecodeErrorZ_ok(long o);
1860         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
1861         public static native long CResult_OutPointDecodeErrorZ_err(long e);
1862         // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
1863         public static native void CResult_OutPointDecodeErrorZ_free(long _res);
1864         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
1865         public static native long CResult_OutPointDecodeErrorZ_clone(long orig);
1866         // struct LDKCOption_TypeZ COption_TypeZ_some(struct LDKType o);
1867         public static native long COption_TypeZ_some(long o);
1868         // struct LDKCOption_TypeZ COption_TypeZ_none(void);
1869         public static native long COption_TypeZ_none();
1870         // void COption_TypeZ_free(struct LDKCOption_TypeZ _res);
1871         public static native void COption_TypeZ_free(long _res);
1872         // struct LDKCOption_TypeZ COption_TypeZ_clone(const struct LDKCOption_TypeZ *NONNULL_PTR orig);
1873         public static native long COption_TypeZ_clone(long orig);
1874         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_ok(struct LDKCOption_TypeZ o);
1875         public static native long CResult_COption_TypeZDecodeErrorZ_ok(long o);
1876         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_err(struct LDKDecodeError e);
1877         public static native long CResult_COption_TypeZDecodeErrorZ_err(long e);
1878         // void CResult_COption_TypeZDecodeErrorZ_free(struct LDKCResult_COption_TypeZDecodeErrorZ _res);
1879         public static native void CResult_COption_TypeZDecodeErrorZ_free(long _res);
1880         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_clone(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR orig);
1881         public static native long CResult_COption_TypeZDecodeErrorZ_clone(long orig);
1882         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o);
1883         public static native long CResult_SiPrefixNoneZ_ok(SiPrefix o);
1884         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void);
1885         public static native long CResult_SiPrefixNoneZ_err();
1886         // void CResult_SiPrefixNoneZ_free(struct LDKCResult_SiPrefixNoneZ _res);
1887         public static native void CResult_SiPrefixNoneZ_free(long _res);
1888         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_clone(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR orig);
1889         public static native long CResult_SiPrefixNoneZ_clone(long orig);
1890         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_ok(struct LDKInvoice o);
1891         public static native long CResult_InvoiceNoneZ_ok(long o);
1892         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_err(void);
1893         public static native long CResult_InvoiceNoneZ_err();
1894         // void CResult_InvoiceNoneZ_free(struct LDKCResult_InvoiceNoneZ _res);
1895         public static native void CResult_InvoiceNoneZ_free(long _res);
1896         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_clone(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR orig);
1897         public static native long CResult_InvoiceNoneZ_clone(long orig);
1898         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_ok(struct LDKSignedRawInvoice o);
1899         public static native long CResult_SignedRawInvoiceNoneZ_ok(long o);
1900         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_err(void);
1901         public static native long CResult_SignedRawInvoiceNoneZ_err();
1902         // void CResult_SignedRawInvoiceNoneZ_free(struct LDKCResult_SignedRawInvoiceNoneZ _res);
1903         public static native void CResult_SignedRawInvoiceNoneZ_free(long _res);
1904         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_clone(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR orig);
1905         public static native long CResult_SignedRawInvoiceNoneZ_clone(long orig);
1906         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(const struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR orig);
1907         public static native long C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(long orig);
1908         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(struct LDKRawInvoice a, struct LDKThirtyTwoBytes b, struct LDKInvoiceSignature c);
1909         public static native long C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(long a, byte[] b, long c);
1910         // void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ _res);
1911         public static native void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(long _res);
1912         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o);
1913         public static native long CResult_PayeePubKeyErrorZ_ok(long o);
1914         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e);
1915         public static native long CResult_PayeePubKeyErrorZ_err(Secp256k1Error e);
1916         // void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res);
1917         public static native void CResult_PayeePubKeyErrorZ_free(long _res);
1918         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_clone(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR orig);
1919         public static native long CResult_PayeePubKeyErrorZ_clone(long orig);
1920         // void CVec_PrivateRouteZ_free(struct LDKCVec_PrivateRouteZ _res);
1921         public static native void CVec_PrivateRouteZ_free(long[] _res);
1922         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_ok(struct LDKPositiveTimestamp o);
1923         public static native long CResult_PositiveTimestampCreationErrorZ_ok(long o);
1924         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_err(enum LDKCreationError e);
1925         public static native long CResult_PositiveTimestampCreationErrorZ_err(CreationError e);
1926         // void CResult_PositiveTimestampCreationErrorZ_free(struct LDKCResult_PositiveTimestampCreationErrorZ _res);
1927         public static native void CResult_PositiveTimestampCreationErrorZ_free(long _res);
1928         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_clone(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR orig);
1929         public static native long CResult_PositiveTimestampCreationErrorZ_clone(long orig);
1930         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_ok(void);
1931         public static native long CResult_NoneSemanticErrorZ_ok();
1932         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_err(enum LDKSemanticError e);
1933         public static native long CResult_NoneSemanticErrorZ_err(SemanticError e);
1934         // void CResult_NoneSemanticErrorZ_free(struct LDKCResult_NoneSemanticErrorZ _res);
1935         public static native void CResult_NoneSemanticErrorZ_free(long _res);
1936         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_clone(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR orig);
1937         public static native long CResult_NoneSemanticErrorZ_clone(long orig);
1938         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_ok(struct LDKInvoice o);
1939         public static native long CResult_InvoiceSemanticErrorZ_ok(long o);
1940         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_err(enum LDKSemanticError e);
1941         public static native long CResult_InvoiceSemanticErrorZ_err(SemanticError e);
1942         // void CResult_InvoiceSemanticErrorZ_free(struct LDKCResult_InvoiceSemanticErrorZ _res);
1943         public static native void CResult_InvoiceSemanticErrorZ_free(long _res);
1944         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_clone(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR orig);
1945         public static native long CResult_InvoiceSemanticErrorZ_clone(long orig);
1946         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_ok(struct LDKDescription o);
1947         public static native long CResult_DescriptionCreationErrorZ_ok(long o);
1948         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_err(enum LDKCreationError e);
1949         public static native long CResult_DescriptionCreationErrorZ_err(CreationError e);
1950         // void CResult_DescriptionCreationErrorZ_free(struct LDKCResult_DescriptionCreationErrorZ _res);
1951         public static native void CResult_DescriptionCreationErrorZ_free(long _res);
1952         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_clone(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR orig);
1953         public static native long CResult_DescriptionCreationErrorZ_clone(long orig);
1954         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_ok(struct LDKExpiryTime o);
1955         public static native long CResult_ExpiryTimeCreationErrorZ_ok(long o);
1956         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_err(enum LDKCreationError e);
1957         public static native long CResult_ExpiryTimeCreationErrorZ_err(CreationError e);
1958         // void CResult_ExpiryTimeCreationErrorZ_free(struct LDKCResult_ExpiryTimeCreationErrorZ _res);
1959         public static native void CResult_ExpiryTimeCreationErrorZ_free(long _res);
1960         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_clone(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR orig);
1961         public static native long CResult_ExpiryTimeCreationErrorZ_clone(long orig);
1962         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_ok(struct LDKPrivateRoute o);
1963         public static native long CResult_PrivateRouteCreationErrorZ_ok(long o);
1964         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_err(enum LDKCreationError e);
1965         public static native long CResult_PrivateRouteCreationErrorZ_err(CreationError e);
1966         // void CResult_PrivateRouteCreationErrorZ_free(struct LDKCResult_PrivateRouteCreationErrorZ _res);
1967         public static native void CResult_PrivateRouteCreationErrorZ_free(long _res);
1968         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_clone(const struct LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR orig);
1969         public static native long CResult_PrivateRouteCreationErrorZ_clone(long orig);
1970         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
1971         public static native long CResult_StringErrorZ_ok(String o);
1972         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
1973         public static native long CResult_StringErrorZ_err(Secp256k1Error e);
1974         // void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
1975         public static native void CResult_StringErrorZ_free(long _res);
1976         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
1977         public static native long CResult_ChannelMonitorUpdateDecodeErrorZ_ok(long o);
1978         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
1979         public static native long CResult_ChannelMonitorUpdateDecodeErrorZ_err(long e);
1980         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
1981         public static native void CResult_ChannelMonitorUpdateDecodeErrorZ_free(long _res);
1982         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
1983         public static native long CResult_ChannelMonitorUpdateDecodeErrorZ_clone(long orig);
1984         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
1985         public static native long CResult_HTLCUpdateDecodeErrorZ_ok(long o);
1986         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
1987         public static native long CResult_HTLCUpdateDecodeErrorZ_err(long e);
1988         // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
1989         public static native void CResult_HTLCUpdateDecodeErrorZ_free(long _res);
1990         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
1991         public static native long CResult_HTLCUpdateDecodeErrorZ_clone(long orig);
1992         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
1993         public static native long CResult_NoneMonitorUpdateErrorZ_ok();
1994         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
1995         public static native long CResult_NoneMonitorUpdateErrorZ_err(long e);
1996         // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
1997         public static native void CResult_NoneMonitorUpdateErrorZ_free(long _res);
1998         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
1999         public static native long CResult_NoneMonitorUpdateErrorZ_clone(long orig);
2000         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
2001         public static native long C2Tuple_OutPointScriptZ_clone(long orig);
2002         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
2003         public static native long C2Tuple_OutPointScriptZ_new(long a, byte[] b);
2004         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
2005         public static native void C2Tuple_OutPointScriptZ_free(long _res);
2006         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
2007         public static native long C2Tuple_u32ScriptZ_clone(long orig);
2008         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
2009         public static native long C2Tuple_u32ScriptZ_new(int a, byte[] b);
2010         // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
2011         public static native void C2Tuple_u32ScriptZ_free(long _res);
2012         // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
2013         public static native void CVec_C2Tuple_u32ScriptZZ_free(long[] _res);
2014         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR orig);
2015         public static native long C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(long orig);
2016         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
2017         public static native long C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(byte[] a, long[] b);
2018         // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
2019         public static native void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(long _res);
2020         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
2021         public static native void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(long[] _res);
2022         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
2023         public static native void CVec_EventZ_free(long[] _res);
2024         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
2025         public static native void CVec_TransactionZ_free(byte[][] _res);
2026         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
2027         public static native long C2Tuple_u32TxOutZ_clone(long orig);
2028         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
2029         public static native long C2Tuple_u32TxOutZ_new(int a, long b);
2030         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
2031         public static native void C2Tuple_u32TxOutZ_free(long _res);
2032         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
2033         public static native void CVec_C2Tuple_u32TxOutZZ_free(long[] _res);
2034         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
2035         public static native long C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(long orig);
2036         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
2037         public static native long C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(byte[] a, long[] b);
2038         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
2039         public static native void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(long _res);
2040         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
2041         public static native void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(long[] _res);
2042         // void CVec_BalanceZ_free(struct LDKCVec_BalanceZ _res);
2043         public static native void CVec_BalanceZ_free(long[] _res);
2044         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
2045         public static native long CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(long o);
2046         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
2047         public static native long CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(long e);
2048         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
2049         public static native void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(long _res);
2050         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR orig);
2051         public static native long CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(long orig);
2052         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
2053         public static native long CResult_NoneLightningErrorZ_ok();
2054         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
2055         public static native long CResult_NoneLightningErrorZ_err(long e);
2056         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
2057         public static native void CResult_NoneLightningErrorZ_free(long _res);
2058         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
2059         public static native long CResult_NoneLightningErrorZ_clone(long orig);
2060         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_clone(const struct LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR orig);
2061         public static native long C2Tuple_PublicKeyTypeZ_clone(long orig);
2062         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_new(struct LDKPublicKey a, struct LDKType b);
2063         public static native long C2Tuple_PublicKeyTypeZ_new(byte[] a, long b);
2064         // void C2Tuple_PublicKeyTypeZ_free(struct LDKC2Tuple_PublicKeyTypeZ _res);
2065         public static native void C2Tuple_PublicKeyTypeZ_free(long _res);
2066         // void CVec_C2Tuple_PublicKeyTypeZZ_free(struct LDKCVec_C2Tuple_PublicKeyTypeZZ _res);
2067         public static native void CVec_C2Tuple_PublicKeyTypeZZ_free(long[] _res);
2068         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
2069         public static native long CResult_boolLightningErrorZ_ok(boolean o);
2070         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
2071         public static native long CResult_boolLightningErrorZ_err(long e);
2072         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
2073         public static native void CResult_boolLightningErrorZ_free(long _res);
2074         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
2075         public static native long CResult_boolLightningErrorZ_clone(long orig);
2076         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
2077         public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(long orig);
2078         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
2079         public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(long a, long b, long c);
2080         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
2081         public static native void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(long _res);
2082         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
2083         public static native void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(long[] _res);
2084         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
2085         public static native void CVec_NodeAnnouncementZ_free(long[] _res);
2086         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
2087         public static native void CVec_PublicKeyZ_free(byte[][] _res);
2088         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
2089         public static native long CResult_CVec_u8ZPeerHandleErrorZ_ok(byte[] o);
2090         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2091         public static native long CResult_CVec_u8ZPeerHandleErrorZ_err(long e);
2092         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
2093         public static native void CResult_CVec_u8ZPeerHandleErrorZ_free(long _res);
2094         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
2095         public static native long CResult_CVec_u8ZPeerHandleErrorZ_clone(long orig);
2096         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
2097         public static native long CResult_NonePeerHandleErrorZ_ok();
2098         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
2099         public static native long CResult_NonePeerHandleErrorZ_err(long e);
2100         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
2101         public static native void CResult_NonePeerHandleErrorZ_free(long _res);
2102         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
2103         public static native long CResult_NonePeerHandleErrorZ_clone(long orig);
2104         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
2105         public static native long CResult_boolPeerHandleErrorZ_ok(boolean o);
2106         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2107         public static native long CResult_boolPeerHandleErrorZ_err(long e);
2108         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
2109         public static native void CResult_boolPeerHandleErrorZ_free(long _res);
2110         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
2111         public static native long CResult_boolPeerHandleErrorZ_clone(long orig);
2112         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_ok(struct LDKNodeId o);
2113         public static native long CResult_NodeIdDecodeErrorZ_ok(long o);
2114         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_err(struct LDKDecodeError e);
2115         public static native long CResult_NodeIdDecodeErrorZ_err(long e);
2116         // void CResult_NodeIdDecodeErrorZ_free(struct LDKCResult_NodeIdDecodeErrorZ _res);
2117         public static native void CResult_NodeIdDecodeErrorZ_free(long _res);
2118         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_clone(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR orig);
2119         public static native long CResult_NodeIdDecodeErrorZ_clone(long orig);
2120         // struct LDKCOption_AccessZ COption_AccessZ_some(struct LDKAccess o);
2121         public static native long COption_AccessZ_some(long o);
2122         // struct LDKCOption_AccessZ COption_AccessZ_none(void);
2123         public static native long COption_AccessZ_none();
2124         // void COption_AccessZ_free(struct LDKCOption_AccessZ _res);
2125         public static native void COption_AccessZ_free(long _res);
2126         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
2127         public static native long CResult_DirectionalChannelInfoDecodeErrorZ_ok(long o);
2128         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2129         public static native long CResult_DirectionalChannelInfoDecodeErrorZ_err(long e);
2130         // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
2131         public static native void CResult_DirectionalChannelInfoDecodeErrorZ_free(long _res);
2132         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2133         public static native long CResult_DirectionalChannelInfoDecodeErrorZ_clone(long orig);
2134         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
2135         public static native long CResult_ChannelInfoDecodeErrorZ_ok(long o);
2136         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2137         public static native long CResult_ChannelInfoDecodeErrorZ_err(long e);
2138         // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
2139         public static native void CResult_ChannelInfoDecodeErrorZ_free(long _res);
2140         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2141         public static native long CResult_ChannelInfoDecodeErrorZ_clone(long orig);
2142         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
2143         public static native long CResult_RoutingFeesDecodeErrorZ_ok(long o);
2144         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
2145         public static native long CResult_RoutingFeesDecodeErrorZ_err(long e);
2146         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
2147         public static native void CResult_RoutingFeesDecodeErrorZ_free(long _res);
2148         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
2149         public static native long CResult_RoutingFeesDecodeErrorZ_clone(long orig);
2150         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
2151         public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_ok(long o);
2152         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
2153         public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_err(long e);
2154         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
2155         public static native void CResult_NodeAnnouncementInfoDecodeErrorZ_free(long _res);
2156         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
2157         public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_clone(long orig);
2158         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
2159         public static native void CVec_u64Z_free(long[] _res);
2160         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
2161         public static native long CResult_NodeInfoDecodeErrorZ_ok(long o);
2162         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
2163         public static native long CResult_NodeInfoDecodeErrorZ_err(long e);
2164         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
2165         public static native void CResult_NodeInfoDecodeErrorZ_free(long _res);
2166         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
2167         public static native long CResult_NodeInfoDecodeErrorZ_clone(long orig);
2168         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
2169         public static native long CResult_NetworkGraphDecodeErrorZ_ok(long o);
2170         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
2171         public static native long CResult_NetworkGraphDecodeErrorZ_err(long e);
2172         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
2173         public static native void CResult_NetworkGraphDecodeErrorZ_free(long _res);
2174         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
2175         public static native long CResult_NetworkGraphDecodeErrorZ_clone(long orig);
2176         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_some(struct LDKCVec_NetAddressZ o);
2177         public static native long COption_CVec_NetAddressZZ_some(long[] o);
2178         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_none(void);
2179         public static native long COption_CVec_NetAddressZZ_none();
2180         // void COption_CVec_NetAddressZZ_free(struct LDKCOption_CVec_NetAddressZZ _res);
2181         public static native void COption_CVec_NetAddressZZ_free(long _res);
2182         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_clone(const struct LDKCOption_CVec_NetAddressZZ *NONNULL_PTR orig);
2183         public static native long COption_CVec_NetAddressZZ_clone(long orig);
2184         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
2185         public static native long CResult_NetAddressu8Z_ok(long o);
2186         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
2187         public static native long CResult_NetAddressu8Z_err(byte e);
2188         // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
2189         public static native void CResult_NetAddressu8Z_free(long _res);
2190         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
2191         public static native long CResult_NetAddressu8Z_clone(long orig);
2192         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
2193         public static native long CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(long o);
2194         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
2195         public static native long CResult_CResult_NetAddressu8ZDecodeErrorZ_err(long e);
2196         // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
2197         public static native void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(long _res);
2198         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
2199         public static native long CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(long orig);
2200         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
2201         public static native long CResult_NetAddressDecodeErrorZ_ok(long o);
2202         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
2203         public static native long CResult_NetAddressDecodeErrorZ_err(long e);
2204         // void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
2205         public static native void CResult_NetAddressDecodeErrorZ_free(long _res);
2206         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
2207         public static native long CResult_NetAddressDecodeErrorZ_clone(long orig);
2208         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
2209         public static native void CVec_UpdateAddHTLCZ_free(long[] _res);
2210         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
2211         public static native void CVec_UpdateFulfillHTLCZ_free(long[] _res);
2212         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
2213         public static native void CVec_UpdateFailHTLCZ_free(long[] _res);
2214         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
2215         public static native void CVec_UpdateFailMalformedHTLCZ_free(long[] _res);
2216         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
2217         public static native long CResult_AcceptChannelDecodeErrorZ_ok(long o);
2218         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
2219         public static native long CResult_AcceptChannelDecodeErrorZ_err(long e);
2220         // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
2221         public static native void CResult_AcceptChannelDecodeErrorZ_free(long _res);
2222         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
2223         public static native long CResult_AcceptChannelDecodeErrorZ_clone(long orig);
2224         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
2225         public static native long CResult_AnnouncementSignaturesDecodeErrorZ_ok(long o);
2226         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
2227         public static native long CResult_AnnouncementSignaturesDecodeErrorZ_err(long e);
2228         // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
2229         public static native void CResult_AnnouncementSignaturesDecodeErrorZ_free(long _res);
2230         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
2231         public static native long CResult_AnnouncementSignaturesDecodeErrorZ_clone(long orig);
2232         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
2233         public static native long CResult_ChannelReestablishDecodeErrorZ_ok(long o);
2234         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
2235         public static native long CResult_ChannelReestablishDecodeErrorZ_err(long e);
2236         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
2237         public static native void CResult_ChannelReestablishDecodeErrorZ_free(long _res);
2238         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
2239         public static native long CResult_ChannelReestablishDecodeErrorZ_clone(long orig);
2240         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
2241         public static native long CResult_ClosingSignedDecodeErrorZ_ok(long o);
2242         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
2243         public static native long CResult_ClosingSignedDecodeErrorZ_err(long e);
2244         // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
2245         public static native void CResult_ClosingSignedDecodeErrorZ_free(long _res);
2246         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
2247         public static native long CResult_ClosingSignedDecodeErrorZ_clone(long orig);
2248         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(struct LDKClosingSignedFeeRange o);
2249         public static native long CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(long o);
2250         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_err(struct LDKDecodeError e);
2251         public static native long CResult_ClosingSignedFeeRangeDecodeErrorZ_err(long e);
2252         // void CResult_ClosingSignedFeeRangeDecodeErrorZ_free(struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ _res);
2253         public static native void CResult_ClosingSignedFeeRangeDecodeErrorZ_free(long _res);
2254         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR orig);
2255         public static native long CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(long orig);
2256         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
2257         public static native long CResult_CommitmentSignedDecodeErrorZ_ok(long o);
2258         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
2259         public static native long CResult_CommitmentSignedDecodeErrorZ_err(long e);
2260         // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
2261         public static native void CResult_CommitmentSignedDecodeErrorZ_free(long _res);
2262         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
2263         public static native long CResult_CommitmentSignedDecodeErrorZ_clone(long orig);
2264         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
2265         public static native long CResult_FundingCreatedDecodeErrorZ_ok(long o);
2266         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
2267         public static native long CResult_FundingCreatedDecodeErrorZ_err(long e);
2268         // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
2269         public static native void CResult_FundingCreatedDecodeErrorZ_free(long _res);
2270         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
2271         public static native long CResult_FundingCreatedDecodeErrorZ_clone(long orig);
2272         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
2273         public static native long CResult_FundingSignedDecodeErrorZ_ok(long o);
2274         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
2275         public static native long CResult_FundingSignedDecodeErrorZ_err(long e);
2276         // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
2277         public static native void CResult_FundingSignedDecodeErrorZ_free(long _res);
2278         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
2279         public static native long CResult_FundingSignedDecodeErrorZ_clone(long orig);
2280         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
2281         public static native long CResult_FundingLockedDecodeErrorZ_ok(long o);
2282         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
2283         public static native long CResult_FundingLockedDecodeErrorZ_err(long e);
2284         // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
2285         public static native void CResult_FundingLockedDecodeErrorZ_free(long _res);
2286         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
2287         public static native long CResult_FundingLockedDecodeErrorZ_clone(long orig);
2288         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
2289         public static native long CResult_InitDecodeErrorZ_ok(long o);
2290         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
2291         public static native long CResult_InitDecodeErrorZ_err(long e);
2292         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
2293         public static native void CResult_InitDecodeErrorZ_free(long _res);
2294         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
2295         public static native long CResult_InitDecodeErrorZ_clone(long orig);
2296         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
2297         public static native long CResult_OpenChannelDecodeErrorZ_ok(long o);
2298         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
2299         public static native long CResult_OpenChannelDecodeErrorZ_err(long e);
2300         // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
2301         public static native void CResult_OpenChannelDecodeErrorZ_free(long _res);
2302         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
2303         public static native long CResult_OpenChannelDecodeErrorZ_clone(long orig);
2304         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
2305         public static native long CResult_RevokeAndACKDecodeErrorZ_ok(long o);
2306         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
2307         public static native long CResult_RevokeAndACKDecodeErrorZ_err(long e);
2308         // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
2309         public static native void CResult_RevokeAndACKDecodeErrorZ_free(long _res);
2310         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
2311         public static native long CResult_RevokeAndACKDecodeErrorZ_clone(long orig);
2312         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
2313         public static native long CResult_ShutdownDecodeErrorZ_ok(long o);
2314         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
2315         public static native long CResult_ShutdownDecodeErrorZ_err(long e);
2316         // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
2317         public static native void CResult_ShutdownDecodeErrorZ_free(long _res);
2318         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
2319         public static native long CResult_ShutdownDecodeErrorZ_clone(long orig);
2320         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
2321         public static native long CResult_UpdateFailHTLCDecodeErrorZ_ok(long o);
2322         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
2323         public static native long CResult_UpdateFailHTLCDecodeErrorZ_err(long e);
2324         // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
2325         public static native void CResult_UpdateFailHTLCDecodeErrorZ_free(long _res);
2326         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
2327         public static native long CResult_UpdateFailHTLCDecodeErrorZ_clone(long orig);
2328         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
2329         public static native long CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(long o);
2330         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
2331         public static native long CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(long e);
2332         // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
2333         public static native void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(long _res);
2334         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
2335         public static native long CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(long orig);
2336         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
2337         public static native long CResult_UpdateFeeDecodeErrorZ_ok(long o);
2338         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
2339         public static native long CResult_UpdateFeeDecodeErrorZ_err(long e);
2340         // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
2341         public static native void CResult_UpdateFeeDecodeErrorZ_free(long _res);
2342         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
2343         public static native long CResult_UpdateFeeDecodeErrorZ_clone(long orig);
2344         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
2345         public static native long CResult_UpdateFulfillHTLCDecodeErrorZ_ok(long o);
2346         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
2347         public static native long CResult_UpdateFulfillHTLCDecodeErrorZ_err(long e);
2348         // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
2349         public static native void CResult_UpdateFulfillHTLCDecodeErrorZ_free(long _res);
2350         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
2351         public static native long CResult_UpdateFulfillHTLCDecodeErrorZ_clone(long orig);
2352         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
2353         public static native long CResult_UpdateAddHTLCDecodeErrorZ_ok(long o);
2354         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
2355         public static native long CResult_UpdateAddHTLCDecodeErrorZ_err(long e);
2356         // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
2357         public static native void CResult_UpdateAddHTLCDecodeErrorZ_free(long _res);
2358         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
2359         public static native long CResult_UpdateAddHTLCDecodeErrorZ_clone(long orig);
2360         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
2361         public static native long CResult_PingDecodeErrorZ_ok(long o);
2362         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
2363         public static native long CResult_PingDecodeErrorZ_err(long e);
2364         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
2365         public static native void CResult_PingDecodeErrorZ_free(long _res);
2366         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
2367         public static native long CResult_PingDecodeErrorZ_clone(long orig);
2368         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
2369         public static native long CResult_PongDecodeErrorZ_ok(long o);
2370         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
2371         public static native long CResult_PongDecodeErrorZ_err(long e);
2372         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
2373         public static native void CResult_PongDecodeErrorZ_free(long _res);
2374         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
2375         public static native long CResult_PongDecodeErrorZ_clone(long orig);
2376         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
2377         public static native long CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(long o);
2378         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
2379         public static native long CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(long e);
2380         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
2381         public static native void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(long _res);
2382         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
2383         public static native long CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(long orig);
2384         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
2385         public static native long CResult_ChannelAnnouncementDecodeErrorZ_ok(long o);
2386         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
2387         public static native long CResult_ChannelAnnouncementDecodeErrorZ_err(long e);
2388         // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
2389         public static native void CResult_ChannelAnnouncementDecodeErrorZ_free(long _res);
2390         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
2391         public static native long CResult_ChannelAnnouncementDecodeErrorZ_clone(long orig);
2392         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
2393         public static native long CResult_UnsignedChannelUpdateDecodeErrorZ_ok(long o);
2394         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2395         public static native long CResult_UnsignedChannelUpdateDecodeErrorZ_err(long e);
2396         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
2397         public static native void CResult_UnsignedChannelUpdateDecodeErrorZ_free(long _res);
2398         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
2399         public static native long CResult_UnsignedChannelUpdateDecodeErrorZ_clone(long orig);
2400         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
2401         public static native long CResult_ChannelUpdateDecodeErrorZ_ok(long o);
2402         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2403         public static native long CResult_ChannelUpdateDecodeErrorZ_err(long e);
2404         // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
2405         public static native void CResult_ChannelUpdateDecodeErrorZ_free(long _res);
2406         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
2407         public static native long CResult_ChannelUpdateDecodeErrorZ_clone(long orig);
2408         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
2409         public static native long CResult_ErrorMessageDecodeErrorZ_ok(long o);
2410         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
2411         public static native long CResult_ErrorMessageDecodeErrorZ_err(long e);
2412         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
2413         public static native void CResult_ErrorMessageDecodeErrorZ_free(long _res);
2414         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
2415         public static native long CResult_ErrorMessageDecodeErrorZ_clone(long orig);
2416         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
2417         public static native long CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(long o);
2418         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
2419         public static native long CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(long e);
2420         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
2421         public static native void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(long _res);
2422         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
2423         public static native long CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(long orig);
2424         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
2425         public static native long CResult_NodeAnnouncementDecodeErrorZ_ok(long o);
2426         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
2427         public static native long CResult_NodeAnnouncementDecodeErrorZ_err(long e);
2428         // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
2429         public static native void CResult_NodeAnnouncementDecodeErrorZ_free(long _res);
2430         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
2431         public static native long CResult_NodeAnnouncementDecodeErrorZ_clone(long orig);
2432         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
2433         public static native long CResult_QueryShortChannelIdsDecodeErrorZ_ok(long o);
2434         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
2435         public static native long CResult_QueryShortChannelIdsDecodeErrorZ_err(long e);
2436         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
2437         public static native void CResult_QueryShortChannelIdsDecodeErrorZ_free(long _res);
2438         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
2439         public static native long CResult_QueryShortChannelIdsDecodeErrorZ_clone(long orig);
2440         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
2441         public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(long o);
2442         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
2443         public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(long e);
2444         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
2445         public static native void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(long _res);
2446         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
2447         public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(long orig);
2448         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
2449         public static native long CResult_QueryChannelRangeDecodeErrorZ_ok(long o);
2450         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
2451         public static native long CResult_QueryChannelRangeDecodeErrorZ_err(long e);
2452         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
2453         public static native void CResult_QueryChannelRangeDecodeErrorZ_free(long _res);
2454         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
2455         public static native long CResult_QueryChannelRangeDecodeErrorZ_clone(long orig);
2456         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
2457         public static native long CResult_ReplyChannelRangeDecodeErrorZ_ok(long o);
2458         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
2459         public static native long CResult_ReplyChannelRangeDecodeErrorZ_err(long e);
2460         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
2461         public static native void CResult_ReplyChannelRangeDecodeErrorZ_free(long _res);
2462         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
2463         public static native long CResult_ReplyChannelRangeDecodeErrorZ_clone(long orig);
2464         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
2465         public static native long CResult_GossipTimestampFilterDecodeErrorZ_ok(long o);
2466         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
2467         public static native long CResult_GossipTimestampFilterDecodeErrorZ_err(long e);
2468         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
2469         public static native void CResult_GossipTimestampFilterDecodeErrorZ_free(long _res);
2470         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
2471         public static native long CResult_GossipTimestampFilterDecodeErrorZ_clone(long orig);
2472         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_ok(struct LDKInvoice o);
2473         public static native long CResult_InvoiceSignOrCreationErrorZ_ok(long o);
2474         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e);
2475         public static native long CResult_InvoiceSignOrCreationErrorZ_err(long e);
2476         // void CResult_InvoiceSignOrCreationErrorZ_free(struct LDKCResult_InvoiceSignOrCreationErrorZ _res);
2477         public static native void CResult_InvoiceSignOrCreationErrorZ_free(long _res);
2478         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig);
2479         public static native long CResult_InvoiceSignOrCreationErrorZ_clone(long orig);
2480         // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o);
2481         public static native long COption_FilterZ_some(long o);
2482         // struct LDKCOption_FilterZ COption_FilterZ_none(void);
2483         public static native long COption_FilterZ_none();
2484         // void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
2485         public static native void COption_FilterZ_free(long _res);
2486         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_ok(struct LDKLockedChannelMonitor o);
2487         public static native long CResult_LockedChannelMonitorNoneZ_ok(long o);
2488         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_err(void);
2489         public static native long CResult_LockedChannelMonitorNoneZ_err();
2490         // void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res);
2491         public static native void CResult_LockedChannelMonitorNoneZ_free(long _res);
2492         // void CVec_OutPointZ_free(struct LDKCVec_OutPointZ _res);
2493         public static native void CVec_OutPointZ_free(long[] _res);
2494         // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
2495         public static native void PaymentPurpose_free(long this_ptr);
2496         // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
2497         public static native long PaymentPurpose_clone(long orig);
2498         // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret, uint64_t user_payment_id);
2499         public static native long PaymentPurpose_invoice_payment(byte[] payment_preimage, byte[] payment_secret, long user_payment_id);
2500         // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
2501         public static native long PaymentPurpose_spontaneous_payment(byte[] a);
2502         // void ClosureReason_free(struct LDKClosureReason this_ptr);
2503         public static native void ClosureReason_free(long this_ptr);
2504         // struct LDKClosureReason ClosureReason_clone(const struct LDKClosureReason *NONNULL_PTR orig);
2505         public static native long ClosureReason_clone(long orig);
2506         // struct LDKClosureReason ClosureReason_counterparty_force_closed(struct LDKStr peer_msg);
2507         public static native long ClosureReason_counterparty_force_closed(String peer_msg);
2508         // struct LDKClosureReason ClosureReason_holder_force_closed(void);
2509         public static native long ClosureReason_holder_force_closed();
2510         // struct LDKClosureReason ClosureReason_cooperative_closure(void);
2511         public static native long ClosureReason_cooperative_closure();
2512         // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void);
2513         public static native long ClosureReason_commitment_tx_confirmed();
2514         // struct LDKClosureReason ClosureReason_processing_error(struct LDKStr err);
2515         public static native long ClosureReason_processing_error(String err);
2516         // struct LDKClosureReason ClosureReason_disconnected_peer(void);
2517         public static native long ClosureReason_disconnected_peer();
2518         // struct LDKClosureReason ClosureReason_outdated_channel_manager(void);
2519         public static native long ClosureReason_outdated_channel_manager();
2520         // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
2521         public static native byte[] ClosureReason_write(long obj);
2522         // void Event_free(struct LDKEvent this_ptr);
2523         public static native void Event_free(long this_ptr);
2524         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
2525         public static native long Event_clone(long orig);
2526         // struct LDKEvent Event_funding_generation_ready(struct LDKThirtyTwoBytes temporary_channel_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, uint64_t user_channel_id);
2527         public static native long Event_funding_generation_ready(byte[] temporary_channel_id, long channel_value_satoshis, byte[] output_script, long user_channel_id);
2528         // struct LDKEvent Event_payment_received(struct LDKThirtyTwoBytes payment_hash, uint64_t amt, struct LDKPaymentPurpose purpose);
2529         public static native long Event_payment_received(byte[] payment_hash, long amt, long purpose);
2530         // struct LDKEvent Event_payment_sent(struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_hash);
2531         public static native long Event_payment_sent(byte[] payment_preimage, byte[] payment_hash);
2532         // struct LDKEvent Event_payment_path_failed(struct LDKThirtyTwoBytes payment_hash, bool rejected_by_dest, struct LDKCOption_NetworkUpdateZ network_update, bool all_paths_failed, struct LDKCVec_RouteHopZ path, struct LDKCOption_u64Z short_channel_id);
2533         public static native long Event_payment_path_failed(byte[] payment_hash, boolean rejected_by_dest, long network_update, boolean all_paths_failed, long[] path, long short_channel_id);
2534         // struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
2535         public static native long Event_pending_htlcs_forwardable(long time_forwardable);
2536         // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs);
2537         public static native long Event_spendable_outputs(long[] outputs);
2538         // struct LDKEvent Event_payment_forwarded(struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx);
2539         public static native long Event_payment_forwarded(long fee_earned_msat, boolean claim_from_onchain_tx);
2540         // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, uint64_t user_channel_id, struct LDKClosureReason reason);
2541         public static native long Event_channel_closed(byte[] channel_id, long user_channel_id, long reason);
2542         // struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction);
2543         public static native long Event_discard_funding(byte[] channel_id, byte[] transaction);
2544         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
2545         public static native byte[] Event_write(long obj);
2546         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
2547         public static native void MessageSendEvent_free(long this_ptr);
2548         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
2549         public static native long MessageSendEvent_clone(long orig);
2550         // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel(struct LDKPublicKey node_id, struct LDKAcceptChannel msg);
2551         public static native long MessageSendEvent_send_accept_channel(byte[] node_id, long msg);
2552         // struct LDKMessageSendEvent MessageSendEvent_send_open_channel(struct LDKPublicKey node_id, struct LDKOpenChannel msg);
2553         public static native long MessageSendEvent_send_open_channel(byte[] node_id, long msg);
2554         // struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPublicKey node_id, struct LDKFundingCreated msg);
2555         public static native long MessageSendEvent_send_funding_created(byte[] node_id, long msg);
2556         // struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
2557         public static native long MessageSendEvent_send_funding_signed(byte[] node_id, long msg);
2558         // struct LDKMessageSendEvent MessageSendEvent_send_funding_locked(struct LDKPublicKey node_id, struct LDKFundingLocked msg);
2559         public static native long MessageSendEvent_send_funding_locked(byte[] node_id, long msg);
2560         // struct LDKMessageSendEvent MessageSendEvent_send_announcement_signatures(struct LDKPublicKey node_id, struct LDKAnnouncementSignatures msg);
2561         public static native long MessageSendEvent_send_announcement_signatures(byte[] node_id, long msg);
2562         // struct LDKMessageSendEvent MessageSendEvent_update_htlcs(struct LDKPublicKey node_id, struct LDKCommitmentUpdate updates);
2563         public static native long MessageSendEvent_update_htlcs(byte[] node_id, long updates);
2564         // struct LDKMessageSendEvent MessageSendEvent_send_revoke_and_ack(struct LDKPublicKey node_id, struct LDKRevokeAndACK msg);
2565         public static native long MessageSendEvent_send_revoke_and_ack(byte[] node_id, long msg);
2566         // struct LDKMessageSendEvent MessageSendEvent_send_closing_signed(struct LDKPublicKey node_id, struct LDKClosingSigned msg);
2567         public static native long MessageSendEvent_send_closing_signed(byte[] node_id, long msg);
2568         // struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey node_id, struct LDKShutdown msg);
2569         public static native long MessageSendEvent_send_shutdown(byte[] node_id, long msg);
2570         // struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
2571         public static native long MessageSendEvent_send_channel_reestablish(byte[] node_id, long msg);
2572         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
2573         public static native long MessageSendEvent_broadcast_channel_announcement(long msg, long update_msg);
2574         // struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
2575         public static native long MessageSendEvent_broadcast_node_announcement(long msg);
2576         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_update(struct LDKChannelUpdate msg);
2577         public static native long MessageSendEvent_broadcast_channel_update(long msg);
2578         // struct LDKMessageSendEvent MessageSendEvent_send_channel_update(struct LDKPublicKey node_id, struct LDKChannelUpdate msg);
2579         public static native long MessageSendEvent_send_channel_update(byte[] node_id, long msg);
2580         // struct LDKMessageSendEvent MessageSendEvent_handle_error(struct LDKPublicKey node_id, struct LDKErrorAction action);
2581         public static native long MessageSendEvent_handle_error(byte[] node_id, long action);
2582         // struct LDKMessageSendEvent MessageSendEvent_send_channel_range_query(struct LDKPublicKey node_id, struct LDKQueryChannelRange msg);
2583         public static native long MessageSendEvent_send_channel_range_query(byte[] node_id, long msg);
2584         // struct LDKMessageSendEvent MessageSendEvent_send_short_ids_query(struct LDKPublicKey node_id, struct LDKQueryShortChannelIds msg);
2585         public static native long MessageSendEvent_send_short_ids_query(byte[] node_id, long msg);
2586         // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
2587         public static native long MessageSendEvent_send_reply_channel_range(byte[] node_id, long msg);
2588         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
2589         public static native void MessageSendEventsProvider_free(long this_ptr);
2590         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
2591         public static native void EventsProvider_free(long this_ptr);
2592         // void EventHandler_free(struct LDKEventHandler this_ptr);
2593         public static native void EventHandler_free(long this_ptr);
2594         // void APIError_free(struct LDKAPIError this_ptr);
2595         public static native void APIError_free(long this_ptr);
2596         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
2597         public static native long APIError_clone(long orig);
2598         // struct LDKAPIError APIError_apimisuse_error(struct LDKStr err);
2599         public static native long APIError_apimisuse_error(String err);
2600         // struct LDKAPIError APIError_fee_rate_too_high(struct LDKStr err, uint32_t feerate);
2601         public static native long APIError_fee_rate_too_high(String err, int feerate);
2602         // struct LDKAPIError APIError_route_error(struct LDKStr err);
2603         public static native long APIError_route_error(String err);
2604         // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
2605         public static native long APIError_channel_unavailable(String err);
2606         // struct LDKAPIError APIError_monitor_update_failed(void);
2607         public static native long APIError_monitor_update_failed();
2608         // struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
2609         public static native long APIError_incompatible_shutdown_script(long script);
2610         // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
2611         public static native long sign(byte[] msg, byte[] sk);
2612         // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
2613         public static native long recover_pk(byte[] msg, String sig);
2614         // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
2615         public static native boolean verify(byte[] msg, String sig, byte[] pk);
2616         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
2617         public static native Level Level_clone(long orig);
2618         // enum LDKLevel Level_trace(void);
2619         public static native Level Level_trace();
2620         // enum LDKLevel Level_debug(void);
2621         public static native Level Level_debug();
2622         // enum LDKLevel Level_info(void);
2623         public static native Level Level_info();
2624         // enum LDKLevel Level_warn(void);
2625         public static native Level Level_warn();
2626         // enum LDKLevel Level_error(void);
2627         public static native Level Level_error();
2628         // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
2629         public static native boolean Level_eq(long a, long b);
2630         // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
2631         public static native long Level_hash(long o);
2632         // MUST_USE_RES enum LDKLevel Level_max(void);
2633         public static native Level Level_max();
2634         // void Logger_free(struct LDKLogger this_ptr);
2635         public static native void Logger_free(long this_ptr);
2636         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
2637         public static native void ChannelHandshakeConfig_free(long this_obj);
2638         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
2639         public static native int ChannelHandshakeConfig_get_minimum_depth(long this_ptr);
2640         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
2641         public static native void ChannelHandshakeConfig_set_minimum_depth(long this_ptr, int val);
2642         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
2643         public static native short ChannelHandshakeConfig_get_our_to_self_delay(long this_ptr);
2644         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
2645         public static native void ChannelHandshakeConfig_set_our_to_self_delay(long this_ptr, short val);
2646         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
2647         public static native long ChannelHandshakeConfig_get_our_htlc_minimum_msat(long this_ptr);
2648         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
2649         public static native void ChannelHandshakeConfig_set_our_htlc_minimum_msat(long this_ptr, long val);
2650         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_new(uint32_t minimum_depth_arg, uint16_t our_to_self_delay_arg, uint64_t our_htlc_minimum_msat_arg);
2651         public static native long ChannelHandshakeConfig_new(int minimum_depth_arg, short our_to_self_delay_arg, long our_htlc_minimum_msat_arg);
2652         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
2653         public static native long ChannelHandshakeConfig_clone(long orig);
2654         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
2655         public static native long ChannelHandshakeConfig_default();
2656         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
2657         public static native void ChannelHandshakeLimits_free(long this_obj);
2658         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
2659         public static native long ChannelHandshakeLimits_get_min_funding_satoshis(long this_ptr);
2660         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
2661         public static native void ChannelHandshakeLimits_set_min_funding_satoshis(long this_ptr, long val);
2662         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
2663         public static native long ChannelHandshakeLimits_get_max_htlc_minimum_msat(long this_ptr);
2664         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
2665         public static native void ChannelHandshakeLimits_set_max_htlc_minimum_msat(long this_ptr, long val);
2666         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
2667         public static native long ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(long this_ptr);
2668         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
2669         public static native void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(long this_ptr, long val);
2670         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
2671         public static native long ChannelHandshakeLimits_get_max_channel_reserve_satoshis(long this_ptr);
2672         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
2673         public static native void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(long this_ptr, long val);
2674         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
2675         public static native short ChannelHandshakeLimits_get_min_max_accepted_htlcs(long this_ptr);
2676         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
2677         public static native void ChannelHandshakeLimits_set_min_max_accepted_htlcs(long this_ptr, short val);
2678         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
2679         public static native int ChannelHandshakeLimits_get_max_minimum_depth(long this_ptr);
2680         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
2681         public static native void ChannelHandshakeLimits_set_max_minimum_depth(long this_ptr, int val);
2682         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
2683         public static native boolean ChannelHandshakeLimits_get_force_announced_channel_preference(long this_ptr);
2684         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
2685         public static native void ChannelHandshakeLimits_set_force_announced_channel_preference(long this_ptr, boolean val);
2686         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
2687         public static native short ChannelHandshakeLimits_get_their_to_self_delay(long this_ptr);
2688         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
2689         public static native void ChannelHandshakeLimits_set_their_to_self_delay(long this_ptr, short val);
2690         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_new(uint64_t min_funding_satoshis_arg, uint64_t max_htlc_minimum_msat_arg, uint64_t min_max_htlc_value_in_flight_msat_arg, uint64_t max_channel_reserve_satoshis_arg, uint16_t min_max_accepted_htlcs_arg, uint32_t max_minimum_depth_arg, bool force_announced_channel_preference_arg, uint16_t their_to_self_delay_arg);
2691         public static native long ChannelHandshakeLimits_new(long min_funding_satoshis_arg, long max_htlc_minimum_msat_arg, long min_max_htlc_value_in_flight_msat_arg, long max_channel_reserve_satoshis_arg, short min_max_accepted_htlcs_arg, int max_minimum_depth_arg, boolean force_announced_channel_preference_arg, short their_to_self_delay_arg);
2692         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
2693         public static native long ChannelHandshakeLimits_clone(long orig);
2694         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
2695         public static native long ChannelHandshakeLimits_default();
2696         // void ChannelConfig_free(struct LDKChannelConfig this_obj);
2697         public static native void ChannelConfig_free(long this_obj);
2698         // uint32_t ChannelConfig_get_forwarding_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
2699         public static native int ChannelConfig_get_forwarding_fee_proportional_millionths(long this_ptr);
2700         // void ChannelConfig_set_forwarding_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
2701         public static native void ChannelConfig_set_forwarding_fee_proportional_millionths(long this_ptr, int val);
2702         // uint32_t ChannelConfig_get_forwarding_fee_base_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
2703         public static native int ChannelConfig_get_forwarding_fee_base_msat(long this_ptr);
2704         // void ChannelConfig_set_forwarding_fee_base_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
2705         public static native void ChannelConfig_set_forwarding_fee_base_msat(long this_ptr, int val);
2706         // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
2707         public static native short ChannelConfig_get_cltv_expiry_delta(long this_ptr);
2708         // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
2709         public static native void ChannelConfig_set_cltv_expiry_delta(long this_ptr, short val);
2710         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
2711         public static native boolean ChannelConfig_get_announced_channel(long this_ptr);
2712         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
2713         public static native void ChannelConfig_set_announced_channel(long this_ptr, boolean val);
2714         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
2715         public static native boolean ChannelConfig_get_commit_upfront_shutdown_pubkey(long this_ptr);
2716         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
2717         public static native void ChannelConfig_set_commit_upfront_shutdown_pubkey(long this_ptr, boolean val);
2718         // uint64_t ChannelConfig_get_max_dust_htlc_exposure_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
2719         public static native long ChannelConfig_get_max_dust_htlc_exposure_msat(long this_ptr);
2720         // void ChannelConfig_set_max_dust_htlc_exposure_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
2721         public static native void ChannelConfig_set_max_dust_htlc_exposure_msat(long this_ptr, long val);
2722         // uint64_t ChannelConfig_get_force_close_avoidance_max_fee_satoshis(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
2723         public static native long ChannelConfig_get_force_close_avoidance_max_fee_satoshis(long this_ptr);
2724         // void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
2725         public static native void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(long this_ptr, long val);
2726         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t forwarding_fee_proportional_millionths_arg, uint32_t forwarding_fee_base_msat_arg, uint16_t cltv_expiry_delta_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg, uint64_t max_dust_htlc_exposure_msat_arg, uint64_t force_close_avoidance_max_fee_satoshis_arg);
2727         public static native long ChannelConfig_new(int forwarding_fee_proportional_millionths_arg, int forwarding_fee_base_msat_arg, short cltv_expiry_delta_arg, boolean announced_channel_arg, boolean commit_upfront_shutdown_pubkey_arg, long max_dust_htlc_exposure_msat_arg, long force_close_avoidance_max_fee_satoshis_arg);
2728         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
2729         public static native long ChannelConfig_clone(long orig);
2730         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
2731         public static native long ChannelConfig_default();
2732         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
2733         public static native byte[] ChannelConfig_write(long obj);
2734         // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
2735         public static native long ChannelConfig_read(byte[] ser);
2736         // void UserConfig_free(struct LDKUserConfig this_obj);
2737         public static native void UserConfig_free(long this_obj);
2738         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
2739         public static native long UserConfig_get_own_channel_config(long this_ptr);
2740         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
2741         public static native void UserConfig_set_own_channel_config(long this_ptr, long val);
2742         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
2743         public static native long UserConfig_get_peer_channel_config_limits(long this_ptr);
2744         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
2745         public static native void UserConfig_set_peer_channel_config_limits(long this_ptr, long val);
2746         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
2747         public static native long UserConfig_get_channel_options(long this_ptr);
2748         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
2749         public static native void UserConfig_set_channel_options(long this_ptr, long val);
2750         // bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
2751         public static native boolean UserConfig_get_accept_forwards_to_priv_channels(long this_ptr);
2752         // void UserConfig_set_accept_forwards_to_priv_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
2753         public static native void UserConfig_set_accept_forwards_to_priv_channels(long this_ptr, boolean val);
2754         // MUST_USE_RES struct LDKUserConfig UserConfig_new(struct LDKChannelHandshakeConfig own_channel_config_arg, struct LDKChannelHandshakeLimits peer_channel_config_limits_arg, struct LDKChannelConfig channel_options_arg, bool accept_forwards_to_priv_channels_arg);
2755         public static native long UserConfig_new(long own_channel_config_arg, long peer_channel_config_limits_arg, long channel_options_arg, boolean accept_forwards_to_priv_channels_arg);
2756         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
2757         public static native long UserConfig_clone(long orig);
2758         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
2759         public static native long UserConfig_default();
2760         // void BestBlock_free(struct LDKBestBlock this_obj);
2761         public static native void BestBlock_free(long this_obj);
2762         // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
2763         public static native long BestBlock_clone(long orig);
2764         // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
2765         public static native long BestBlock_from_genesis(Network network);
2766         // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
2767         public static native long BestBlock_new(byte[] block_hash, int height);
2768         // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
2769         public static native byte[] BestBlock_block_hash(long this_arg);
2770         // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
2771         public static native int BestBlock_height(long this_arg);
2772         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
2773         public static native AccessError AccessError_clone(long orig);
2774         // enum LDKAccessError AccessError_unknown_chain(void);
2775         public static native AccessError AccessError_unknown_chain();
2776         // enum LDKAccessError AccessError_unknown_tx(void);
2777         public static native AccessError AccessError_unknown_tx();
2778         // void Access_free(struct LDKAccess this_ptr);
2779         public static native void Access_free(long this_ptr);
2780         // void Listen_free(struct LDKListen this_ptr);
2781         public static native void Listen_free(long this_ptr);
2782         // void Confirm_free(struct LDKConfirm this_ptr);
2783         public static native void Confirm_free(long this_ptr);
2784         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
2785         public static native ChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(long orig);
2786         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
2787         public static native ChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure();
2788         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
2789         public static native ChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure();
2790         // void Watch_free(struct LDKWatch this_ptr);
2791         public static native void Watch_free(long this_ptr);
2792         // void Filter_free(struct LDKFilter this_ptr);
2793         public static native void Filter_free(long this_ptr);
2794         // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
2795         public static native void WatchedOutput_free(long this_obj);
2796         // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
2797         public static native byte[] WatchedOutput_get_block_hash(long this_ptr);
2798         // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
2799         public static native void WatchedOutput_set_block_hash(long this_ptr, byte[] val);
2800         // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
2801         public static native long WatchedOutput_get_outpoint(long this_ptr);
2802         // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
2803         public static native void WatchedOutput_set_outpoint(long this_ptr, long val);
2804         // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
2805         public static native byte[] WatchedOutput_get_script_pubkey(long this_ptr);
2806         // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
2807         public static native void WatchedOutput_set_script_pubkey(long this_ptr, byte[] val);
2808         // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
2809         public static native long WatchedOutput_new(byte[] block_hash_arg, long outpoint_arg, byte[] script_pubkey_arg);
2810         // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
2811         public static native long WatchedOutput_clone(long orig);
2812         // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
2813         public static native long WatchedOutput_hash(long o);
2814         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
2815         public static native void BroadcasterInterface_free(long this_ptr);
2816         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
2817         public static native ConfirmationTarget ConfirmationTarget_clone(long orig);
2818         // enum LDKConfirmationTarget ConfirmationTarget_background(void);
2819         public static native ConfirmationTarget ConfirmationTarget_background();
2820         // enum LDKConfirmationTarget ConfirmationTarget_normal(void);
2821         public static native ConfirmationTarget ConfirmationTarget_normal();
2822         // enum LDKConfirmationTarget ConfirmationTarget_high_priority(void);
2823         public static native ConfirmationTarget ConfirmationTarget_high_priority();
2824         // bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b);
2825         public static native boolean ConfirmationTarget_eq(long a, long b);
2826         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
2827         public static native void FeeEstimator_free(long this_ptr);
2828         // void Persist_free(struct LDKPersist this_ptr);
2829         public static native void Persist_free(long this_ptr);
2830         // void LockedChannelMonitor_free(struct LDKLockedChannelMonitor this_obj);
2831         public static native void LockedChannelMonitor_free(long this_obj);
2832         // void ChainMonitor_free(struct LDKChainMonitor this_obj);
2833         public static native void ChainMonitor_free(long this_obj);
2834         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKCOption_FilterZ chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
2835         public static native long ChainMonitor_new(long chain_source, long broadcaster, long logger, long feeest, long persister);
2836         // MUST_USE_RES struct LDKCVec_BalanceZ ChainMonitor_get_claimable_balances(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKCVec_ChannelDetailsZ ignored_channels);
2837         public static native long[] ChainMonitor_get_claimable_balances(long this_arg, long[] ignored_channels);
2838         // MUST_USE_RES struct LDKCResult_LockedChannelMonitorNoneZ ChainMonitor_get_monitor(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo);
2839         public static native long ChainMonitor_get_monitor(long this_arg, long funding_txo);
2840         // MUST_USE_RES struct LDKCVec_OutPointZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
2841         public static native long[] ChainMonitor_list_monitors(long this_arg);
2842         // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
2843         public static native long ChainMonitor_as_Listen(long this_arg);
2844         // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
2845         public static native long ChainMonitor_as_Confirm(long this_arg);
2846         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
2847         public static native long ChainMonitor_as_Watch(long this_arg);
2848         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
2849         public static native long ChainMonitor_as_EventsProvider(long this_arg);
2850         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
2851         public static native void ChannelMonitorUpdate_free(long this_obj);
2852         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
2853         public static native long ChannelMonitorUpdate_get_update_id(long this_ptr);
2854         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
2855         public static native void ChannelMonitorUpdate_set_update_id(long this_ptr, long val);
2856         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
2857         public static native long ChannelMonitorUpdate_clone(long orig);
2858         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
2859         public static native byte[] ChannelMonitorUpdate_write(long obj);
2860         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
2861         public static native long ChannelMonitorUpdate_read(byte[] ser);
2862         // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
2863         public static native void MonitorUpdateError_free(long this_obj);
2864         // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
2865         public static native long MonitorUpdateError_clone(long orig);
2866         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
2867         public static native void MonitorEvent_free(long this_ptr);
2868         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
2869         public static native long MonitorEvent_clone(long orig);
2870         // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
2871         public static native long MonitorEvent_htlcevent(long a);
2872         // struct LDKMonitorEvent MonitorEvent_commitment_tx_confirmed(struct LDKOutPoint a);
2873         public static native long MonitorEvent_commitment_tx_confirmed(long a);
2874         // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
2875         public static native void HTLCUpdate_free(long this_obj);
2876         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
2877         public static native long HTLCUpdate_clone(long orig);
2878         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
2879         public static native byte[] HTLCUpdate_write(long obj);
2880         // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
2881         public static native long HTLCUpdate_read(byte[] ser);
2882         // void Balance_free(struct LDKBalance this_ptr);
2883         public static native void Balance_free(long this_ptr);
2884         // struct LDKBalance Balance_clone(const struct LDKBalance *NONNULL_PTR orig);
2885         public static native long Balance_clone(long orig);
2886         // struct LDKBalance Balance_claimable_on_channel_close(uint64_t claimable_amount_satoshis);
2887         public static native long Balance_claimable_on_channel_close(long claimable_amount_satoshis);
2888         // struct LDKBalance Balance_claimable_awaiting_confirmations(uint64_t claimable_amount_satoshis, uint32_t confirmation_height);
2889         public static native long Balance_claimable_awaiting_confirmations(long claimable_amount_satoshis, int confirmation_height);
2890         // struct LDKBalance Balance_contentious_claimable(uint64_t claimable_amount_satoshis, uint32_t timeout_height);
2891         public static native long Balance_contentious_claimable(long claimable_amount_satoshis, int timeout_height);
2892         // struct LDKBalance Balance_maybe_claimable_htlcawaiting_timeout(uint64_t claimable_amount_satoshis, uint32_t claimable_height);
2893         public static native long Balance_maybe_claimable_htlcawaiting_timeout(long claimable_amount_satoshis, int claimable_height);
2894         // bool Balance_eq(const struct LDKBalance *NONNULL_PTR a, const struct LDKBalance *NONNULL_PTR b);
2895         public static native boolean Balance_eq(long a, long b);
2896         // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
2897         public static native void ChannelMonitor_free(long this_obj);
2898         // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
2899         public static native long ChannelMonitor_clone(long orig);
2900         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
2901         public static native byte[] ChannelMonitor_write(long obj);
2902         // MUST_USE_RES struct LDKCResult_NoneMonitorUpdateErrorZ ChannelMonitor_update_monitor(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKChannelMonitorUpdate *NONNULL_PTR updates, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
2903         public static native long ChannelMonitor_update_monitor(long this_arg, long updates, long broadcaster, long fee_estimator, long logger);
2904         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
2905         public static native long ChannelMonitor_get_latest_update_id(long this_arg);
2906         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
2907         public static native long ChannelMonitor_get_funding_txo(long this_arg);
2908         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
2909         public static native long[] ChannelMonitor_get_outputs_to_watch(long this_arg);
2910         // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
2911         public static native void ChannelMonitor_load_outputs_to_watch(long this_arg, long filter);
2912         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
2913         public static native long[] ChannelMonitor_get_and_clear_pending_monitor_events(long this_arg);
2914         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
2915         public static native long[] ChannelMonitor_get_and_clear_pending_events(long this_arg);
2916         // MUST_USE_RES struct LDKCVec_TransactionZ ChannelMonitor_get_latest_holder_commitment_txn(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger);
2917         public static native byte[][] ChannelMonitor_get_latest_holder_commitment_txn(long this_arg, long logger);
2918         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_block_connected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
2919         public static native long[] ChannelMonitor_block_connected(long this_arg, byte[] header, long[] txdata, int height, long broadcaster, long fee_estimator, long logger);
2920         // void ChannelMonitor_block_disconnected(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
2921         public static native void ChannelMonitor_block_disconnected(long this_arg, byte[] header, int height, long broadcaster, long fee_estimator, long logger);
2922         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_transactions_confirmed(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
2923         public static native long[] ChannelMonitor_transactions_confirmed(long this_arg, byte[] header, long[] txdata, int height, long broadcaster, long fee_estimator, long logger);
2924         // void ChannelMonitor_transaction_unconfirmed(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
2925         public static native void ChannelMonitor_transaction_unconfirmed(long this_arg, byte[] txid, long broadcaster, long fee_estimator, long logger);
2926         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_best_block_updated(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
2927         public static native long[] ChannelMonitor_best_block_updated(long this_arg, byte[] header, int height, long broadcaster, long fee_estimator, long logger);
2928         // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
2929         public static native byte[][] ChannelMonitor_get_relevant_txids(long this_arg);
2930         // MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
2931         public static native long ChannelMonitor_current_best_block(long this_arg);
2932         // MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
2933         public static native long[] ChannelMonitor_get_claimable_balances(long this_arg);
2934         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
2935         public static native long C2Tuple_BlockHashChannelMonitorZ_read(byte[] ser, long arg);
2936         // void OutPoint_free(struct LDKOutPoint this_obj);
2937         public static native void OutPoint_free(long this_obj);
2938         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
2939         public static native byte[] OutPoint_get_txid(long this_ptr);
2940         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
2941         public static native void OutPoint_set_txid(long this_ptr, byte[] val);
2942         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
2943         public static native short OutPoint_get_index(long this_ptr);
2944         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
2945         public static native void OutPoint_set_index(long this_ptr, short val);
2946         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
2947         public static native long OutPoint_new(byte[] txid_arg, short index_arg);
2948         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
2949         public static native long OutPoint_clone(long orig);
2950         // bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b);
2951         public static native boolean OutPoint_eq(long a, long b);
2952         // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
2953         public static native long OutPoint_hash(long o);
2954         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
2955         public static native byte[] OutPoint_to_channel_id(long this_arg);
2956         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
2957         public static native byte[] OutPoint_write(long obj);
2958         // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
2959         public static native long OutPoint_read(byte[] ser);
2960         // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
2961         public static native void DelayedPaymentOutputDescriptor_free(long this_obj);
2962         // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
2963         public static native long DelayedPaymentOutputDescriptor_get_outpoint(long this_ptr);
2964         // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
2965         public static native void DelayedPaymentOutputDescriptor_set_outpoint(long this_ptr, long val);
2966         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
2967         public static native byte[] DelayedPaymentOutputDescriptor_get_per_commitment_point(long this_ptr);
2968         // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
2969         public static native void DelayedPaymentOutputDescriptor_set_per_commitment_point(long this_ptr, byte[] val);
2970         // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
2971         public static native short DelayedPaymentOutputDescriptor_get_to_self_delay(long this_ptr);
2972         // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
2973         public static native void DelayedPaymentOutputDescriptor_set_to_self_delay(long this_ptr, short val);
2974         // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
2975         public static native void DelayedPaymentOutputDescriptor_set_output(long this_ptr, long val);
2976         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
2977         public static native byte[] DelayedPaymentOutputDescriptor_get_revocation_pubkey(long this_ptr);
2978         // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
2979         public static native void DelayedPaymentOutputDescriptor_set_revocation_pubkey(long this_ptr, byte[] val);
2980         // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
2981         public static native byte[] DelayedPaymentOutputDescriptor_get_channel_keys_id(long this_ptr);
2982         // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
2983         public static native void DelayedPaymentOutputDescriptor_set_channel_keys_id(long this_ptr, byte[] val);
2984         // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
2985         public static native long DelayedPaymentOutputDescriptor_get_channel_value_satoshis(long this_ptr);
2986         // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
2987         public static native void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(long this_ptr, long val);
2988         // MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKPublicKey per_commitment_point_arg, uint16_t to_self_delay_arg, struct LDKTxOut output_arg, struct LDKPublicKey revocation_pubkey_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg);
2989         public static native long DelayedPaymentOutputDescriptor_new(long outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, long output_arg, byte[] revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg);
2990         // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
2991         public static native long DelayedPaymentOutputDescriptor_clone(long orig);
2992         // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
2993         public static native byte[] DelayedPaymentOutputDescriptor_write(long obj);
2994         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
2995         public static native long DelayedPaymentOutputDescriptor_read(byte[] ser);
2996         // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
2997         public static native void StaticPaymentOutputDescriptor_free(long this_obj);
2998         // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
2999         public static native long StaticPaymentOutputDescriptor_get_outpoint(long this_ptr);
3000         // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
3001         public static native void StaticPaymentOutputDescriptor_set_outpoint(long this_ptr, long val);
3002         // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
3003         public static native void StaticPaymentOutputDescriptor_set_output(long this_ptr, long val);
3004         // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
3005         public static native byte[] StaticPaymentOutputDescriptor_get_channel_keys_id(long this_ptr);
3006         // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3007         public static native void StaticPaymentOutputDescriptor_set_channel_keys_id(long this_ptr, byte[] val);
3008         // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
3009         public static native long StaticPaymentOutputDescriptor_get_channel_value_satoshis(long this_ptr);
3010         // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
3011         public static native void StaticPaymentOutputDescriptor_set_channel_value_satoshis(long this_ptr, long val);
3012         // MUST_USE_RES struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKTxOut output_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg);
3013         public static native long StaticPaymentOutputDescriptor_new(long outpoint_arg, long output_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg);
3014         // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
3015         public static native long StaticPaymentOutputDescriptor_clone(long orig);
3016         // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
3017         public static native byte[] StaticPaymentOutputDescriptor_write(long obj);
3018         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
3019         public static native long StaticPaymentOutputDescriptor_read(byte[] ser);
3020         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
3021         public static native void SpendableOutputDescriptor_free(long this_ptr);
3022         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
3023         public static native long SpendableOutputDescriptor_clone(long orig);
3024         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output);
3025         public static native long SpendableOutputDescriptor_static_output(long outpoint, long output);
3026         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
3027         public static native long SpendableOutputDescriptor_delayed_payment_output(long a);
3028         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
3029         public static native long SpendableOutputDescriptor_static_payment_output(long a);
3030         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
3031         public static native byte[] SpendableOutputDescriptor_write(long obj);
3032         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
3033         public static native long SpendableOutputDescriptor_read(byte[] ser);
3034         // void BaseSign_free(struct LDKBaseSign this_ptr);
3035         public static native void BaseSign_free(long this_ptr);
3036         // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
3037         public static native long Sign_clone(long orig);
3038         // void Sign_free(struct LDKSign this_ptr);
3039         public static native void Sign_free(long this_ptr);
3040         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
3041         public static native void KeysInterface_free(long this_ptr);
3042         // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
3043         public static native void InMemorySigner_free(long this_obj);
3044         // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
3045         public static native byte[] InMemorySigner_get_funding_key(long this_ptr);
3046         // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
3047         public static native void InMemorySigner_set_funding_key(long this_ptr, byte[] val);
3048         // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
3049         public static native byte[] InMemorySigner_get_revocation_base_key(long this_ptr);
3050         // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
3051         public static native void InMemorySigner_set_revocation_base_key(long this_ptr, byte[] val);
3052         // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
3053         public static native byte[] InMemorySigner_get_payment_key(long this_ptr);
3054         // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
3055         public static native void InMemorySigner_set_payment_key(long this_ptr, byte[] val);
3056         // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
3057         public static native byte[] InMemorySigner_get_delayed_payment_base_key(long this_ptr);
3058         // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
3059         public static native void InMemorySigner_set_delayed_payment_base_key(long this_ptr, byte[] val);
3060         // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
3061         public static native byte[] InMemorySigner_get_htlc_base_key(long this_ptr);
3062         // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
3063         public static native void InMemorySigner_set_htlc_base_key(long this_ptr, byte[] val);
3064         // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
3065         public static native byte[] InMemorySigner_get_commitment_seed(long this_ptr);
3066         // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3067         public static native void InMemorySigner_set_commitment_seed(long this_ptr, byte[] val);
3068         // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
3069         public static native long InMemorySigner_clone(long orig);
3070         // MUST_USE_RES struct LDKInMemorySigner InMemorySigner_new(struct LDKSecretKey funding_key, struct LDKSecretKey revocation_base_key, struct LDKSecretKey payment_key, struct LDKSecretKey delayed_payment_base_key, struct LDKSecretKey htlc_base_key, struct LDKThirtyTwoBytes commitment_seed, uint64_t channel_value_satoshis, struct LDKThirtyTwoBytes channel_keys_id);
3071         public static native long InMemorySigner_new(byte[] funding_key, byte[] revocation_base_key, byte[] payment_key, byte[] delayed_payment_base_key, byte[] htlc_base_key, byte[] commitment_seed, long channel_value_satoshis, byte[] channel_keys_id);
3072         // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
3073         public static native long InMemorySigner_counterparty_pubkeys(long this_arg);
3074         // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
3075         public static native short InMemorySigner_counterparty_selected_contest_delay(long this_arg);
3076         // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
3077         public static native short InMemorySigner_holder_selected_contest_delay(long this_arg);
3078         // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
3079         public static native boolean InMemorySigner_is_outbound(long this_arg);
3080         // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
3081         public static native long InMemorySigner_funding_outpoint(long this_arg);
3082         // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
3083         public static native long InMemorySigner_get_channel_parameters(long this_arg);
3084         // MUST_USE_RES struct LDKCResult_CVec_CVec_u8ZZNoneZ InMemorySigner_sign_counterparty_payment_input(const struct LDKInMemorySigner *NONNULL_PTR this_arg, struct LDKTransaction spend_tx, uintptr_t input_idx, const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR descriptor);
3085         public static native long InMemorySigner_sign_counterparty_payment_input(long this_arg, byte[] spend_tx, long input_idx, long descriptor);
3086         // MUST_USE_RES struct LDKCResult_CVec_CVec_u8ZZNoneZ InMemorySigner_sign_dynamic_p2wsh_input(const struct LDKInMemorySigner *NONNULL_PTR this_arg, struct LDKTransaction spend_tx, uintptr_t input_idx, const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR descriptor);
3087         public static native long InMemorySigner_sign_dynamic_p2wsh_input(long this_arg, byte[] spend_tx, long input_idx, long descriptor);
3088         // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
3089         public static native long InMemorySigner_as_BaseSign(long this_arg);
3090         // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
3091         public static native long InMemorySigner_as_Sign(long this_arg);
3092         // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
3093         public static native byte[] InMemorySigner_write(long obj);
3094         // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
3095         public static native long InMemorySigner_read(byte[] ser);
3096         // void KeysManager_free(struct LDKKeysManager this_obj);
3097         public static native void KeysManager_free(long this_obj);
3098         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
3099         public static native long KeysManager_new(byte[] seed, long starting_time_secs, int starting_time_nanos);
3100         // MUST_USE_RES struct LDKInMemorySigner KeysManager_derive_channel_keys(const struct LDKKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, const uint8_t (*params)[32]);
3101         public static native long KeysManager_derive_channel_keys(long this_arg, long channel_value_satoshis, byte[] params);
3102         // MUST_USE_RES struct LDKCResult_TransactionNoneZ KeysManager_spend_spendable_outputs(const struct LDKKeysManager *NONNULL_PTR this_arg, struct LDKCVec_SpendableOutputDescriptorZ descriptors, struct LDKCVec_TxOutZ outputs, struct LDKCVec_u8Z change_destination_script, uint32_t feerate_sat_per_1000_weight);
3103         public static native long KeysManager_spend_spendable_outputs(long this_arg, long[] descriptors, long[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight);
3104         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
3105         public static native long KeysManager_as_KeysInterface(long this_arg);
3106         // void PaymentId_free(struct LDKPaymentId this_obj);
3107         public static native void PaymentId_free(long this_obj);
3108         // uint64_t PaymentId_hash(const struct LDKPaymentId *NONNULL_PTR o);
3109         public static native long PaymentId_hash(long o);
3110         // struct LDKPaymentId PaymentId_clone(const struct LDKPaymentId *NONNULL_PTR orig);
3111         public static native long PaymentId_clone(long orig);
3112         // bool PaymentId_eq(const struct LDKPaymentId *NONNULL_PTR a, const struct LDKPaymentId *NONNULL_PTR b);
3113         public static native boolean PaymentId_eq(long a, long b);
3114         // struct LDKCVec_u8Z PaymentId_write(const struct LDKPaymentId *NONNULL_PTR obj);
3115         public static native byte[] PaymentId_write(long obj);
3116         // struct LDKCResult_PaymentIdDecodeErrorZ PaymentId_read(struct LDKu8slice ser);
3117         public static native long PaymentId_read(byte[] ser);
3118         // void ChannelManager_free(struct LDKChannelManager this_obj);
3119         public static native void ChannelManager_free(long this_obj);
3120         // void ChainParameters_free(struct LDKChainParameters this_obj);
3121         public static native void ChainParameters_free(long this_obj);
3122         // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
3123         public static native Network ChainParameters_get_network(long this_ptr);
3124         // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
3125         public static native void ChainParameters_set_network(long this_ptr, Network val);
3126         // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
3127         public static native long ChainParameters_get_best_block(long this_ptr);
3128         // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
3129         public static native void ChainParameters_set_best_block(long this_ptr, long val);
3130         // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
3131         public static native long ChainParameters_new(Network network_arg, long best_block_arg);
3132         // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
3133         public static native long ChainParameters_clone(long orig);
3134         // void CounterpartyForwardingInfo_free(struct LDKCounterpartyForwardingInfo this_obj);
3135         public static native void CounterpartyForwardingInfo_free(long this_obj);
3136         // uint32_t CounterpartyForwardingInfo_get_fee_base_msat(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
3137         public static native int CounterpartyForwardingInfo_get_fee_base_msat(long this_ptr);
3138         // void CounterpartyForwardingInfo_set_fee_base_msat(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
3139         public static native void CounterpartyForwardingInfo_set_fee_base_msat(long this_ptr, int val);
3140         // uint32_t CounterpartyForwardingInfo_get_fee_proportional_millionths(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
3141         public static native int CounterpartyForwardingInfo_get_fee_proportional_millionths(long this_ptr);
3142         // void CounterpartyForwardingInfo_set_fee_proportional_millionths(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
3143         public static native void CounterpartyForwardingInfo_set_fee_proportional_millionths(long this_ptr, int val);
3144         // uint16_t CounterpartyForwardingInfo_get_cltv_expiry_delta(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
3145         public static native short CounterpartyForwardingInfo_get_cltv_expiry_delta(long this_ptr);
3146         // void CounterpartyForwardingInfo_set_cltv_expiry_delta(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint16_t val);
3147         public static native void CounterpartyForwardingInfo_set_cltv_expiry_delta(long this_ptr, short val);
3148         // MUST_USE_RES struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_new(uint32_t fee_base_msat_arg, uint32_t fee_proportional_millionths_arg, uint16_t cltv_expiry_delta_arg);
3149         public static native long CounterpartyForwardingInfo_new(int fee_base_msat_arg, int fee_proportional_millionths_arg, short cltv_expiry_delta_arg);
3150         // struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_clone(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR orig);
3151         public static native long CounterpartyForwardingInfo_clone(long orig);
3152         // void ChannelCounterparty_free(struct LDKChannelCounterparty this_obj);
3153         public static native void ChannelCounterparty_free(long this_obj);
3154         // struct LDKPublicKey ChannelCounterparty_get_node_id(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
3155         public static native byte[] ChannelCounterparty_get_node_id(long this_ptr);
3156         // void ChannelCounterparty_set_node_id(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3157         public static native void ChannelCounterparty_set_node_id(long this_ptr, byte[] val);
3158         // struct LDKInitFeatures ChannelCounterparty_get_features(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
3159         public static native long ChannelCounterparty_get_features(long this_ptr);
3160         // void ChannelCounterparty_set_features(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
3161         public static native void ChannelCounterparty_set_features(long this_ptr, long val);
3162         // uint64_t ChannelCounterparty_get_unspendable_punishment_reserve(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
3163         public static native long ChannelCounterparty_get_unspendable_punishment_reserve(long this_ptr);
3164         // void ChannelCounterparty_set_unspendable_punishment_reserve(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, uint64_t val);
3165         public static native void ChannelCounterparty_set_unspendable_punishment_reserve(long this_ptr, long val);
3166         // struct LDKCounterpartyForwardingInfo ChannelCounterparty_get_forwarding_info(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
3167         public static native long ChannelCounterparty_get_forwarding_info(long this_ptr);
3168         // void ChannelCounterparty_set_forwarding_info(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKCounterpartyForwardingInfo val);
3169         public static native void ChannelCounterparty_set_forwarding_info(long this_ptr, long val);
3170         // MUST_USE_RES struct LDKChannelCounterparty ChannelCounterparty_new(struct LDKPublicKey node_id_arg, struct LDKInitFeatures features_arg, uint64_t unspendable_punishment_reserve_arg, struct LDKCounterpartyForwardingInfo forwarding_info_arg);
3171         public static native long ChannelCounterparty_new(byte[] node_id_arg, long features_arg, long unspendable_punishment_reserve_arg, long forwarding_info_arg);
3172         // struct LDKChannelCounterparty ChannelCounterparty_clone(const struct LDKChannelCounterparty *NONNULL_PTR orig);
3173         public static native long ChannelCounterparty_clone(long orig);
3174         // void ChannelDetails_free(struct LDKChannelDetails this_obj);
3175         public static native void ChannelDetails_free(long this_obj);
3176         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
3177         public static native byte[] ChannelDetails_get_channel_id(long this_ptr);
3178         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3179         public static native void ChannelDetails_set_channel_id(long this_ptr, byte[] val);
3180         // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
3181         public static native long ChannelDetails_get_counterparty(long this_ptr);
3182         // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
3183         public static native void ChannelDetails_set_counterparty(long this_ptr, long val);
3184         // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
3185         public static native long ChannelDetails_get_funding_txo(long this_ptr);
3186         // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
3187         public static native void ChannelDetails_set_funding_txo(long this_ptr, long val);
3188         // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
3189         public static native long ChannelDetails_get_short_channel_id(long this_ptr);
3190         // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
3191         public static native void ChannelDetails_set_short_channel_id(long this_ptr, long val);
3192         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
3193         public static native long ChannelDetails_get_channel_value_satoshis(long this_ptr);
3194         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
3195         public static native void ChannelDetails_set_channel_value_satoshis(long this_ptr, long val);
3196         // struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
3197         public static native long ChannelDetails_get_unspendable_punishment_reserve(long this_ptr);
3198         // void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
3199         public static native void ChannelDetails_set_unspendable_punishment_reserve(long this_ptr, long val);
3200         // uint64_t ChannelDetails_get_user_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
3201         public static native long ChannelDetails_get_user_channel_id(long this_ptr);
3202         // void ChannelDetails_set_user_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
3203         public static native void ChannelDetails_set_user_channel_id(long this_ptr, long val);
3204         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
3205         public static native long ChannelDetails_get_outbound_capacity_msat(long this_ptr);
3206         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
3207         public static native void ChannelDetails_set_outbound_capacity_msat(long this_ptr, long val);
3208         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
3209         public static native long ChannelDetails_get_inbound_capacity_msat(long this_ptr);
3210         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
3211         public static native void ChannelDetails_set_inbound_capacity_msat(long this_ptr, long val);
3212         // struct LDKCOption_u32Z ChannelDetails_get_confirmations_required(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
3213         public static native long ChannelDetails_get_confirmations_required(long this_ptr);
3214         // void ChannelDetails_set_confirmations_required(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
3215         public static native void ChannelDetails_set_confirmations_required(long this_ptr, long val);
3216         // struct LDKCOption_u16Z ChannelDetails_get_force_close_spend_delay(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
3217         public static native long ChannelDetails_get_force_close_spend_delay(long this_ptr);
3218         // void ChannelDetails_set_force_close_spend_delay(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
3219         public static native void ChannelDetails_set_force_close_spend_delay(long this_ptr, long val);
3220         // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
3221         public static native boolean ChannelDetails_get_is_outbound(long this_ptr);
3222         // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
3223         public static native void ChannelDetails_set_is_outbound(long this_ptr, boolean val);
3224         // bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
3225         public static native boolean ChannelDetails_get_is_funding_locked(long this_ptr);
3226         // void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
3227         public static native void ChannelDetails_set_is_funding_locked(long this_ptr, boolean val);
3228         // bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
3229         public static native boolean ChannelDetails_get_is_usable(long this_ptr);
3230         // void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
3231         public static native void ChannelDetails_set_is_usable(long this_ptr, boolean val);
3232         // bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
3233         public static native boolean ChannelDetails_get_is_public(long this_ptr);
3234         // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
3235         public static native void ChannelDetails_set_is_public(long this_ptr, boolean val);
3236         // MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKChannelCounterparty counterparty_arg, struct LDKOutPoint funding_txo_arg, struct LDKCOption_u64Z short_channel_id_arg, uint64_t channel_value_satoshis_arg, struct LDKCOption_u64Z unspendable_punishment_reserve_arg, uint64_t user_channel_id_arg, uint64_t outbound_capacity_msat_arg, uint64_t inbound_capacity_msat_arg, struct LDKCOption_u32Z confirmations_required_arg, struct LDKCOption_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_funding_locked_arg, bool is_usable_arg, bool is_public_arg);
3237         public static native long ChannelDetails_new(byte[] channel_id_arg, long counterparty_arg, long funding_txo_arg, long short_channel_id_arg, long channel_value_satoshis_arg, long unspendable_punishment_reserve_arg, long user_channel_id_arg, long outbound_capacity_msat_arg, long inbound_capacity_msat_arg, long confirmations_required_arg, long force_close_spend_delay_arg, boolean is_outbound_arg, boolean is_funding_locked_arg, boolean is_usable_arg, boolean is_public_arg);
3238         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
3239         public static native long ChannelDetails_clone(long orig);
3240         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
3241         public static native void PaymentSendFailure_free(long this_ptr);
3242         // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
3243         public static native long PaymentSendFailure_clone(long orig);
3244         // struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
3245         public static native long PaymentSendFailure_parameter_error(long a);
3246         // struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
3247         public static native long PaymentSendFailure_path_parameter_error(long[] a);
3248         // struct LDKPaymentSendFailure PaymentSendFailure_all_failed_retry_safe(struct LDKCVec_APIErrorZ a);
3249         public static native long PaymentSendFailure_all_failed_retry_safe(long[] a);
3250         // struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ a);
3251         public static native long PaymentSendFailure_partial_failure(long[] a);
3252         // MUST_USE_RES struct LDKChannelManager ChannelManager_new(struct LDKFeeEstimator fee_est, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKLogger logger, struct LDKKeysInterface keys_manager, struct LDKUserConfig config, struct LDKChainParameters params);
3253         public static native long ChannelManager_new(long fee_est, long chain_monitor, long tx_broadcaster, long logger, long keys_manager, long config, long params);
3254         // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
3255         public static native long ChannelManager_get_current_default_configuration(long this_arg);
3256         // MUST_USE_RES struct LDKCResult__u832APIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, uint64_t user_channel_id, struct LDKUserConfig override_config);
3257         public static native long ChannelManager_create_channel(long this_arg, byte[] their_network_key, long channel_value_satoshis, long push_msat, long user_channel_id, long override_config);
3258         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
3259         public static native long[] ChannelManager_list_channels(long this_arg);
3260         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
3261         public static native long[] ChannelManager_list_usable_channels(long this_arg);
3262         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
3263         public static native long ChannelManager_close_channel(long this_arg, byte[] channel_id);
3264         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel_with_target_feerate(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], uint32_t target_feerate_sats_per_1000_weight);
3265         public static native long ChannelManager_close_channel_with_target_feerate(long this_arg, byte[] channel_id, int target_feerate_sats_per_1000_weight);
3266         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
3267         public static native long ChannelManager_force_close_channel(long this_arg, byte[] channel_id);
3268         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
3269         public static native void ChannelManager_force_close_all_channels(long this_arg);
3270         // MUST_USE_RES struct LDKCResult_PaymentIdPaymentSendFailureZ ChannelManager_send_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret);
3271         public static native long ChannelManager_send_payment(long this_arg, long route, byte[] payment_hash, byte[] payment_secret);
3272         // MUST_USE_RES struct LDKCResult_NonePaymentSendFailureZ ChannelManager_retry_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKPaymentId payment_id);
3273         public static native long ChannelManager_retry_payment(long this_arg, long route, long payment_id);
3274         // MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ ChannelManager_send_spontaneous_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_preimage);
3275         public static native long ChannelManager_send_spontaneous_payment(long this_arg, long route, byte[] payment_preimage);
3276         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKTransaction funding_transaction);
3277         public static native long ChannelManager_funding_transaction_generated(long this_arg, byte[] temporary_channel_id, byte[] funding_transaction);
3278         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
3279         public static native void ChannelManager_broadcast_node_announcement(long this_arg, byte[] rgb, byte[] alias, long[] addresses);
3280         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
3281         public static native void ChannelManager_process_pending_htlc_forwards(long this_arg);
3282         // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
3283         public static native void ChannelManager_timer_tick_occurred(long this_arg);
3284         // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
3285         public static native boolean ChannelManager_fail_htlc_backwards(long this_arg, byte[] payment_hash);
3286         // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
3287         public static native boolean ChannelManager_claim_funds(long this_arg, byte[] payment_preimage);
3288         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
3289         public static native byte[] ChannelManager_get_our_node_id(long this_arg);
3290         // void ChannelManager_channel_monitor_updated(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKOutPoint *NONNULL_PTR funding_txo, uint64_t highest_applied_update_id);
3291         public static native void ChannelManager_channel_monitor_updated(long this_arg, long funding_txo, long highest_applied_update_id);
3292         // MUST_USE_RES struct LDKC2Tuple_PaymentHashPaymentSecretZ ChannelManager_create_inbound_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, uint64_t user_payment_id);
3293         public static native long ChannelManager_create_inbound_payment(long this_arg, long min_value_msat, int invoice_expiry_delta_secs, long user_payment_id);
3294         // MUST_USE_RES struct LDKCResult_PaymentSecretAPIErrorZ ChannelManager_create_inbound_payment_for_hash(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, uint64_t user_payment_id);
3295         public static native long ChannelManager_create_inbound_payment_for_hash(long this_arg, byte[] payment_hash, long min_value_msat, int invoice_expiry_delta_secs, long user_payment_id);
3296         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
3297         public static native long ChannelManager_as_MessageSendEventsProvider(long this_arg);
3298         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
3299         public static native long ChannelManager_as_EventsProvider(long this_arg);
3300         // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
3301         public static native long ChannelManager_as_Listen(long this_arg);
3302         // struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
3303         public static native long ChannelManager_as_Confirm(long this_arg);
3304         // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
3305         public static native boolean ChannelManager_await_persistable_update_timeout(long this_arg, long max_wait);
3306         // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
3307         public static native void ChannelManager_await_persistable_update(long this_arg);
3308         // MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
3309         public static native long ChannelManager_current_best_block(long this_arg);
3310         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
3311         public static native long ChannelManager_as_ChannelMessageHandler(long this_arg);
3312         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
3313         public static native byte[] ChannelManager_write(long obj);
3314         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
3315         public static native void ChannelManagerReadArgs_free(long this_obj);
3316         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
3317         public static native long ChannelManagerReadArgs_get_keys_manager(long this_ptr);
3318         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
3319         public static native void ChannelManagerReadArgs_set_keys_manager(long this_ptr, long val);
3320         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
3321         public static native long ChannelManagerReadArgs_get_fee_estimator(long this_ptr);
3322         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
3323         public static native void ChannelManagerReadArgs_set_fee_estimator(long this_ptr, long val);
3324         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
3325         public static native long ChannelManagerReadArgs_get_chain_monitor(long this_ptr);
3326         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
3327         public static native void ChannelManagerReadArgs_set_chain_monitor(long this_ptr, long val);
3328         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
3329         public static native long ChannelManagerReadArgs_get_tx_broadcaster(long this_ptr);
3330         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
3331         public static native void ChannelManagerReadArgs_set_tx_broadcaster(long this_ptr, long val);
3332         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
3333         public static native long ChannelManagerReadArgs_get_logger(long this_ptr);
3334         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
3335         public static native void ChannelManagerReadArgs_set_logger(long this_ptr, long val);
3336         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
3337         public static native long ChannelManagerReadArgs_get_default_config(long this_ptr);
3338         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
3339         public static native void ChannelManagerReadArgs_set_default_config(long this_ptr, long val);
3340         // MUST_USE_RES struct LDKChannelManagerReadArgs ChannelManagerReadArgs_new(struct LDKKeysInterface keys_manager, struct LDKFeeEstimator fee_estimator, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKLogger logger, struct LDKUserConfig default_config, struct LDKCVec_ChannelMonitorZ channel_monitors);
3341         public static native long ChannelManagerReadArgs_new(long keys_manager, long fee_estimator, long chain_monitor, long tx_broadcaster, long logger, long default_config, long[] channel_monitors);
3342         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
3343         public static native long C2Tuple_BlockHashChannelManagerZ_read(byte[] ser, long arg);
3344         // void DecodeError_free(struct LDKDecodeError this_obj);
3345         public static native void DecodeError_free(long this_obj);
3346         // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
3347         public static native long DecodeError_clone(long orig);
3348         // void Init_free(struct LDKInit this_obj);
3349         public static native void Init_free(long this_obj);
3350         // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
3351         public static native long Init_get_features(long this_ptr);
3352         // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
3353         public static native void Init_set_features(long this_ptr, long val);
3354         // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
3355         public static native long Init_new(long features_arg);
3356         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
3357         public static native long Init_clone(long orig);
3358         // void ErrorMessage_free(struct LDKErrorMessage this_obj);
3359         public static native void ErrorMessage_free(long this_obj);
3360         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
3361         public static native byte[] ErrorMessage_get_channel_id(long this_ptr);
3362         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3363         public static native void ErrorMessage_set_channel_id(long this_ptr, byte[] val);
3364         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
3365         public static native String ErrorMessage_get_data(long this_ptr);
3366         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
3367         public static native void ErrorMessage_set_data(long this_ptr, String val);
3368         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
3369         public static native long ErrorMessage_new(byte[] channel_id_arg, String data_arg);
3370         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
3371         public static native long ErrorMessage_clone(long orig);
3372         // void Ping_free(struct LDKPing this_obj);
3373         public static native void Ping_free(long this_obj);
3374         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
3375         public static native short Ping_get_ponglen(long this_ptr);
3376         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
3377         public static native void Ping_set_ponglen(long this_ptr, short val);
3378         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
3379         public static native short Ping_get_byteslen(long this_ptr);
3380         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
3381         public static native void Ping_set_byteslen(long this_ptr, short val);
3382         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
3383         public static native long Ping_new(short ponglen_arg, short byteslen_arg);
3384         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
3385         public static native long Ping_clone(long orig);
3386         // void Pong_free(struct LDKPong this_obj);
3387         public static native void Pong_free(long this_obj);
3388         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
3389         public static native short Pong_get_byteslen(long this_ptr);
3390         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
3391         public static native void Pong_set_byteslen(long this_ptr, short val);
3392         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
3393         public static native long Pong_new(short byteslen_arg);
3394         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
3395         public static native long Pong_clone(long orig);
3396         // void OpenChannel_free(struct LDKOpenChannel this_obj);
3397         public static native void OpenChannel_free(long this_obj);
3398         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
3399         public static native byte[] OpenChannel_get_chain_hash(long this_ptr);
3400         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3401         public static native void OpenChannel_set_chain_hash(long this_ptr, byte[] val);
3402         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
3403         public static native byte[] OpenChannel_get_temporary_channel_id(long this_ptr);
3404         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3405         public static native void OpenChannel_set_temporary_channel_id(long this_ptr, byte[] val);
3406         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
3407         public static native long OpenChannel_get_funding_satoshis(long this_ptr);
3408         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
3409         public static native void OpenChannel_set_funding_satoshis(long this_ptr, long val);
3410         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
3411         public static native long OpenChannel_get_push_msat(long this_ptr);
3412         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
3413         public static native void OpenChannel_set_push_msat(long this_ptr, long val);
3414         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
3415         public static native long OpenChannel_get_dust_limit_satoshis(long this_ptr);
3416         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
3417         public static native void OpenChannel_set_dust_limit_satoshis(long this_ptr, long val);
3418         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
3419         public static native long OpenChannel_get_max_htlc_value_in_flight_msat(long this_ptr);
3420         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
3421         public static native void OpenChannel_set_max_htlc_value_in_flight_msat(long this_ptr, long val);
3422         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
3423         public static native long OpenChannel_get_channel_reserve_satoshis(long this_ptr);
3424         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
3425         public static native void OpenChannel_set_channel_reserve_satoshis(long this_ptr, long val);
3426         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
3427         public static native long OpenChannel_get_htlc_minimum_msat(long this_ptr);
3428         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
3429         public static native void OpenChannel_set_htlc_minimum_msat(long this_ptr, long val);
3430         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
3431         public static native int OpenChannel_get_feerate_per_kw(long this_ptr);
3432         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
3433         public static native void OpenChannel_set_feerate_per_kw(long this_ptr, int val);
3434         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
3435         public static native short OpenChannel_get_to_self_delay(long this_ptr);
3436         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
3437         public static native void OpenChannel_set_to_self_delay(long this_ptr, short val);
3438         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
3439         public static native short OpenChannel_get_max_accepted_htlcs(long this_ptr);
3440         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
3441         public static native void OpenChannel_set_max_accepted_htlcs(long this_ptr, short val);
3442         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
3443         public static native byte[] OpenChannel_get_funding_pubkey(long this_ptr);
3444         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3445         public static native void OpenChannel_set_funding_pubkey(long this_ptr, byte[] val);
3446         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
3447         public static native byte[] OpenChannel_get_revocation_basepoint(long this_ptr);
3448         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3449         public static native void OpenChannel_set_revocation_basepoint(long this_ptr, byte[] val);
3450         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
3451         public static native byte[] OpenChannel_get_payment_point(long this_ptr);
3452         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3453         public static native void OpenChannel_set_payment_point(long this_ptr, byte[] val);
3454         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
3455         public static native byte[] OpenChannel_get_delayed_payment_basepoint(long this_ptr);
3456         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3457         public static native void OpenChannel_set_delayed_payment_basepoint(long this_ptr, byte[] val);
3458         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
3459         public static native byte[] OpenChannel_get_htlc_basepoint(long this_ptr);
3460         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3461         public static native void OpenChannel_set_htlc_basepoint(long this_ptr, byte[] val);
3462         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
3463         public static native byte[] OpenChannel_get_first_per_commitment_point(long this_ptr);
3464         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3465         public static native void OpenChannel_set_first_per_commitment_point(long this_ptr, byte[] val);
3466         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
3467         public static native byte OpenChannel_get_channel_flags(long this_ptr);
3468         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
3469         public static native void OpenChannel_set_channel_flags(long this_ptr, byte val);
3470         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
3471         public static native long OpenChannel_clone(long orig);
3472         // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
3473         public static native void AcceptChannel_free(long this_obj);
3474         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
3475         public static native byte[] AcceptChannel_get_temporary_channel_id(long this_ptr);
3476         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3477         public static native void AcceptChannel_set_temporary_channel_id(long this_ptr, byte[] val);
3478         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
3479         public static native long AcceptChannel_get_dust_limit_satoshis(long this_ptr);
3480         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
3481         public static native void AcceptChannel_set_dust_limit_satoshis(long this_ptr, long val);
3482         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
3483         public static native long AcceptChannel_get_max_htlc_value_in_flight_msat(long this_ptr);
3484         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
3485         public static native void AcceptChannel_set_max_htlc_value_in_flight_msat(long this_ptr, long val);
3486         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
3487         public static native long AcceptChannel_get_channel_reserve_satoshis(long this_ptr);
3488         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
3489         public static native void AcceptChannel_set_channel_reserve_satoshis(long this_ptr, long val);
3490         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
3491         public static native long AcceptChannel_get_htlc_minimum_msat(long this_ptr);
3492         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
3493         public static native void AcceptChannel_set_htlc_minimum_msat(long this_ptr, long val);
3494         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
3495         public static native int AcceptChannel_get_minimum_depth(long this_ptr);
3496         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
3497         public static native void AcceptChannel_set_minimum_depth(long this_ptr, int val);
3498         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
3499         public static native short AcceptChannel_get_to_self_delay(long this_ptr);
3500         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
3501         public static native void AcceptChannel_set_to_self_delay(long this_ptr, short val);
3502         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
3503         public static native short AcceptChannel_get_max_accepted_htlcs(long this_ptr);
3504         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
3505         public static native void AcceptChannel_set_max_accepted_htlcs(long this_ptr, short val);
3506         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
3507         public static native byte[] AcceptChannel_get_funding_pubkey(long this_ptr);
3508         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3509         public static native void AcceptChannel_set_funding_pubkey(long this_ptr, byte[] val);
3510         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
3511         public static native byte[] AcceptChannel_get_revocation_basepoint(long this_ptr);
3512         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3513         public static native void AcceptChannel_set_revocation_basepoint(long this_ptr, byte[] val);
3514         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
3515         public static native byte[] AcceptChannel_get_payment_point(long this_ptr);
3516         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3517         public static native void AcceptChannel_set_payment_point(long this_ptr, byte[] val);
3518         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
3519         public static native byte[] AcceptChannel_get_delayed_payment_basepoint(long this_ptr);
3520         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3521         public static native void AcceptChannel_set_delayed_payment_basepoint(long this_ptr, byte[] val);
3522         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
3523         public static native byte[] AcceptChannel_get_htlc_basepoint(long this_ptr);
3524         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3525         public static native void AcceptChannel_set_htlc_basepoint(long this_ptr, byte[] val);
3526         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
3527         public static native byte[] AcceptChannel_get_first_per_commitment_point(long this_ptr);
3528         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3529         public static native void AcceptChannel_set_first_per_commitment_point(long this_ptr, byte[] val);
3530         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
3531         public static native long AcceptChannel_clone(long orig);
3532         // void FundingCreated_free(struct LDKFundingCreated this_obj);
3533         public static native void FundingCreated_free(long this_obj);
3534         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
3535         public static native byte[] FundingCreated_get_temporary_channel_id(long this_ptr);
3536         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3537         public static native void FundingCreated_set_temporary_channel_id(long this_ptr, byte[] val);
3538         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
3539         public static native byte[] FundingCreated_get_funding_txid(long this_ptr);
3540         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3541         public static native void FundingCreated_set_funding_txid(long this_ptr, byte[] val);
3542         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
3543         public static native short FundingCreated_get_funding_output_index(long this_ptr);
3544         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
3545         public static native void FundingCreated_set_funding_output_index(long this_ptr, short val);
3546         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
3547         public static native byte[] FundingCreated_get_signature(long this_ptr);
3548         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
3549         public static native void FundingCreated_set_signature(long this_ptr, byte[] val);
3550         // MUST_USE_RES struct LDKFundingCreated FundingCreated_new(struct LDKThirtyTwoBytes temporary_channel_id_arg, struct LDKThirtyTwoBytes funding_txid_arg, uint16_t funding_output_index_arg, struct LDKSignature signature_arg);
3551         public static native long FundingCreated_new(byte[] temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg);
3552         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
3553         public static native long FundingCreated_clone(long orig);
3554         // void FundingSigned_free(struct LDKFundingSigned this_obj);
3555         public static native void FundingSigned_free(long this_obj);
3556         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
3557         public static native byte[] FundingSigned_get_channel_id(long this_ptr);
3558         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3559         public static native void FundingSigned_set_channel_id(long this_ptr, byte[] val);
3560         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
3561         public static native byte[] FundingSigned_get_signature(long this_ptr);
3562         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
3563         public static native void FundingSigned_set_signature(long this_ptr, byte[] val);
3564         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
3565         public static native long FundingSigned_new(byte[] channel_id_arg, byte[] signature_arg);
3566         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
3567         public static native long FundingSigned_clone(long orig);
3568         // void FundingLocked_free(struct LDKFundingLocked this_obj);
3569         public static native void FundingLocked_free(long this_obj);
3570         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
3571         public static native byte[] FundingLocked_get_channel_id(long this_ptr);
3572         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3573         public static native void FundingLocked_set_channel_id(long this_ptr, byte[] val);
3574         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
3575         public static native byte[] FundingLocked_get_next_per_commitment_point(long this_ptr);
3576         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3577         public static native void FundingLocked_set_next_per_commitment_point(long this_ptr, byte[] val);
3578         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
3579         public static native long FundingLocked_new(byte[] channel_id_arg, byte[] next_per_commitment_point_arg);
3580         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
3581         public static native long FundingLocked_clone(long orig);
3582         // void Shutdown_free(struct LDKShutdown this_obj);
3583         public static native void Shutdown_free(long this_obj);
3584         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
3585         public static native byte[] Shutdown_get_channel_id(long this_ptr);
3586         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3587         public static native void Shutdown_set_channel_id(long this_ptr, byte[] val);
3588         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
3589         public static native byte[] Shutdown_get_scriptpubkey(long this_ptr);
3590         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
3591         public static native void Shutdown_set_scriptpubkey(long this_ptr, byte[] val);
3592         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
3593         public static native long Shutdown_new(byte[] channel_id_arg, byte[] scriptpubkey_arg);
3594         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
3595         public static native long Shutdown_clone(long orig);
3596         // void ClosingSignedFeeRange_free(struct LDKClosingSignedFeeRange this_obj);
3597         public static native void ClosingSignedFeeRange_free(long this_obj);
3598         // uint64_t ClosingSignedFeeRange_get_min_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
3599         public static native long ClosingSignedFeeRange_get_min_fee_satoshis(long this_ptr);
3600         // void ClosingSignedFeeRange_set_min_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
3601         public static native void ClosingSignedFeeRange_set_min_fee_satoshis(long this_ptr, long val);
3602         // uint64_t ClosingSignedFeeRange_get_max_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
3603         public static native long ClosingSignedFeeRange_get_max_fee_satoshis(long this_ptr);
3604         // void ClosingSignedFeeRange_set_max_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
3605         public static native void ClosingSignedFeeRange_set_max_fee_satoshis(long this_ptr, long val);
3606         // MUST_USE_RES struct LDKClosingSignedFeeRange ClosingSignedFeeRange_new(uint64_t min_fee_satoshis_arg, uint64_t max_fee_satoshis_arg);
3607         public static native long ClosingSignedFeeRange_new(long min_fee_satoshis_arg, long max_fee_satoshis_arg);
3608         // struct LDKClosingSignedFeeRange ClosingSignedFeeRange_clone(const struct LDKClosingSignedFeeRange *NONNULL_PTR orig);
3609         public static native long ClosingSignedFeeRange_clone(long orig);
3610         // void ClosingSigned_free(struct LDKClosingSigned this_obj);
3611         public static native void ClosingSigned_free(long this_obj);
3612         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
3613         public static native byte[] ClosingSigned_get_channel_id(long this_ptr);
3614         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3615         public static native void ClosingSigned_set_channel_id(long this_ptr, byte[] val);
3616         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
3617         public static native long ClosingSigned_get_fee_satoshis(long this_ptr);
3618         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
3619         public static native void ClosingSigned_set_fee_satoshis(long this_ptr, long val);
3620         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
3621         public static native byte[] ClosingSigned_get_signature(long this_ptr);
3622         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
3623         public static native void ClosingSigned_set_signature(long this_ptr, byte[] val);
3624         // struct LDKClosingSignedFeeRange ClosingSigned_get_fee_range(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
3625         public static native long ClosingSigned_get_fee_range(long this_ptr);
3626         // void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val);
3627         public static native void ClosingSigned_set_fee_range(long this_ptr, long val);
3628         // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg, struct LDKClosingSignedFeeRange fee_range_arg);
3629         public static native long ClosingSigned_new(byte[] channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, long fee_range_arg);
3630         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
3631         public static native long ClosingSigned_clone(long orig);
3632         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
3633         public static native void UpdateAddHTLC_free(long this_obj);
3634         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
3635         public static native byte[] UpdateAddHTLC_get_channel_id(long this_ptr);
3636         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3637         public static native void UpdateAddHTLC_set_channel_id(long this_ptr, byte[] val);
3638         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
3639         public static native long UpdateAddHTLC_get_htlc_id(long this_ptr);
3640         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
3641         public static native void UpdateAddHTLC_set_htlc_id(long this_ptr, long val);
3642         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
3643         public static native long UpdateAddHTLC_get_amount_msat(long this_ptr);
3644         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
3645         public static native void UpdateAddHTLC_set_amount_msat(long this_ptr, long val);
3646         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
3647         public static native byte[] UpdateAddHTLC_get_payment_hash(long this_ptr);
3648         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3649         public static native void UpdateAddHTLC_set_payment_hash(long this_ptr, byte[] val);
3650         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
3651         public static native int UpdateAddHTLC_get_cltv_expiry(long this_ptr);
3652         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
3653         public static native void UpdateAddHTLC_set_cltv_expiry(long this_ptr, int val);
3654         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
3655         public static native long UpdateAddHTLC_clone(long orig);
3656         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
3657         public static native void UpdateFulfillHTLC_free(long this_obj);
3658         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
3659         public static native byte[] UpdateFulfillHTLC_get_channel_id(long this_ptr);
3660         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3661         public static native void UpdateFulfillHTLC_set_channel_id(long this_ptr, byte[] val);
3662         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
3663         public static native long UpdateFulfillHTLC_get_htlc_id(long this_ptr);
3664         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
3665         public static native void UpdateFulfillHTLC_set_htlc_id(long this_ptr, long val);
3666         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
3667         public static native byte[] UpdateFulfillHTLC_get_payment_preimage(long this_ptr);
3668         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3669         public static native void UpdateFulfillHTLC_set_payment_preimage(long this_ptr, byte[] val);
3670         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
3671         public static native long UpdateFulfillHTLC_new(byte[] channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg);
3672         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
3673         public static native long UpdateFulfillHTLC_clone(long orig);
3674         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
3675         public static native void UpdateFailHTLC_free(long this_obj);
3676         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
3677         public static native byte[] UpdateFailHTLC_get_channel_id(long this_ptr);
3678         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3679         public static native void UpdateFailHTLC_set_channel_id(long this_ptr, byte[] val);
3680         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
3681         public static native long UpdateFailHTLC_get_htlc_id(long this_ptr);
3682         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
3683         public static native void UpdateFailHTLC_set_htlc_id(long this_ptr, long val);
3684         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
3685         public static native long UpdateFailHTLC_clone(long orig);
3686         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
3687         public static native void UpdateFailMalformedHTLC_free(long this_obj);
3688         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
3689         public static native byte[] UpdateFailMalformedHTLC_get_channel_id(long this_ptr);
3690         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3691         public static native void UpdateFailMalformedHTLC_set_channel_id(long this_ptr, byte[] val);
3692         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
3693         public static native long UpdateFailMalformedHTLC_get_htlc_id(long this_ptr);
3694         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
3695         public static native void UpdateFailMalformedHTLC_set_htlc_id(long this_ptr, long val);
3696         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
3697         public static native short UpdateFailMalformedHTLC_get_failure_code(long this_ptr);
3698         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
3699         public static native void UpdateFailMalformedHTLC_set_failure_code(long this_ptr, short val);
3700         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
3701         public static native long UpdateFailMalformedHTLC_clone(long orig);
3702         // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
3703         public static native void CommitmentSigned_free(long this_obj);
3704         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
3705         public static native byte[] CommitmentSigned_get_channel_id(long this_ptr);
3706         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3707         public static native void CommitmentSigned_set_channel_id(long this_ptr, byte[] val);
3708         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
3709         public static native byte[] CommitmentSigned_get_signature(long this_ptr);
3710         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
3711         public static native void CommitmentSigned_set_signature(long this_ptr, byte[] val);
3712         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
3713         public static native void CommitmentSigned_set_htlc_signatures(long this_ptr, byte[][] val);
3714         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
3715         public static native long CommitmentSigned_new(byte[] channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg);
3716         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
3717         public static native long CommitmentSigned_clone(long orig);
3718         // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
3719         public static native void RevokeAndACK_free(long this_obj);
3720         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
3721         public static native byte[] RevokeAndACK_get_channel_id(long this_ptr);
3722         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3723         public static native void RevokeAndACK_set_channel_id(long this_ptr, byte[] val);
3724         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
3725         public static native byte[] RevokeAndACK_get_per_commitment_secret(long this_ptr);
3726         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3727         public static native void RevokeAndACK_set_per_commitment_secret(long this_ptr, byte[] val);
3728         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
3729         public static native byte[] RevokeAndACK_get_next_per_commitment_point(long this_ptr);
3730         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3731         public static native void RevokeAndACK_set_next_per_commitment_point(long this_ptr, byte[] val);
3732         // MUST_USE_RES struct LDKRevokeAndACK RevokeAndACK_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKThirtyTwoBytes per_commitment_secret_arg, struct LDKPublicKey next_per_commitment_point_arg);
3733         public static native long RevokeAndACK_new(byte[] channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg);
3734         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
3735         public static native long RevokeAndACK_clone(long orig);
3736         // void UpdateFee_free(struct LDKUpdateFee this_obj);
3737         public static native void UpdateFee_free(long this_obj);
3738         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
3739         public static native byte[] UpdateFee_get_channel_id(long this_ptr);
3740         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3741         public static native void UpdateFee_set_channel_id(long this_ptr, byte[] val);
3742         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
3743         public static native int UpdateFee_get_feerate_per_kw(long this_ptr);
3744         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
3745         public static native void UpdateFee_set_feerate_per_kw(long this_ptr, int val);
3746         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
3747         public static native long UpdateFee_new(byte[] channel_id_arg, int feerate_per_kw_arg);
3748         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
3749         public static native long UpdateFee_clone(long orig);
3750         // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
3751         public static native void DataLossProtect_free(long this_obj);
3752         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
3753         public static native byte[] DataLossProtect_get_your_last_per_commitment_secret(long this_ptr);
3754         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3755         public static native void DataLossProtect_set_your_last_per_commitment_secret(long this_ptr, byte[] val);
3756         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
3757         public static native byte[] DataLossProtect_get_my_current_per_commitment_point(long this_ptr);
3758         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3759         public static native void DataLossProtect_set_my_current_per_commitment_point(long this_ptr, byte[] val);
3760         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
3761         public static native long DataLossProtect_new(byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg);
3762         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
3763         public static native long DataLossProtect_clone(long orig);
3764         // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
3765         public static native void ChannelReestablish_free(long this_obj);
3766         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
3767         public static native byte[] ChannelReestablish_get_channel_id(long this_ptr);
3768         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3769         public static native void ChannelReestablish_set_channel_id(long this_ptr, byte[] val);
3770         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
3771         public static native long ChannelReestablish_get_next_local_commitment_number(long this_ptr);
3772         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
3773         public static native void ChannelReestablish_set_next_local_commitment_number(long this_ptr, long val);
3774         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
3775         public static native long ChannelReestablish_get_next_remote_commitment_number(long this_ptr);
3776         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
3777         public static native void ChannelReestablish_set_next_remote_commitment_number(long this_ptr, long val);
3778         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
3779         public static native long ChannelReestablish_clone(long orig);
3780         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
3781         public static native void AnnouncementSignatures_free(long this_obj);
3782         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
3783         public static native byte[] AnnouncementSignatures_get_channel_id(long this_ptr);
3784         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3785         public static native void AnnouncementSignatures_set_channel_id(long this_ptr, byte[] val);
3786         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
3787         public static native long AnnouncementSignatures_get_short_channel_id(long this_ptr);
3788         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
3789         public static native void AnnouncementSignatures_set_short_channel_id(long this_ptr, long val);
3790         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
3791         public static native byte[] AnnouncementSignatures_get_node_signature(long this_ptr);
3792         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
3793         public static native void AnnouncementSignatures_set_node_signature(long this_ptr, byte[] val);
3794         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
3795         public static native byte[] AnnouncementSignatures_get_bitcoin_signature(long this_ptr);
3796         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
3797         public static native void AnnouncementSignatures_set_bitcoin_signature(long this_ptr, byte[] val);
3798         // MUST_USE_RES struct LDKAnnouncementSignatures AnnouncementSignatures_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t short_channel_id_arg, struct LDKSignature node_signature_arg, struct LDKSignature bitcoin_signature_arg);
3799         public static native long AnnouncementSignatures_new(byte[] channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg);
3800         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
3801         public static native long AnnouncementSignatures_clone(long orig);
3802         // void NetAddress_free(struct LDKNetAddress this_ptr);
3803         public static native void NetAddress_free(long this_ptr);
3804         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
3805         public static native long NetAddress_clone(long orig);
3806         // struct LDKNetAddress NetAddress_ipv4(struct LDKFourBytes addr, uint16_t port);
3807         public static native long NetAddress_ipv4(byte[] addr, short port);
3808         // struct LDKNetAddress NetAddress_ipv6(struct LDKSixteenBytes addr, uint16_t port);
3809         public static native long NetAddress_ipv6(byte[] addr, short port);
3810         // struct LDKNetAddress NetAddress_onion_v2(struct LDKTenBytes addr, uint16_t port);
3811         public static native long NetAddress_onion_v2(byte[] addr, short port);
3812         // struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
3813         public static native long NetAddress_onion_v3(byte[] ed25519_pubkey, short checksum, byte version, short port);
3814         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
3815         public static native byte[] NetAddress_write(long obj);
3816         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
3817         public static native long Result_read(byte[] ser);
3818         // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
3819         public static native long NetAddress_read(byte[] ser);
3820         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
3821         public static native void UnsignedNodeAnnouncement_free(long this_obj);
3822         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
3823         public static native long UnsignedNodeAnnouncement_get_features(long this_ptr);
3824         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
3825         public static native void UnsignedNodeAnnouncement_set_features(long this_ptr, long val);
3826         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
3827         public static native int UnsignedNodeAnnouncement_get_timestamp(long this_ptr);
3828         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
3829         public static native void UnsignedNodeAnnouncement_set_timestamp(long this_ptr, int val);
3830         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
3831         public static native byte[] UnsignedNodeAnnouncement_get_node_id(long this_ptr);
3832         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3833         public static native void UnsignedNodeAnnouncement_set_node_id(long this_ptr, byte[] val);
3834         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
3835         public static native byte[] UnsignedNodeAnnouncement_get_rgb(long this_ptr);
3836         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
3837         public static native void UnsignedNodeAnnouncement_set_rgb(long this_ptr, byte[] val);
3838         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
3839         public static native byte[] UnsignedNodeAnnouncement_get_alias(long this_ptr);
3840         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3841         public static native void UnsignedNodeAnnouncement_set_alias(long this_ptr, byte[] val);
3842         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
3843         public static native void UnsignedNodeAnnouncement_set_addresses(long this_ptr, long[] val);
3844         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
3845         public static native long UnsignedNodeAnnouncement_clone(long orig);
3846         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
3847         public static native void NodeAnnouncement_free(long this_obj);
3848         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
3849         public static native byte[] NodeAnnouncement_get_signature(long this_ptr);
3850         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
3851         public static native void NodeAnnouncement_set_signature(long this_ptr, byte[] val);
3852         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
3853         public static native long NodeAnnouncement_get_contents(long this_ptr);
3854         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
3855         public static native void NodeAnnouncement_set_contents(long this_ptr, long val);
3856         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
3857         public static native long NodeAnnouncement_new(byte[] signature_arg, long contents_arg);
3858         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
3859         public static native long NodeAnnouncement_clone(long orig);
3860         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
3861         public static native void UnsignedChannelAnnouncement_free(long this_obj);
3862         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
3863         public static native long UnsignedChannelAnnouncement_get_features(long this_ptr);
3864         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
3865         public static native void UnsignedChannelAnnouncement_set_features(long this_ptr, long val);
3866         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
3867         public static native byte[] UnsignedChannelAnnouncement_get_chain_hash(long this_ptr);
3868         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3869         public static native void UnsignedChannelAnnouncement_set_chain_hash(long this_ptr, byte[] val);
3870         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
3871         public static native long UnsignedChannelAnnouncement_get_short_channel_id(long this_ptr);
3872         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
3873         public static native void UnsignedChannelAnnouncement_set_short_channel_id(long this_ptr, long val);
3874         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
3875         public static native byte[] UnsignedChannelAnnouncement_get_node_id_1(long this_ptr);
3876         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3877         public static native void UnsignedChannelAnnouncement_set_node_id_1(long this_ptr, byte[] val);
3878         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
3879         public static native byte[] UnsignedChannelAnnouncement_get_node_id_2(long this_ptr);
3880         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3881         public static native void UnsignedChannelAnnouncement_set_node_id_2(long this_ptr, byte[] val);
3882         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
3883         public static native byte[] UnsignedChannelAnnouncement_get_bitcoin_key_1(long this_ptr);
3884         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3885         public static native void UnsignedChannelAnnouncement_set_bitcoin_key_1(long this_ptr, byte[] val);
3886         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
3887         public static native byte[] UnsignedChannelAnnouncement_get_bitcoin_key_2(long this_ptr);
3888         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3889         public static native void UnsignedChannelAnnouncement_set_bitcoin_key_2(long this_ptr, byte[] val);
3890         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
3891         public static native long UnsignedChannelAnnouncement_clone(long orig);
3892         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
3893         public static native void ChannelAnnouncement_free(long this_obj);
3894         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
3895         public static native byte[] ChannelAnnouncement_get_node_signature_1(long this_ptr);
3896         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
3897         public static native void ChannelAnnouncement_set_node_signature_1(long this_ptr, byte[] val);
3898         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
3899         public static native byte[] ChannelAnnouncement_get_node_signature_2(long this_ptr);
3900         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
3901         public static native void ChannelAnnouncement_set_node_signature_2(long this_ptr, byte[] val);
3902         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
3903         public static native byte[] ChannelAnnouncement_get_bitcoin_signature_1(long this_ptr);
3904         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
3905         public static native void ChannelAnnouncement_set_bitcoin_signature_1(long this_ptr, byte[] val);
3906         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
3907         public static native byte[] ChannelAnnouncement_get_bitcoin_signature_2(long this_ptr);
3908         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
3909         public static native void ChannelAnnouncement_set_bitcoin_signature_2(long this_ptr, byte[] val);
3910         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
3911         public static native long ChannelAnnouncement_get_contents(long this_ptr);
3912         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
3913         public static native void ChannelAnnouncement_set_contents(long this_ptr, long val);
3914         // MUST_USE_RES struct LDKChannelAnnouncement ChannelAnnouncement_new(struct LDKSignature node_signature_1_arg, struct LDKSignature node_signature_2_arg, struct LDKSignature bitcoin_signature_1_arg, struct LDKSignature bitcoin_signature_2_arg, struct LDKUnsignedChannelAnnouncement contents_arg);
3915         public static native long ChannelAnnouncement_new(byte[] node_signature_1_arg, byte[] node_signature_2_arg, byte[] bitcoin_signature_1_arg, byte[] bitcoin_signature_2_arg, long contents_arg);
3916         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
3917         public static native long ChannelAnnouncement_clone(long orig);
3918         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
3919         public static native void UnsignedChannelUpdate_free(long this_obj);
3920         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
3921         public static native byte[] UnsignedChannelUpdate_get_chain_hash(long this_ptr);
3922         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3923         public static native void UnsignedChannelUpdate_set_chain_hash(long this_ptr, byte[] val);
3924         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
3925         public static native long UnsignedChannelUpdate_get_short_channel_id(long this_ptr);
3926         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
3927         public static native void UnsignedChannelUpdate_set_short_channel_id(long this_ptr, long val);
3928         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
3929         public static native int UnsignedChannelUpdate_get_timestamp(long this_ptr);
3930         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
3931         public static native void UnsignedChannelUpdate_set_timestamp(long this_ptr, int val);
3932         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
3933         public static native byte UnsignedChannelUpdate_get_flags(long this_ptr);
3934         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
3935         public static native void UnsignedChannelUpdate_set_flags(long this_ptr, byte val);
3936         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
3937         public static native short UnsignedChannelUpdate_get_cltv_expiry_delta(long this_ptr);
3938         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
3939         public static native void UnsignedChannelUpdate_set_cltv_expiry_delta(long this_ptr, short val);
3940         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
3941         public static native long UnsignedChannelUpdate_get_htlc_minimum_msat(long this_ptr);
3942         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
3943         public static native void UnsignedChannelUpdate_set_htlc_minimum_msat(long this_ptr, long val);
3944         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
3945         public static native int UnsignedChannelUpdate_get_fee_base_msat(long this_ptr);
3946         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
3947         public static native void UnsignedChannelUpdate_set_fee_base_msat(long this_ptr, int val);
3948         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
3949         public static native int UnsignedChannelUpdate_get_fee_proportional_millionths(long this_ptr);
3950         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
3951         public static native void UnsignedChannelUpdate_set_fee_proportional_millionths(long this_ptr, int val);
3952         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
3953         public static native long UnsignedChannelUpdate_clone(long orig);
3954         // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
3955         public static native void ChannelUpdate_free(long this_obj);
3956         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
3957         public static native byte[] ChannelUpdate_get_signature(long this_ptr);
3958         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
3959         public static native void ChannelUpdate_set_signature(long this_ptr, byte[] val);
3960         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
3961         public static native long ChannelUpdate_get_contents(long this_ptr);
3962         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
3963         public static native void ChannelUpdate_set_contents(long this_ptr, long val);
3964         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
3965         public static native long ChannelUpdate_new(byte[] signature_arg, long contents_arg);
3966         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
3967         public static native long ChannelUpdate_clone(long orig);
3968         // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
3969         public static native void QueryChannelRange_free(long this_obj);
3970         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
3971         public static native byte[] QueryChannelRange_get_chain_hash(long this_ptr);
3972         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3973         public static native void QueryChannelRange_set_chain_hash(long this_ptr, byte[] val);
3974         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
3975         public static native int QueryChannelRange_get_first_blocknum(long this_ptr);
3976         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
3977         public static native void QueryChannelRange_set_first_blocknum(long this_ptr, int val);
3978         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
3979         public static native int QueryChannelRange_get_number_of_blocks(long this_ptr);
3980         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
3981         public static native void QueryChannelRange_set_number_of_blocks(long this_ptr, int val);
3982         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
3983         public static native long QueryChannelRange_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg);
3984         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
3985         public static native long QueryChannelRange_clone(long orig);
3986         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
3987         public static native void ReplyChannelRange_free(long this_obj);
3988         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
3989         public static native byte[] ReplyChannelRange_get_chain_hash(long this_ptr);
3990         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3991         public static native void ReplyChannelRange_set_chain_hash(long this_ptr, byte[] val);
3992         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
3993         public static native int ReplyChannelRange_get_first_blocknum(long this_ptr);
3994         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
3995         public static native void ReplyChannelRange_set_first_blocknum(long this_ptr, int val);
3996         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
3997         public static native int ReplyChannelRange_get_number_of_blocks(long this_ptr);
3998         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
3999         public static native void ReplyChannelRange_set_number_of_blocks(long this_ptr, int val);
4000         // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
4001         public static native boolean ReplyChannelRange_get_sync_complete(long this_ptr);
4002         // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
4003         public static native void ReplyChannelRange_set_sync_complete(long this_ptr, boolean val);
4004         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
4005         public static native void ReplyChannelRange_set_short_channel_ids(long this_ptr, long[] val);
4006         // MUST_USE_RES struct LDKReplyChannelRange ReplyChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg, bool sync_complete_arg, struct LDKCVec_u64Z short_channel_ids_arg);
4007         public static native long ReplyChannelRange_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg, boolean sync_complete_arg, long[] short_channel_ids_arg);
4008         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
4009         public static native long ReplyChannelRange_clone(long orig);
4010         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
4011         public static native void QueryShortChannelIds_free(long this_obj);
4012         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
4013         public static native byte[] QueryShortChannelIds_get_chain_hash(long this_ptr);
4014         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4015         public static native void QueryShortChannelIds_set_chain_hash(long this_ptr, byte[] val);
4016         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
4017         public static native void QueryShortChannelIds_set_short_channel_ids(long this_ptr, long[] val);
4018         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
4019         public static native long QueryShortChannelIds_new(byte[] chain_hash_arg, long[] short_channel_ids_arg);
4020         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
4021         public static native long QueryShortChannelIds_clone(long orig);
4022         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
4023         public static native void ReplyShortChannelIdsEnd_free(long this_obj);
4024         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
4025         public static native byte[] ReplyShortChannelIdsEnd_get_chain_hash(long this_ptr);
4026         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4027         public static native void ReplyShortChannelIdsEnd_set_chain_hash(long this_ptr, byte[] val);
4028         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
4029         public static native boolean ReplyShortChannelIdsEnd_get_full_information(long this_ptr);
4030         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
4031         public static native void ReplyShortChannelIdsEnd_set_full_information(long this_ptr, boolean val);
4032         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
4033         public static native long ReplyShortChannelIdsEnd_new(byte[] chain_hash_arg, boolean full_information_arg);
4034         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
4035         public static native long ReplyShortChannelIdsEnd_clone(long orig);
4036         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
4037         public static native void GossipTimestampFilter_free(long this_obj);
4038         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
4039         public static native byte[] GossipTimestampFilter_get_chain_hash(long this_ptr);
4040         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4041         public static native void GossipTimestampFilter_set_chain_hash(long this_ptr, byte[] val);
4042         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
4043         public static native int GossipTimestampFilter_get_first_timestamp(long this_ptr);
4044         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
4045         public static native void GossipTimestampFilter_set_first_timestamp(long this_ptr, int val);
4046         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
4047         public static native int GossipTimestampFilter_get_timestamp_range(long this_ptr);
4048         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
4049         public static native void GossipTimestampFilter_set_timestamp_range(long this_ptr, int val);
4050         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
4051         public static native long GossipTimestampFilter_new(byte[] chain_hash_arg, int first_timestamp_arg, int timestamp_range_arg);
4052         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
4053         public static native long GossipTimestampFilter_clone(long orig);
4054         // void ErrorAction_free(struct LDKErrorAction this_ptr);
4055         public static native void ErrorAction_free(long this_ptr);
4056         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
4057         public static native long ErrorAction_clone(long orig);
4058         // struct LDKErrorAction ErrorAction_disconnect_peer(struct LDKErrorMessage msg);
4059         public static native long ErrorAction_disconnect_peer(long msg);
4060         // struct LDKErrorAction ErrorAction_ignore_error(void);
4061         public static native long ErrorAction_ignore_error();
4062         // struct LDKErrorAction ErrorAction_ignore_and_log(enum LDKLevel a);
4063         public static native long ErrorAction_ignore_and_log(Level a);
4064         // struct LDKErrorAction ErrorAction_send_error_message(struct LDKErrorMessage msg);
4065         public static native long ErrorAction_send_error_message(long msg);
4066         // void LightningError_free(struct LDKLightningError this_obj);
4067         public static native void LightningError_free(long this_obj);
4068         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
4069         public static native String LightningError_get_err(long this_ptr);
4070         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKStr val);
4071         public static native void LightningError_set_err(long this_ptr, String val);
4072         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
4073         public static native long LightningError_get_action(long this_ptr);
4074         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
4075         public static native void LightningError_set_action(long this_ptr, long val);
4076         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKStr err_arg, struct LDKErrorAction action_arg);
4077         public static native long LightningError_new(String err_arg, long action_arg);
4078         // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
4079         public static native long LightningError_clone(long orig);
4080         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
4081         public static native void CommitmentUpdate_free(long this_obj);
4082         // struct LDKCVec_UpdateAddHTLCZ CommitmentUpdate_get_update_add_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
4083         public static native long[] CommitmentUpdate_get_update_add_htlcs(long this_ptr);
4084         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
4085         public static native void CommitmentUpdate_set_update_add_htlcs(long this_ptr, long[] val);
4086         // struct LDKCVec_UpdateFulfillHTLCZ CommitmentUpdate_get_update_fulfill_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
4087         public static native long[] CommitmentUpdate_get_update_fulfill_htlcs(long this_ptr);
4088         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
4089         public static native void CommitmentUpdate_set_update_fulfill_htlcs(long this_ptr, long[] val);
4090         // struct LDKCVec_UpdateFailHTLCZ CommitmentUpdate_get_update_fail_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
4091         public static native long[] CommitmentUpdate_get_update_fail_htlcs(long this_ptr);
4092         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
4093         public static native void CommitmentUpdate_set_update_fail_htlcs(long this_ptr, long[] val);
4094         // struct LDKCVec_UpdateFailMalformedHTLCZ CommitmentUpdate_get_update_fail_malformed_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
4095         public static native long[] CommitmentUpdate_get_update_fail_malformed_htlcs(long this_ptr);
4096         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
4097         public static native void CommitmentUpdate_set_update_fail_malformed_htlcs(long this_ptr, long[] val);
4098         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
4099         public static native long CommitmentUpdate_get_update_fee(long this_ptr);
4100         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
4101         public static native void CommitmentUpdate_set_update_fee(long this_ptr, long val);
4102         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
4103         public static native long CommitmentUpdate_get_commitment_signed(long this_ptr);
4104         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
4105         public static native void CommitmentUpdate_set_commitment_signed(long this_ptr, long val);
4106         // MUST_USE_RES struct LDKCommitmentUpdate CommitmentUpdate_new(struct LDKCVec_UpdateAddHTLCZ update_add_htlcs_arg, struct LDKCVec_UpdateFulfillHTLCZ update_fulfill_htlcs_arg, struct LDKCVec_UpdateFailHTLCZ update_fail_htlcs_arg, struct LDKCVec_UpdateFailMalformedHTLCZ update_fail_malformed_htlcs_arg, struct LDKUpdateFee update_fee_arg, struct LDKCommitmentSigned commitment_signed_arg);
4107         public static native long CommitmentUpdate_new(long[] update_add_htlcs_arg, long[] update_fulfill_htlcs_arg, long[] update_fail_htlcs_arg, long[] update_fail_malformed_htlcs_arg, long update_fee_arg, long commitment_signed_arg);
4108         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
4109         public static native long CommitmentUpdate_clone(long orig);
4110         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
4111         public static native void ChannelMessageHandler_free(long this_ptr);
4112         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
4113         public static native void RoutingMessageHandler_free(long this_ptr);
4114         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
4115         public static native byte[] AcceptChannel_write(long obj);
4116         // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
4117         public static native long AcceptChannel_read(byte[] ser);
4118         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
4119         public static native byte[] AnnouncementSignatures_write(long obj);
4120         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
4121         public static native long AnnouncementSignatures_read(byte[] ser);
4122         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
4123         public static native byte[] ChannelReestablish_write(long obj);
4124         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
4125         public static native long ChannelReestablish_read(byte[] ser);
4126         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
4127         public static native byte[] ClosingSigned_write(long obj);
4128         // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
4129         public static native long ClosingSigned_read(byte[] ser);
4130         // struct LDKCVec_u8Z ClosingSignedFeeRange_write(const struct LDKClosingSignedFeeRange *NONNULL_PTR obj);
4131         public static native byte[] ClosingSignedFeeRange_write(long obj);
4132         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ ClosingSignedFeeRange_read(struct LDKu8slice ser);
4133         public static native long ClosingSignedFeeRange_read(byte[] ser);
4134         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
4135         public static native byte[] CommitmentSigned_write(long obj);
4136         // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
4137         public static native long CommitmentSigned_read(byte[] ser);
4138         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
4139         public static native byte[] FundingCreated_write(long obj);
4140         // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
4141         public static native long FundingCreated_read(byte[] ser);
4142         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
4143         public static native byte[] FundingSigned_write(long obj);
4144         // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
4145         public static native long FundingSigned_read(byte[] ser);
4146         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
4147         public static native byte[] FundingLocked_write(long obj);
4148         // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
4149         public static native long FundingLocked_read(byte[] ser);
4150         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
4151         public static native byte[] Init_write(long obj);
4152         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
4153         public static native long Init_read(byte[] ser);
4154         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
4155         public static native byte[] OpenChannel_write(long obj);
4156         // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
4157         public static native long OpenChannel_read(byte[] ser);
4158         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
4159         public static native byte[] RevokeAndACK_write(long obj);
4160         // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
4161         public static native long RevokeAndACK_read(byte[] ser);
4162         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
4163         public static native byte[] Shutdown_write(long obj);
4164         // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
4165         public static native long Shutdown_read(byte[] ser);
4166         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
4167         public static native byte[] UpdateFailHTLC_write(long obj);
4168         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
4169         public static native long UpdateFailHTLC_read(byte[] ser);
4170         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
4171         public static native byte[] UpdateFailMalformedHTLC_write(long obj);
4172         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
4173         public static native long UpdateFailMalformedHTLC_read(byte[] ser);
4174         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
4175         public static native byte[] UpdateFee_write(long obj);
4176         // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
4177         public static native long UpdateFee_read(byte[] ser);
4178         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
4179         public static native byte[] UpdateFulfillHTLC_write(long obj);
4180         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
4181         public static native long UpdateFulfillHTLC_read(byte[] ser);
4182         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
4183         public static native byte[] UpdateAddHTLC_write(long obj);
4184         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
4185         public static native long UpdateAddHTLC_read(byte[] ser);
4186         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
4187         public static native byte[] Ping_write(long obj);
4188         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
4189         public static native long Ping_read(byte[] ser);
4190         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
4191         public static native byte[] Pong_write(long obj);
4192         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
4193         public static native long Pong_read(byte[] ser);
4194         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
4195         public static native byte[] UnsignedChannelAnnouncement_write(long obj);
4196         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
4197         public static native long UnsignedChannelAnnouncement_read(byte[] ser);
4198         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
4199         public static native byte[] ChannelAnnouncement_write(long obj);
4200         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
4201         public static native long ChannelAnnouncement_read(byte[] ser);
4202         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
4203         public static native byte[] UnsignedChannelUpdate_write(long obj);
4204         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
4205         public static native long UnsignedChannelUpdate_read(byte[] ser);
4206         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
4207         public static native byte[] ChannelUpdate_write(long obj);
4208         // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
4209         public static native long ChannelUpdate_read(byte[] ser);
4210         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
4211         public static native byte[] ErrorMessage_write(long obj);
4212         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
4213         public static native long ErrorMessage_read(byte[] ser);
4214         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
4215         public static native byte[] UnsignedNodeAnnouncement_write(long obj);
4216         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
4217         public static native long UnsignedNodeAnnouncement_read(byte[] ser);
4218         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
4219         public static native byte[] NodeAnnouncement_write(long obj);
4220         // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
4221         public static native long NodeAnnouncement_read(byte[] ser);
4222         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
4223         public static native long QueryShortChannelIds_read(byte[] ser);
4224         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
4225         public static native byte[] QueryShortChannelIds_write(long obj);
4226         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
4227         public static native byte[] ReplyShortChannelIdsEnd_write(long obj);
4228         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
4229         public static native long ReplyShortChannelIdsEnd_read(byte[] ser);
4230         // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
4231         public static native int QueryChannelRange_end_blocknum(long this_arg);
4232         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
4233         public static native byte[] QueryChannelRange_write(long obj);
4234         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
4235         public static native long QueryChannelRange_read(byte[] ser);
4236         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
4237         public static native long ReplyChannelRange_read(byte[] ser);
4238         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
4239         public static native byte[] ReplyChannelRange_write(long obj);
4240         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
4241         public static native byte[] GossipTimestampFilter_write(long obj);
4242         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
4243         public static native long GossipTimestampFilter_read(byte[] ser);
4244         // void CustomMessageHandler_free(struct LDKCustomMessageHandler this_ptr);
4245         public static native void CustomMessageHandler_free(long this_ptr);
4246         // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
4247         public static native void IgnoringMessageHandler_free(long this_obj);
4248         // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
4249         public static native long IgnoringMessageHandler_new();
4250         // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
4251         public static native long IgnoringMessageHandler_as_MessageSendEventsProvider(long this_arg);
4252         // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
4253         public static native long IgnoringMessageHandler_as_RoutingMessageHandler(long this_arg);
4254         // struct LDKCustomMessageReader IgnoringMessageHandler_as_CustomMessageReader(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
4255         public static native long IgnoringMessageHandler_as_CustomMessageReader(long this_arg);
4256         // struct LDKCustomMessageHandler IgnoringMessageHandler_as_CustomMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
4257         public static native long IgnoringMessageHandler_as_CustomMessageHandler(long this_arg);
4258         // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
4259         public static native void ErroringMessageHandler_free(long this_obj);
4260         // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
4261         public static native long ErroringMessageHandler_new();
4262         // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
4263         public static native long ErroringMessageHandler_as_MessageSendEventsProvider(long this_arg);
4264         // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
4265         public static native long ErroringMessageHandler_as_ChannelMessageHandler(long this_arg);
4266         // void MessageHandler_free(struct LDKMessageHandler this_obj);
4267         public static native void MessageHandler_free(long this_obj);
4268         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
4269         public static native long MessageHandler_get_chan_handler(long this_ptr);
4270         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
4271         public static native void MessageHandler_set_chan_handler(long this_ptr, long val);
4272         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
4273         public static native long MessageHandler_get_route_handler(long this_ptr);
4274         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
4275         public static native void MessageHandler_set_route_handler(long this_ptr, long val);
4276         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
4277         public static native long MessageHandler_new(long chan_handler_arg, long route_handler_arg);
4278         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
4279         public static native long SocketDescriptor_clone(long orig);
4280         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
4281         public static native void SocketDescriptor_free(long this_ptr);
4282         // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
4283         public static native void PeerHandleError_free(long this_obj);
4284         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
4285         public static native boolean PeerHandleError_get_no_connection_possible(long this_ptr);
4286         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
4287         public static native void PeerHandleError_set_no_connection_possible(long this_ptr, boolean val);
4288         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
4289         public static native long PeerHandleError_new(boolean no_connection_possible_arg);
4290         // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
4291         public static native long PeerHandleError_clone(long orig);
4292         // void PeerManager_free(struct LDKPeerManager this_obj);
4293         public static native void PeerManager_free(long this_obj);
4294         // MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, struct LDKSecretKey our_node_secret, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger, struct LDKCustomMessageHandler custom_message_handler);
4295         public static native long PeerManager_new(long message_handler, byte[] our_node_secret, byte[] ephemeral_random_data, long logger, long custom_message_handler);
4296         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
4297         public static native byte[][] PeerManager_get_peer_node_ids(long this_arg);
4298         // MUST_USE_RES struct LDKCResult_CVec_u8ZPeerHandleErrorZ PeerManager_new_outbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKSocketDescriptor descriptor);
4299         public static native long PeerManager_new_outbound_connection(long this_arg, byte[] their_node_id, long descriptor);
4300         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
4301         public static native long PeerManager_new_inbound_connection(long this_arg, long descriptor);
4302         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
4303         public static native long PeerManager_write_buffer_space_avail(long this_arg, long descriptor);
4304         // MUST_USE_RES struct LDKCResult_boolPeerHandleErrorZ PeerManager_read_event(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR peer_descriptor, struct LDKu8slice data);
4305         public static native long PeerManager_read_event(long this_arg, long peer_descriptor, byte[] data);
4306         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
4307         public static native void PeerManager_process_events(long this_arg);
4308         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
4309         public static native void PeerManager_socket_disconnected(long this_arg, long descriptor);
4310         // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
4311         public static native void PeerManager_disconnect_by_node_id(long this_arg, byte[] node_id, boolean no_connection_possible);
4312         // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
4313         public static native void PeerManager_timer_tick_occurred(long this_arg);
4314         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
4315         public static native byte[] build_commitment_secret(byte[] commitment_seed, long idx);
4316         // struct LDKTransaction build_closing_transaction(uint64_t to_holder_value_sat, uint64_t to_counterparty_value_sat, struct LDKCVec_u8Z to_holder_script, struct LDKCVec_u8Z to_counterparty_script, struct LDKOutPoint funding_outpoint);
4317         public static native byte[] build_closing_transaction(long to_holder_value_sat, long to_counterparty_value_sat, byte[] to_holder_script, byte[] to_counterparty_script, long funding_outpoint);
4318         // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
4319         public static native long derive_private_key(byte[] per_commitment_point, byte[] base_secret);
4320         // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
4321         public static native long derive_public_key(byte[] per_commitment_point, byte[] base_point);
4322         // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
4323         public static native long derive_private_revocation_key(byte[] per_commitment_secret, byte[] countersignatory_revocation_base_secret);
4324         // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
4325         public static native long derive_public_revocation_key(byte[] per_commitment_point, byte[] countersignatory_revocation_base_point);
4326         // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
4327         public static native void TxCreationKeys_free(long this_obj);
4328         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
4329         public static native byte[] TxCreationKeys_get_per_commitment_point(long this_ptr);
4330         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4331         public static native void TxCreationKeys_set_per_commitment_point(long this_ptr, byte[] val);
4332         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
4333         public static native byte[] TxCreationKeys_get_revocation_key(long this_ptr);
4334         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4335         public static native void TxCreationKeys_set_revocation_key(long this_ptr, byte[] val);
4336         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
4337         public static native byte[] TxCreationKeys_get_broadcaster_htlc_key(long this_ptr);
4338         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4339         public static native void TxCreationKeys_set_broadcaster_htlc_key(long this_ptr, byte[] val);
4340         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
4341         public static native byte[] TxCreationKeys_get_countersignatory_htlc_key(long this_ptr);
4342         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4343         public static native void TxCreationKeys_set_countersignatory_htlc_key(long this_ptr, byte[] val);
4344         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
4345         public static native byte[] TxCreationKeys_get_broadcaster_delayed_payment_key(long this_ptr);
4346         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4347         public static native void TxCreationKeys_set_broadcaster_delayed_payment_key(long this_ptr, byte[] val);
4348         // MUST_USE_RES struct LDKTxCreationKeys TxCreationKeys_new(struct LDKPublicKey per_commitment_point_arg, struct LDKPublicKey revocation_key_arg, struct LDKPublicKey broadcaster_htlc_key_arg, struct LDKPublicKey countersignatory_htlc_key_arg, struct LDKPublicKey broadcaster_delayed_payment_key_arg);
4349         public static native long TxCreationKeys_new(byte[] per_commitment_point_arg, byte[] revocation_key_arg, byte[] broadcaster_htlc_key_arg, byte[] countersignatory_htlc_key_arg, byte[] broadcaster_delayed_payment_key_arg);
4350         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
4351         public static native long TxCreationKeys_clone(long orig);
4352         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
4353         public static native byte[] TxCreationKeys_write(long obj);
4354         // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
4355         public static native long TxCreationKeys_read(byte[] ser);
4356         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
4357         public static native void ChannelPublicKeys_free(long this_obj);
4358         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
4359         public static native byte[] ChannelPublicKeys_get_funding_pubkey(long this_ptr);
4360         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4361         public static native void ChannelPublicKeys_set_funding_pubkey(long this_ptr, byte[] val);
4362         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
4363         public static native byte[] ChannelPublicKeys_get_revocation_basepoint(long this_ptr);
4364         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4365         public static native void ChannelPublicKeys_set_revocation_basepoint(long this_ptr, byte[] val);
4366         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
4367         public static native byte[] ChannelPublicKeys_get_payment_point(long this_ptr);
4368         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4369         public static native void ChannelPublicKeys_set_payment_point(long this_ptr, byte[] val);
4370         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
4371         public static native byte[] ChannelPublicKeys_get_delayed_payment_basepoint(long this_ptr);
4372         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4373         public static native void ChannelPublicKeys_set_delayed_payment_basepoint(long this_ptr, byte[] val);
4374         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
4375         public static native byte[] ChannelPublicKeys_get_htlc_basepoint(long this_ptr);
4376         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4377         public static native void ChannelPublicKeys_set_htlc_basepoint(long this_ptr, byte[] val);
4378         // MUST_USE_RES struct LDKChannelPublicKeys ChannelPublicKeys_new(struct LDKPublicKey funding_pubkey_arg, struct LDKPublicKey revocation_basepoint_arg, struct LDKPublicKey payment_point_arg, struct LDKPublicKey delayed_payment_basepoint_arg, struct LDKPublicKey htlc_basepoint_arg);
4379         public static native long ChannelPublicKeys_new(byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg);
4380         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
4381         public static native long ChannelPublicKeys_clone(long orig);
4382         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
4383         public static native byte[] ChannelPublicKeys_write(long obj);
4384         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
4385         public static native long ChannelPublicKeys_read(byte[] ser);
4386         // MUST_USE_RES struct LDKCResult_TxCreationKeysErrorZ TxCreationKeys_derive_new(struct LDKPublicKey per_commitment_point, struct LDKPublicKey broadcaster_delayed_payment_base, struct LDKPublicKey broadcaster_htlc_base, struct LDKPublicKey countersignatory_revocation_base, struct LDKPublicKey countersignatory_htlc_base);
4387         public static native long TxCreationKeys_derive_new(byte[] per_commitment_point, byte[] broadcaster_delayed_payment_base, byte[] broadcaster_htlc_base, byte[] countersignatory_revocation_base, byte[] countersignatory_htlc_base);
4388         // MUST_USE_RES struct LDKCResult_TxCreationKeysErrorZ TxCreationKeys_from_channel_static_keys(struct LDKPublicKey per_commitment_point, const struct LDKChannelPublicKeys *NONNULL_PTR broadcaster_keys, const struct LDKChannelPublicKeys *NONNULL_PTR countersignatory_keys);
4389         public static native long TxCreationKeys_from_channel_static_keys(byte[] per_commitment_point, long broadcaster_keys, long countersignatory_keys);
4390         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
4391         public static native byte[] get_revokeable_redeemscript(byte[] revocation_key, short contest_delay, byte[] broadcaster_delayed_payment_key);
4392         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
4393         public static native void HTLCOutputInCommitment_free(long this_obj);
4394         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
4395         public static native boolean HTLCOutputInCommitment_get_offered(long this_ptr);
4396         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
4397         public static native void HTLCOutputInCommitment_set_offered(long this_ptr, boolean val);
4398         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
4399         public static native long HTLCOutputInCommitment_get_amount_msat(long this_ptr);
4400         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
4401         public static native void HTLCOutputInCommitment_set_amount_msat(long this_ptr, long val);
4402         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
4403         public static native int HTLCOutputInCommitment_get_cltv_expiry(long this_ptr);
4404         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
4405         public static native void HTLCOutputInCommitment_set_cltv_expiry(long this_ptr, int val);
4406         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
4407         public static native byte[] HTLCOutputInCommitment_get_payment_hash(long this_ptr);
4408         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4409         public static native void HTLCOutputInCommitment_set_payment_hash(long this_ptr, byte[] val);
4410         // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
4411         public static native long HTLCOutputInCommitment_get_transaction_output_index(long this_ptr);
4412         // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
4413         public static native void HTLCOutputInCommitment_set_transaction_output_index(long this_ptr, long val);
4414         // MUST_USE_RES struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_new(bool offered_arg, uint64_t amount_msat_arg, uint32_t cltv_expiry_arg, struct LDKThirtyTwoBytes payment_hash_arg, struct LDKCOption_u32Z transaction_output_index_arg);
4415         public static native long HTLCOutputInCommitment_new(boolean offered_arg, long amount_msat_arg, int cltv_expiry_arg, byte[] payment_hash_arg, long transaction_output_index_arg);
4416         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
4417         public static native long HTLCOutputInCommitment_clone(long orig);
4418         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
4419         public static native byte[] HTLCOutputInCommitment_write(long obj);
4420         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
4421         public static native long HTLCOutputInCommitment_read(byte[] ser);
4422         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
4423         public static native byte[] get_htlc_redeemscript(long htlc, long keys);
4424         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
4425         public static native byte[] make_funding_redeemscript(byte[] broadcaster, byte[] countersignatory);
4426         // struct LDKTransaction build_htlc_transaction(const uint8_t (*commitment_txid)[32], uint32_t feerate_per_kw, uint16_t contest_delay, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, struct LDKPublicKey broadcaster_delayed_payment_key, struct LDKPublicKey revocation_key);
4427         public static native byte[] build_htlc_transaction(byte[] commitment_txid, int feerate_per_kw, short contest_delay, long htlc, byte[] broadcaster_delayed_payment_key, byte[] revocation_key);
4428         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
4429         public static native void ChannelTransactionParameters_free(long this_obj);
4430         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
4431         public static native long ChannelTransactionParameters_get_holder_pubkeys(long this_ptr);
4432         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
4433         public static native void ChannelTransactionParameters_set_holder_pubkeys(long this_ptr, long val);
4434         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
4435         public static native short ChannelTransactionParameters_get_holder_selected_contest_delay(long this_ptr);
4436         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
4437         public static native void ChannelTransactionParameters_set_holder_selected_contest_delay(long this_ptr, short val);
4438         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
4439         public static native boolean ChannelTransactionParameters_get_is_outbound_from_holder(long this_ptr);
4440         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
4441         public static native void ChannelTransactionParameters_set_is_outbound_from_holder(long this_ptr, boolean val);
4442         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
4443         public static native long ChannelTransactionParameters_get_counterparty_parameters(long this_ptr);
4444         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
4445         public static native void ChannelTransactionParameters_set_counterparty_parameters(long this_ptr, long val);
4446         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
4447         public static native long ChannelTransactionParameters_get_funding_outpoint(long this_ptr);
4448         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
4449         public static native void ChannelTransactionParameters_set_funding_outpoint(long this_ptr, long val);
4450         // MUST_USE_RES struct LDKChannelTransactionParameters ChannelTransactionParameters_new(struct LDKChannelPublicKeys holder_pubkeys_arg, uint16_t holder_selected_contest_delay_arg, bool is_outbound_from_holder_arg, struct LDKCounterpartyChannelTransactionParameters counterparty_parameters_arg, struct LDKOutPoint funding_outpoint_arg);
4451         public static native long ChannelTransactionParameters_new(long holder_pubkeys_arg, short holder_selected_contest_delay_arg, boolean is_outbound_from_holder_arg, long counterparty_parameters_arg, long funding_outpoint_arg);
4452         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
4453         public static native long ChannelTransactionParameters_clone(long orig);
4454         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
4455         public static native void CounterpartyChannelTransactionParameters_free(long this_obj);
4456         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
4457         public static native long CounterpartyChannelTransactionParameters_get_pubkeys(long this_ptr);
4458         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
4459         public static native void CounterpartyChannelTransactionParameters_set_pubkeys(long this_ptr, long val);
4460         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
4461         public static native short CounterpartyChannelTransactionParameters_get_selected_contest_delay(long this_ptr);
4462         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
4463         public static native void CounterpartyChannelTransactionParameters_set_selected_contest_delay(long this_ptr, short val);
4464         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
4465         public static native long CounterpartyChannelTransactionParameters_new(long pubkeys_arg, short selected_contest_delay_arg);
4466         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
4467         public static native long CounterpartyChannelTransactionParameters_clone(long orig);
4468         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
4469         public static native boolean ChannelTransactionParameters_is_populated(long this_arg);
4470         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
4471         public static native long ChannelTransactionParameters_as_holder_broadcastable(long this_arg);
4472         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
4473         public static native long ChannelTransactionParameters_as_counterparty_broadcastable(long this_arg);
4474         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
4475         public static native byte[] CounterpartyChannelTransactionParameters_write(long obj);
4476         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
4477         public static native long CounterpartyChannelTransactionParameters_read(byte[] ser);
4478         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
4479         public static native byte[] ChannelTransactionParameters_write(long obj);
4480         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
4481         public static native long ChannelTransactionParameters_read(byte[] ser);
4482         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
4483         public static native void DirectedChannelTransactionParameters_free(long this_obj);
4484         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
4485         public static native long DirectedChannelTransactionParameters_broadcaster_pubkeys(long this_arg);
4486         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
4487         public static native long DirectedChannelTransactionParameters_countersignatory_pubkeys(long this_arg);
4488         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
4489         public static native short DirectedChannelTransactionParameters_contest_delay(long this_arg);
4490         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
4491         public static native boolean DirectedChannelTransactionParameters_is_outbound(long this_arg);
4492         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
4493         public static native long DirectedChannelTransactionParameters_funding_outpoint(long this_arg);
4494         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
4495         public static native void HolderCommitmentTransaction_free(long this_obj);
4496         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
4497         public static native byte[] HolderCommitmentTransaction_get_counterparty_sig(long this_ptr);
4498         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
4499         public static native void HolderCommitmentTransaction_set_counterparty_sig(long this_ptr, byte[] val);
4500         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
4501         public static native void HolderCommitmentTransaction_set_counterparty_htlc_sigs(long this_ptr, byte[][] val);
4502         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
4503         public static native long HolderCommitmentTransaction_clone(long orig);
4504         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
4505         public static native byte[] HolderCommitmentTransaction_write(long obj);
4506         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
4507         public static native long HolderCommitmentTransaction_read(byte[] ser);
4508         // MUST_USE_RES struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_new(struct LDKCommitmentTransaction commitment_tx, struct LDKSignature counterparty_sig, struct LDKCVec_SignatureZ counterparty_htlc_sigs, struct LDKPublicKey holder_funding_key, struct LDKPublicKey counterparty_funding_key);
4509         public static native long HolderCommitmentTransaction_new(long commitment_tx, byte[] counterparty_sig, byte[][] counterparty_htlc_sigs, byte[] holder_funding_key, byte[] counterparty_funding_key);
4510         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
4511         public static native void BuiltCommitmentTransaction_free(long this_obj);
4512         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
4513         public static native byte[] BuiltCommitmentTransaction_get_transaction(long this_ptr);
4514         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
4515         public static native void BuiltCommitmentTransaction_set_transaction(long this_ptr, byte[] val);
4516         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
4517         public static native byte[] BuiltCommitmentTransaction_get_txid(long this_ptr);
4518         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4519         public static native void BuiltCommitmentTransaction_set_txid(long this_ptr, byte[] val);
4520         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
4521         public static native long BuiltCommitmentTransaction_new(byte[] transaction_arg, byte[] txid_arg);
4522         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
4523         public static native long BuiltCommitmentTransaction_clone(long orig);
4524         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
4525         public static native byte[] BuiltCommitmentTransaction_write(long obj);
4526         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
4527         public static native long BuiltCommitmentTransaction_read(byte[] ser);
4528         // MUST_USE_RES struct LDKThirtyTwoBytes BuiltCommitmentTransaction_get_sighash_all(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_arg, struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
4529         public static native byte[] BuiltCommitmentTransaction_get_sighash_all(long this_arg, byte[] funding_redeemscript, long channel_value_satoshis);
4530         // MUST_USE_RES struct LDKSignature BuiltCommitmentTransaction_sign(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_arg, const uint8_t (*funding_key)[32], struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
4531         public static native byte[] BuiltCommitmentTransaction_sign(long this_arg, byte[] funding_key, byte[] funding_redeemscript, long channel_value_satoshis);
4532         // void ClosingTransaction_free(struct LDKClosingTransaction this_obj);
4533         public static native void ClosingTransaction_free(long this_obj);
4534         // MUST_USE_RES struct LDKClosingTransaction ClosingTransaction_new(uint64_t to_holder_value_sat, uint64_t to_counterparty_value_sat, struct LDKCVec_u8Z to_holder_script, struct LDKCVec_u8Z to_counterparty_script, struct LDKOutPoint funding_outpoint);
4535         public static native long ClosingTransaction_new(long to_holder_value_sat, long to_counterparty_value_sat, byte[] to_holder_script, byte[] to_counterparty_script, long funding_outpoint);
4536         // MUST_USE_RES struct LDKTrustedClosingTransaction ClosingTransaction_trust(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
4537         public static native long ClosingTransaction_trust(long this_arg);
4538         // MUST_USE_RES struct LDKCResult_TrustedClosingTransactionNoneZ ClosingTransaction_verify(const struct LDKClosingTransaction *NONNULL_PTR this_arg, struct LDKOutPoint funding_outpoint);
4539         public static native long ClosingTransaction_verify(long this_arg, long funding_outpoint);
4540         // MUST_USE_RES uint64_t ClosingTransaction_to_holder_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
4541         public static native long ClosingTransaction_to_holder_value_sat(long this_arg);
4542         // MUST_USE_RES uint64_t ClosingTransaction_to_counterparty_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
4543         public static native long ClosingTransaction_to_counterparty_value_sat(long this_arg);
4544         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_holder_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
4545         public static native byte[] ClosingTransaction_to_holder_script(long this_arg);
4546         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_counterparty_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
4547         public static native byte[] ClosingTransaction_to_counterparty_script(long this_arg);
4548         // void TrustedClosingTransaction_free(struct LDKTrustedClosingTransaction this_obj);
4549         public static native void TrustedClosingTransaction_free(long this_obj);
4550         // MUST_USE_RES struct LDKTransaction TrustedClosingTransaction_built_transaction(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg);
4551         public static native byte[] TrustedClosingTransaction_built_transaction(long this_arg);
4552         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedClosingTransaction_get_sighash_all(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg, struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
4553         public static native byte[] TrustedClosingTransaction_get_sighash_all(long this_arg, byte[] funding_redeemscript, long channel_value_satoshis);
4554         // MUST_USE_RES struct LDKSignature TrustedClosingTransaction_sign(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg, const uint8_t (*funding_key)[32], struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
4555         public static native byte[] TrustedClosingTransaction_sign(long this_arg, byte[] funding_key, byte[] funding_redeemscript, long channel_value_satoshis);
4556         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
4557         public static native void CommitmentTransaction_free(long this_obj);
4558         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
4559         public static native long CommitmentTransaction_clone(long orig);
4560         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
4561         public static native byte[] CommitmentTransaction_write(long obj);
4562         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
4563         public static native long CommitmentTransaction_read(byte[] ser);
4564         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
4565         public static native long CommitmentTransaction_commitment_number(long this_arg);
4566         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
4567         public static native long CommitmentTransaction_to_broadcaster_value_sat(long this_arg);
4568         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
4569         public static native long CommitmentTransaction_to_countersignatory_value_sat(long this_arg);
4570         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
4571         public static native int CommitmentTransaction_feerate_per_kw(long this_arg);
4572         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
4573         public static native long CommitmentTransaction_trust(long this_arg);
4574         // MUST_USE_RES struct LDKCResult_TrustedCommitmentTransactionNoneZ CommitmentTransaction_verify(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg, const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR channel_parameters, const struct LDKChannelPublicKeys *NONNULL_PTR broadcaster_keys, const struct LDKChannelPublicKeys *NONNULL_PTR countersignatory_keys);
4575         public static native long CommitmentTransaction_verify(long this_arg, long channel_parameters, long broadcaster_keys, long countersignatory_keys);
4576         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
4577         public static native void TrustedCommitmentTransaction_free(long this_obj);
4578         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
4579         public static native byte[] TrustedCommitmentTransaction_txid(long this_arg);
4580         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
4581         public static native long TrustedCommitmentTransaction_built_transaction(long this_arg);
4582         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
4583         public static native long TrustedCommitmentTransaction_keys(long this_arg);
4584         // MUST_USE_RES struct LDKCResult_CVec_SignatureZNoneZ TrustedCommitmentTransaction_get_htlc_sigs(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg, const uint8_t (*htlc_base_key)[32], const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR channel_parameters);
4585         public static native long TrustedCommitmentTransaction_get_htlc_sigs(long this_arg, byte[] htlc_base_key, long channel_parameters);
4586         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
4587         public static native long get_commitment_transaction_number_obscure_factor(byte[] broadcaster_payment_basepoint, byte[] countersignatory_payment_basepoint, boolean outbound_from_broadcaster);
4588         // bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b);
4589         public static native boolean InitFeatures_eq(long a, long b);
4590         // bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b);
4591         public static native boolean NodeFeatures_eq(long a, long b);
4592         // bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b);
4593         public static native boolean ChannelFeatures_eq(long a, long b);
4594         // bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b);
4595         public static native boolean InvoiceFeatures_eq(long a, long b);
4596         // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
4597         public static native long InitFeatures_clone(long orig);
4598         // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
4599         public static native long NodeFeatures_clone(long orig);
4600         // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
4601         public static native long ChannelFeatures_clone(long orig);
4602         // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
4603         public static native long InvoiceFeatures_clone(long orig);
4604         // void InitFeatures_free(struct LDKInitFeatures this_obj);
4605         public static native void InitFeatures_free(long this_obj);
4606         // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
4607         public static native void NodeFeatures_free(long this_obj);
4608         // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
4609         public static native void ChannelFeatures_free(long this_obj);
4610         // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
4611         public static native void InvoiceFeatures_free(long this_obj);
4612         // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
4613         public static native long InitFeatures_empty();
4614         // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
4615         public static native long InitFeatures_known();
4616         // MUST_USE_RES bool InitFeatures_requires_unknown_bits(const struct LDKInitFeatures *NONNULL_PTR this_arg);
4617         public static native boolean InitFeatures_requires_unknown_bits(long this_arg);
4618         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
4619         public static native long NodeFeatures_empty();
4620         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
4621         public static native long NodeFeatures_known();
4622         // MUST_USE_RES bool NodeFeatures_requires_unknown_bits(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
4623         public static native boolean NodeFeatures_requires_unknown_bits(long this_arg);
4624         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
4625         public static native long ChannelFeatures_empty();
4626         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
4627         public static native long ChannelFeatures_known();
4628         // MUST_USE_RES bool ChannelFeatures_requires_unknown_bits(const struct LDKChannelFeatures *NONNULL_PTR this_arg);
4629         public static native boolean ChannelFeatures_requires_unknown_bits(long this_arg);
4630         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
4631         public static native long InvoiceFeatures_empty();
4632         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
4633         public static native long InvoiceFeatures_known();
4634         // MUST_USE_RES bool InvoiceFeatures_requires_unknown_bits(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
4635         public static native boolean InvoiceFeatures_requires_unknown_bits(long this_arg);
4636         // MUST_USE_RES bool InitFeatures_supports_payment_secret(const struct LDKInitFeatures *NONNULL_PTR this_arg);
4637         public static native boolean InitFeatures_supports_payment_secret(long this_arg);
4638         // MUST_USE_RES bool NodeFeatures_supports_payment_secret(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
4639         public static native boolean NodeFeatures_supports_payment_secret(long this_arg);
4640         // MUST_USE_RES bool InvoiceFeatures_supports_payment_secret(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
4641         public static native boolean InvoiceFeatures_supports_payment_secret(long this_arg);
4642         // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
4643         public static native byte[] InitFeatures_write(long obj);
4644         // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
4645         public static native byte[] NodeFeatures_write(long obj);
4646         // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
4647         public static native byte[] ChannelFeatures_write(long obj);
4648         // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
4649         public static native byte[] InvoiceFeatures_write(long obj);
4650         // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
4651         public static native long InitFeatures_read(byte[] ser);
4652         // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
4653         public static native long NodeFeatures_read(byte[] ser);
4654         // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
4655         public static native long ChannelFeatures_read(byte[] ser);
4656         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
4657         public static native long InvoiceFeatures_read(byte[] ser);
4658         // void ShutdownScript_free(struct LDKShutdownScript this_obj);
4659         public static native void ShutdownScript_free(long this_obj);
4660         // struct LDKShutdownScript ShutdownScript_clone(const struct LDKShutdownScript *NONNULL_PTR orig);
4661         public static native long ShutdownScript_clone(long orig);
4662         // void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
4663         public static native void InvalidShutdownScript_free(long this_obj);
4664         // struct LDKu8slice InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
4665         public static native byte[] InvalidShutdownScript_get_script(long this_ptr);
4666         // void InvalidShutdownScript_set_script(struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
4667         public static native void InvalidShutdownScript_set_script(long this_ptr, byte[] val);
4668         // MUST_USE_RES struct LDKInvalidShutdownScript InvalidShutdownScript_new(struct LDKCVec_u8Z script_arg);
4669         public static native long InvalidShutdownScript_new(byte[] script_arg);
4670         // struct LDKCVec_u8Z ShutdownScript_write(const struct LDKShutdownScript *NONNULL_PTR obj);
4671         public static native byte[] ShutdownScript_write(long obj);
4672         // struct LDKCResult_ShutdownScriptDecodeErrorZ ShutdownScript_read(struct LDKu8slice ser);
4673         public static native long ShutdownScript_read(byte[] ser);
4674         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wpkh(const uint8_t (*pubkey_hash)[20]);
4675         public static native long ShutdownScript_new_p2wpkh(byte[] pubkey_hash);
4676         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wsh(const uint8_t (*script_hash)[32]);
4677         public static native long ShutdownScript_new_p2wsh(byte[] script_hash);
4678         // MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(uint8_t version, struct LDKu8slice program);
4679         public static native long ShutdownScript_new_witness_program(byte version, byte[] program);
4680         // MUST_USE_RES struct LDKCVec_u8Z ShutdownScript_into_inner(struct LDKShutdownScript this_arg);
4681         public static native byte[] ShutdownScript_into_inner(long this_arg);
4682         // MUST_USE_RES struct LDKPublicKey ShutdownScript_as_legacy_pubkey(const struct LDKShutdownScript *NONNULL_PTR this_arg);
4683         public static native byte[] ShutdownScript_as_legacy_pubkey(long this_arg);
4684         // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
4685         public static native boolean ShutdownScript_is_compatible(long this_arg, long features);
4686         // void CustomMessageReader_free(struct LDKCustomMessageReader this_ptr);
4687         public static native void CustomMessageReader_free(long this_ptr);
4688         // struct LDKType Type_clone(const struct LDKType *NONNULL_PTR orig);
4689         public static native long Type_clone(long orig);
4690         // void Type_free(struct LDKType this_ptr);
4691         public static native void Type_free(long this_ptr);
4692         // void Score_free(struct LDKScore this_ptr);
4693         public static native void Score_free(long this_ptr);
4694         // void NodeId_free(struct LDKNodeId this_obj);
4695         public static native void NodeId_free(long this_obj);
4696         // struct LDKNodeId NodeId_clone(const struct LDKNodeId *NONNULL_PTR orig);
4697         public static native long NodeId_clone(long orig);
4698         // MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey);
4699         public static native long NodeId_from_pubkey(byte[] pubkey);
4700         // MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg);
4701         public static native byte[] NodeId_as_slice(long this_arg);
4702         // uint64_t NodeId_hash(const struct LDKNodeId *NONNULL_PTR o);
4703         public static native long NodeId_hash(long o);
4704         // struct LDKCVec_u8Z NodeId_write(const struct LDKNodeId *NONNULL_PTR obj);
4705         public static native byte[] NodeId_write(long obj);
4706         // struct LDKCResult_NodeIdDecodeErrorZ NodeId_read(struct LDKu8slice ser);
4707         public static native long NodeId_read(byte[] ser);
4708         // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
4709         public static native void NetworkGraph_free(long this_obj);
4710         // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
4711         public static native long NetworkGraph_clone(long orig);
4712         // void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
4713         public static native void ReadOnlyNetworkGraph_free(long this_obj);
4714         // void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
4715         public static native void NetworkUpdate_free(long this_ptr);
4716         // struct LDKNetworkUpdate NetworkUpdate_clone(const struct LDKNetworkUpdate *NONNULL_PTR orig);
4717         public static native long NetworkUpdate_clone(long orig);
4718         // struct LDKNetworkUpdate NetworkUpdate_channel_update_message(struct LDKChannelUpdate msg);
4719         public static native long NetworkUpdate_channel_update_message(long msg);
4720         // struct LDKNetworkUpdate NetworkUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
4721         public static native long NetworkUpdate_channel_closed(long short_channel_id, boolean is_permanent);
4722         // struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
4723         public static native long NetworkUpdate_node_failure(byte[] node_id, boolean is_permanent);
4724         // struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
4725         public static native byte[] NetworkUpdate_write(long obj);
4726         // struct LDKEventHandler NetGraphMsgHandler_as_EventHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
4727         public static native long NetGraphMsgHandler_as_EventHandler(long this_arg);
4728         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
4729         public static native void NetGraphMsgHandler_free(long this_obj);
4730         // struct LDKNetworkGraph NetGraphMsgHandler_get_network_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_ptr);
4731         public static native long NetGraphMsgHandler_get_network_graph(long this_ptr);
4732         // void NetGraphMsgHandler_set_network_graph(struct LDKNetGraphMsgHandler *NONNULL_PTR this_ptr, struct LDKNetworkGraph val);
4733         public static native void NetGraphMsgHandler_set_network_graph(long this_ptr, long val);
4734         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKNetworkGraph network_graph, struct LDKCOption_AccessZ chain_access, struct LDKLogger logger);
4735         public static native long NetGraphMsgHandler_new(long network_graph, long chain_access, long logger);
4736         // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKCOption_AccessZ chain_access);
4737         public static native void NetGraphMsgHandler_add_chain_access(long this_arg, long chain_access);
4738         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
4739         public static native long NetGraphMsgHandler_as_RoutingMessageHandler(long this_arg);
4740         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
4741         public static native long NetGraphMsgHandler_as_MessageSendEventsProvider(long this_arg);
4742         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
4743         public static native void DirectionalChannelInfo_free(long this_obj);
4744         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
4745         public static native int DirectionalChannelInfo_get_last_update(long this_ptr);
4746         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
4747         public static native void DirectionalChannelInfo_set_last_update(long this_ptr, int val);
4748         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
4749         public static native boolean DirectionalChannelInfo_get_enabled(long this_ptr);
4750         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
4751         public static native void DirectionalChannelInfo_set_enabled(long this_ptr, boolean val);
4752         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
4753         public static native short DirectionalChannelInfo_get_cltv_expiry_delta(long this_ptr);
4754         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
4755         public static native void DirectionalChannelInfo_set_cltv_expiry_delta(long this_ptr, short val);
4756         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
4757         public static native long DirectionalChannelInfo_get_htlc_minimum_msat(long this_ptr);
4758         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
4759         public static native void DirectionalChannelInfo_set_htlc_minimum_msat(long this_ptr, long val);
4760         // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
4761         public static native long DirectionalChannelInfo_get_htlc_maximum_msat(long this_ptr);
4762         // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
4763         public static native void DirectionalChannelInfo_set_htlc_maximum_msat(long this_ptr, long val);
4764         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
4765         public static native long DirectionalChannelInfo_get_fees(long this_ptr);
4766         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
4767         public static native void DirectionalChannelInfo_set_fees(long this_ptr, long val);
4768         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
4769         public static native long DirectionalChannelInfo_get_last_update_message(long this_ptr);
4770         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
4771         public static native void DirectionalChannelInfo_set_last_update_message(long this_ptr, long val);
4772         // MUST_USE_RES struct LDKDirectionalChannelInfo DirectionalChannelInfo_new(uint32_t last_update_arg, bool enabled_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg, struct LDKRoutingFees fees_arg, struct LDKChannelUpdate last_update_message_arg);
4773         public static native long DirectionalChannelInfo_new(int last_update_arg, boolean enabled_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, long htlc_maximum_msat_arg, long fees_arg, long last_update_message_arg);
4774         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
4775         public static native long DirectionalChannelInfo_clone(long orig);
4776         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
4777         public static native byte[] DirectionalChannelInfo_write(long obj);
4778         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
4779         public static native long DirectionalChannelInfo_read(byte[] ser);
4780         // void ChannelInfo_free(struct LDKChannelInfo this_obj);
4781         public static native void ChannelInfo_free(long this_obj);
4782         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
4783         public static native long ChannelInfo_get_features(long this_ptr);
4784         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
4785         public static native void ChannelInfo_set_features(long this_ptr, long val);
4786         // struct LDKNodeId ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
4787         public static native long ChannelInfo_get_node_one(long this_ptr);
4788         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
4789         public static native void ChannelInfo_set_node_one(long this_ptr, long val);
4790         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
4791         public static native long ChannelInfo_get_one_to_two(long this_ptr);
4792         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
4793         public static native void ChannelInfo_set_one_to_two(long this_ptr, long val);
4794         // struct LDKNodeId ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
4795         public static native long ChannelInfo_get_node_two(long this_ptr);
4796         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
4797         public static native void ChannelInfo_set_node_two(long this_ptr, long val);
4798         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
4799         public static native long ChannelInfo_get_two_to_one(long this_ptr);
4800         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
4801         public static native void ChannelInfo_set_two_to_one(long this_ptr, long val);
4802         // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
4803         public static native long ChannelInfo_get_capacity_sats(long this_ptr);
4804         // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
4805         public static native void ChannelInfo_set_capacity_sats(long this_ptr, long val);
4806         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
4807         public static native long ChannelInfo_get_announcement_message(long this_ptr);
4808         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
4809         public static native void ChannelInfo_set_announcement_message(long this_ptr, long val);
4810         // MUST_USE_RES struct LDKChannelInfo ChannelInfo_new(struct LDKChannelFeatures features_arg, struct LDKNodeId node_one_arg, struct LDKDirectionalChannelInfo one_to_two_arg, struct LDKNodeId node_two_arg, struct LDKDirectionalChannelInfo two_to_one_arg, struct LDKCOption_u64Z capacity_sats_arg, struct LDKChannelAnnouncement announcement_message_arg);
4811         public static native long ChannelInfo_new(long features_arg, long node_one_arg, long one_to_two_arg, long node_two_arg, long two_to_one_arg, long capacity_sats_arg, long announcement_message_arg);
4812         // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
4813         public static native long ChannelInfo_clone(long orig);
4814         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
4815         public static native byte[] ChannelInfo_write(long obj);
4816         // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
4817         public static native long ChannelInfo_read(byte[] ser);
4818         // void RoutingFees_free(struct LDKRoutingFees this_obj);
4819         public static native void RoutingFees_free(long this_obj);
4820         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
4821         public static native int RoutingFees_get_base_msat(long this_ptr);
4822         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
4823         public static native void RoutingFees_set_base_msat(long this_ptr, int val);
4824         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
4825         public static native int RoutingFees_get_proportional_millionths(long this_ptr);
4826         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
4827         public static native void RoutingFees_set_proportional_millionths(long this_ptr, int val);
4828         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
4829         public static native long RoutingFees_new(int base_msat_arg, int proportional_millionths_arg);
4830         // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
4831         public static native boolean RoutingFees_eq(long a, long b);
4832         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
4833         public static native long RoutingFees_clone(long orig);
4834         // uint64_t RoutingFees_hash(const struct LDKRoutingFees *NONNULL_PTR o);
4835         public static native long RoutingFees_hash(long o);
4836         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
4837         public static native byte[] RoutingFees_write(long obj);
4838         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
4839         public static native long RoutingFees_read(byte[] ser);
4840         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
4841         public static native void NodeAnnouncementInfo_free(long this_obj);
4842         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
4843         public static native long NodeAnnouncementInfo_get_features(long this_ptr);
4844         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
4845         public static native void NodeAnnouncementInfo_set_features(long this_ptr, long val);
4846         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
4847         public static native int NodeAnnouncementInfo_get_last_update(long this_ptr);
4848         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
4849         public static native void NodeAnnouncementInfo_set_last_update(long this_ptr, int val);
4850         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
4851         public static native byte[] NodeAnnouncementInfo_get_rgb(long this_ptr);
4852         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
4853         public static native void NodeAnnouncementInfo_set_rgb(long this_ptr, byte[] val);
4854         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
4855         public static native byte[] NodeAnnouncementInfo_get_alias(long this_ptr);
4856         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4857         public static native void NodeAnnouncementInfo_set_alias(long this_ptr, byte[] val);
4858         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
4859         public static native void NodeAnnouncementInfo_set_addresses(long this_ptr, long[] val);
4860         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
4861         public static native long NodeAnnouncementInfo_get_announcement_message(long this_ptr);
4862         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
4863         public static native void NodeAnnouncementInfo_set_announcement_message(long this_ptr, long val);
4864         // MUST_USE_RES struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_new(struct LDKNodeFeatures features_arg, uint32_t last_update_arg, struct LDKThreeBytes rgb_arg, struct LDKThirtyTwoBytes alias_arg, struct LDKCVec_NetAddressZ addresses_arg, struct LDKNodeAnnouncement announcement_message_arg);
4865         public static native long NodeAnnouncementInfo_new(long features_arg, int last_update_arg, byte[] rgb_arg, byte[] alias_arg, long[] addresses_arg, long announcement_message_arg);
4866         // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
4867         public static native long NodeAnnouncementInfo_clone(long orig);
4868         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
4869         public static native byte[] NodeAnnouncementInfo_write(long obj);
4870         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
4871         public static native long NodeAnnouncementInfo_read(byte[] ser);
4872         // void NodeInfo_free(struct LDKNodeInfo this_obj);
4873         public static native void NodeInfo_free(long this_obj);
4874         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
4875         public static native void NodeInfo_set_channels(long this_ptr, long[] val);
4876         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
4877         public static native long NodeInfo_get_lowest_inbound_channel_fees(long this_ptr);
4878         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
4879         public static native void NodeInfo_set_lowest_inbound_channel_fees(long this_ptr, long val);
4880         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
4881         public static native long NodeInfo_get_announcement_info(long this_ptr);
4882         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
4883         public static native void NodeInfo_set_announcement_info(long this_ptr, long val);
4884         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
4885         public static native long NodeInfo_new(long[] channels_arg, long lowest_inbound_channel_fees_arg, long announcement_info_arg);
4886         // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
4887         public static native long NodeInfo_clone(long orig);
4888         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
4889         public static native byte[] NodeInfo_write(long obj);
4890         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
4891         public static native long NodeInfo_read(byte[] ser);
4892         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
4893         public static native byte[] NetworkGraph_write(long obj);
4894         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
4895         public static native long NetworkGraph_read(byte[] ser);
4896         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
4897         public static native long NetworkGraph_new(byte[] genesis_hash);
4898         // MUST_USE_RES struct LDKReadOnlyNetworkGraph NetworkGraph_read_only(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
4899         public static native long NetworkGraph_read_only(long this_arg);
4900         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
4901         public static native long NetworkGraph_update_node_from_announcement(long this_arg, long msg);
4902         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
4903         public static native long NetworkGraph_update_node_from_unsigned_announcement(long this_arg, long msg);
4904         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_AccessZ chain_access);
4905         public static native long NetworkGraph_update_channel_from_announcement(long this_arg, long msg, long chain_access);
4906         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_AccessZ chain_access);
4907         public static native long NetworkGraph_update_channel_from_unsigned_announcement(long this_arg, long msg, long chain_access);
4908         // void NetworkGraph_close_channel_from_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
4909         public static native void NetworkGraph_close_channel_from_update(long this_arg, long short_channel_id, boolean is_permanent);
4910         // void NetworkGraph_fail_node(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey _node_id, bool is_permanent);
4911         public static native void NetworkGraph_fail_node(long this_arg, byte[] _node_id, boolean is_permanent);
4912         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
4913         public static native long NetworkGraph_update_channel(long this_arg, long msg);
4914         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
4915         public static native long NetworkGraph_update_channel_unsigned(long this_arg, long msg);
4916         // MUST_USE_RES struct LDKCOption_CVec_NetAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
4917         public static native long ReadOnlyNetworkGraph_get_addresses(long this_arg, byte[] pubkey);
4918         // void RouteHop_free(struct LDKRouteHop this_obj);
4919         public static native void RouteHop_free(long this_obj);
4920         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
4921         public static native byte[] RouteHop_get_pubkey(long this_ptr);
4922         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4923         public static native void RouteHop_set_pubkey(long this_ptr, byte[] val);
4924         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
4925         public static native long RouteHop_get_node_features(long this_ptr);
4926         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
4927         public static native void RouteHop_set_node_features(long this_ptr, long val);
4928         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
4929         public static native long RouteHop_get_short_channel_id(long this_ptr);
4930         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
4931         public static native void RouteHop_set_short_channel_id(long this_ptr, long val);
4932         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
4933         public static native long RouteHop_get_channel_features(long this_ptr);
4934         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
4935         public static native void RouteHop_set_channel_features(long this_ptr, long val);
4936         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
4937         public static native long RouteHop_get_fee_msat(long this_ptr);
4938         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
4939         public static native void RouteHop_set_fee_msat(long this_ptr, long val);
4940         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
4941         public static native int RouteHop_get_cltv_expiry_delta(long this_ptr);
4942         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
4943         public static native void RouteHop_set_cltv_expiry_delta(long this_ptr, int val);
4944         // MUST_USE_RES struct LDKRouteHop RouteHop_new(struct LDKPublicKey pubkey_arg, struct LDKNodeFeatures node_features_arg, uint64_t short_channel_id_arg, struct LDKChannelFeatures channel_features_arg, uint64_t fee_msat_arg, uint32_t cltv_expiry_delta_arg);
4945         public static native long RouteHop_new(byte[] pubkey_arg, long node_features_arg, long short_channel_id_arg, long channel_features_arg, long fee_msat_arg, int cltv_expiry_delta_arg);
4946         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
4947         public static native long RouteHop_clone(long orig);
4948         // uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
4949         public static native long RouteHop_hash(long o);
4950         // bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
4951         public static native boolean RouteHop_eq(long a, long b);
4952         // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
4953         public static native byte[] RouteHop_write(long obj);
4954         // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
4955         public static native long RouteHop_read(byte[] ser);
4956         // void Route_free(struct LDKRoute this_obj);
4957         public static native void Route_free(long this_obj);
4958         // struct LDKCVec_CVec_RouteHopZZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
4959         public static native long[][] Route_get_paths(long this_ptr);
4960         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
4961         public static native void Route_set_paths(long this_ptr, long[][] val);
4962         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
4963         public static native long Route_new(long[][] paths_arg);
4964         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
4965         public static native long Route_clone(long orig);
4966         // uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
4967         public static native long Route_hash(long o);
4968         // bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
4969         public static native boolean Route_eq(long a, long b);
4970         // MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
4971         public static native long Route_get_total_fees(long this_arg);
4972         // MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
4973         public static native long Route_get_total_amount(long this_arg);
4974         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
4975         public static native byte[] Route_write(long obj);
4976         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
4977         public static native long Route_read(byte[] ser);
4978         // void RouteHint_free(struct LDKRouteHint this_obj);
4979         public static native void RouteHint_free(long this_obj);
4980         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
4981         public static native long RouteHint_clone(long orig);
4982         // uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
4983         public static native long RouteHint_hash(long o);
4984         // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
4985         public static native boolean RouteHint_eq(long a, long b);
4986         // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
4987         public static native void RouteHintHop_free(long this_obj);
4988         // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
4989         public static native byte[] RouteHintHop_get_src_node_id(long this_ptr);
4990         // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4991         public static native void RouteHintHop_set_src_node_id(long this_ptr, byte[] val);
4992         // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
4993         public static native long RouteHintHop_get_short_channel_id(long this_ptr);
4994         // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
4995         public static native void RouteHintHop_set_short_channel_id(long this_ptr, long val);
4996         // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
4997         public static native long RouteHintHop_get_fees(long this_ptr);
4998         // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
4999         public static native void RouteHintHop_set_fees(long this_ptr, long val);
5000         // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
5001         public static native short RouteHintHop_get_cltv_expiry_delta(long this_ptr);
5002         // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
5003         public static native void RouteHintHop_set_cltv_expiry_delta(long this_ptr, short val);
5004         // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
5005         public static native long RouteHintHop_get_htlc_minimum_msat(long this_ptr);
5006         // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
5007         public static native void RouteHintHop_set_htlc_minimum_msat(long this_ptr, long val);
5008         // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
5009         public static native long RouteHintHop_get_htlc_maximum_msat(long this_ptr);
5010         // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
5011         public static native void RouteHintHop_set_htlc_maximum_msat(long this_ptr, long val);
5012         // MUST_USE_RES struct LDKRouteHintHop RouteHintHop_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg);
5013         public static native long RouteHintHop_new(byte[] src_node_id_arg, long short_channel_id_arg, long fees_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg, long htlc_maximum_msat_arg);
5014         // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
5015         public static native long RouteHintHop_clone(long orig);
5016         // uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
5017         public static native long RouteHintHop_hash(long o);
5018         // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
5019         public static native boolean RouteHintHop_eq(long a, long b);
5020         // struct LDKCResult_RouteLightningErrorZ get_keysend_route(struct LDKPublicKey our_node_pubkey, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger, const struct LDKScore *NONNULL_PTR scorer);
5021         public static native long get_keysend_route(byte[] our_node_pubkey, long network, byte[] payee, long[] first_hops, long[] last_hops, long final_value_msat, int final_cltv, long logger, long scorer);
5022         // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_pubkey, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKInvoiceFeatures payee_features, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger, const struct LDKScore *NONNULL_PTR scorer);
5023         public static native long get_route(byte[] our_node_pubkey, long network, byte[] payee, long payee_features, long[] first_hops, long[] last_hops, long final_value_msat, int final_cltv, long logger, long scorer);
5024         // void Scorer_free(struct LDKScorer this_obj);
5025         public static native void Scorer_free(long this_obj);
5026         // MUST_USE_RES struct LDKScorer Scorer_new(uint64_t base_penalty_msat);
5027         public static native long Scorer_new(long base_penalty_msat);
5028         // MUST_USE_RES struct LDKScorer Scorer_default(void);
5029         public static native long Scorer_default();
5030         // struct LDKScore Scorer_as_Score(const struct LDKScorer *NONNULL_PTR this_arg);
5031         public static native long Scorer_as_Score(long this_arg);
5032         // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
5033         public static native void FilesystemPersister_free(long this_obj);
5034         // MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKStr path_to_channel_data);
5035         public static native long FilesystemPersister_new(String path_to_channel_data);
5036         // MUST_USE_RES struct LDKStr FilesystemPersister_get_data_dir(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
5037         public static native String FilesystemPersister_get_data_dir(long this_arg);
5038         // MUST_USE_RES struct LDKCResult_NoneErrorZ FilesystemPersister_persist_manager(struct LDKStr data_dir, const struct LDKChannelManager *NONNULL_PTR manager);
5039         public static native long FilesystemPersister_persist_manager(String data_dir, long manager);
5040         // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ FilesystemPersister_read_channelmonitors(const struct LDKFilesystemPersister *NONNULL_PTR this_arg, struct LDKKeysInterface keys_manager);
5041         public static native long FilesystemPersister_read_channelmonitors(long this_arg, long keys_manager);
5042         // struct LDKPersist FilesystemPersister_as_Persist(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
5043         public static native long FilesystemPersister_as_Persist(long this_arg);
5044         // void BackgroundProcessor_free(struct LDKBackgroundProcessor this_obj);
5045         public static native void BackgroundProcessor_free(long this_obj);
5046         // void ChannelManagerPersister_free(struct LDKChannelManagerPersister this_ptr);
5047         public static native void ChannelManagerPersister_free(long this_ptr);
5048         // MUST_USE_RES struct LDKBackgroundProcessor BackgroundProcessor_start(struct LDKChannelManagerPersister persister, struct LDKEventHandler event_handler, const struct LDKChainMonitor *NONNULL_PTR chain_monitor, const struct LDKChannelManager *NONNULL_PTR channel_manager, struct LDKNetGraphMsgHandler net_graph_msg_handler, const struct LDKPeerManager *NONNULL_PTR peer_manager, struct LDKLogger logger);
5049         public static native long BackgroundProcessor_start(long persister, long event_handler, long chain_monitor, long channel_manager, long net_graph_msg_handler, long peer_manager, long logger);
5050         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_join(struct LDKBackgroundProcessor this_arg);
5051         public static native long BackgroundProcessor_join(long this_arg);
5052         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg);
5053         public static native long BackgroundProcessor_stop(long this_arg);
5054         // void check_platform(void);
5055         public static native void check_platform();
5056         // void Invoice_free(struct LDKInvoice this_obj);
5057         public static native void Invoice_free(long this_obj);
5058         // bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice *NONNULL_PTR b);
5059         public static native boolean Invoice_eq(long a, long b);
5060         // struct LDKInvoice Invoice_clone(const struct LDKInvoice *NONNULL_PTR orig);
5061         public static native long Invoice_clone(long orig);
5062         // void SignedRawInvoice_free(struct LDKSignedRawInvoice this_obj);
5063         public static native void SignedRawInvoice_free(long this_obj);
5064         // bool SignedRawInvoice_eq(const struct LDKSignedRawInvoice *NONNULL_PTR a, const struct LDKSignedRawInvoice *NONNULL_PTR b);
5065         public static native boolean SignedRawInvoice_eq(long a, long b);
5066         // struct LDKSignedRawInvoice SignedRawInvoice_clone(const struct LDKSignedRawInvoice *NONNULL_PTR orig);
5067         public static native long SignedRawInvoice_clone(long orig);
5068         // void RawInvoice_free(struct LDKRawInvoice this_obj);
5069         public static native void RawInvoice_free(long this_obj);
5070         // struct LDKRawDataPart RawInvoice_get_data(const struct LDKRawInvoice *NONNULL_PTR this_ptr);
5071         public static native long RawInvoice_get_data(long this_ptr);
5072         // void RawInvoice_set_data(struct LDKRawInvoice *NONNULL_PTR this_ptr, struct LDKRawDataPart val);
5073         public static native void RawInvoice_set_data(long this_ptr, long val);
5074         // bool RawInvoice_eq(const struct LDKRawInvoice *NONNULL_PTR a, const struct LDKRawInvoice *NONNULL_PTR b);
5075         public static native boolean RawInvoice_eq(long a, long b);
5076         // struct LDKRawInvoice RawInvoice_clone(const struct LDKRawInvoice *NONNULL_PTR orig);
5077         public static native long RawInvoice_clone(long orig);
5078         // void RawDataPart_free(struct LDKRawDataPart this_obj);
5079         public static native void RawDataPart_free(long this_obj);
5080         // struct LDKPositiveTimestamp RawDataPart_get_timestamp(const struct LDKRawDataPart *NONNULL_PTR this_ptr);
5081         public static native long RawDataPart_get_timestamp(long this_ptr);
5082         // void RawDataPart_set_timestamp(struct LDKRawDataPart *NONNULL_PTR this_ptr, struct LDKPositiveTimestamp val);
5083         public static native void RawDataPart_set_timestamp(long this_ptr, long val);
5084         // bool RawDataPart_eq(const struct LDKRawDataPart *NONNULL_PTR a, const struct LDKRawDataPart *NONNULL_PTR b);
5085         public static native boolean RawDataPart_eq(long a, long b);
5086         // struct LDKRawDataPart RawDataPart_clone(const struct LDKRawDataPart *NONNULL_PTR orig);
5087         public static native long RawDataPart_clone(long orig);
5088         // void PositiveTimestamp_free(struct LDKPositiveTimestamp this_obj);
5089         public static native void PositiveTimestamp_free(long this_obj);
5090         // bool PositiveTimestamp_eq(const struct LDKPositiveTimestamp *NONNULL_PTR a, const struct LDKPositiveTimestamp *NONNULL_PTR b);
5091         public static native boolean PositiveTimestamp_eq(long a, long b);
5092         // struct LDKPositiveTimestamp PositiveTimestamp_clone(const struct LDKPositiveTimestamp *NONNULL_PTR orig);
5093         public static native long PositiveTimestamp_clone(long orig);
5094         // enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig);
5095         public static native SiPrefix SiPrefix_clone(long orig);
5096         // enum LDKSiPrefix SiPrefix_milli(void);
5097         public static native SiPrefix SiPrefix_milli();
5098         // enum LDKSiPrefix SiPrefix_micro(void);
5099         public static native SiPrefix SiPrefix_micro();
5100         // enum LDKSiPrefix SiPrefix_nano(void);
5101         public static native SiPrefix SiPrefix_nano();
5102         // enum LDKSiPrefix SiPrefix_pico(void);
5103         public static native SiPrefix SiPrefix_pico();
5104         // bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b);
5105         public static native boolean SiPrefix_eq(long a, long b);
5106         // MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR this_arg);
5107         public static native long SiPrefix_multiplier(long this_arg);
5108         // enum LDKCurrency Currency_clone(const enum LDKCurrency *NONNULL_PTR orig);
5109         public static native Currency Currency_clone(long orig);
5110         // enum LDKCurrency Currency_bitcoin(void);
5111         public static native Currency Currency_bitcoin();
5112         // enum LDKCurrency Currency_bitcoin_testnet(void);
5113         public static native Currency Currency_bitcoin_testnet();
5114         // enum LDKCurrency Currency_regtest(void);
5115         public static native Currency Currency_regtest();
5116         // enum LDKCurrency Currency_simnet(void);
5117         public static native Currency Currency_simnet();
5118         // enum LDKCurrency Currency_signet(void);
5119         public static native Currency Currency_signet();
5120         // uint64_t Currency_hash(const enum LDKCurrency *NONNULL_PTR o);
5121         public static native long Currency_hash(long o);
5122         // bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b);
5123         public static native boolean Currency_eq(long a, long b);
5124         // void Sha256_free(struct LDKSha256 this_obj);
5125         public static native void Sha256_free(long this_obj);
5126         // struct LDKSha256 Sha256_clone(const struct LDKSha256 *NONNULL_PTR orig);
5127         public static native long Sha256_clone(long orig);
5128         // uint64_t Sha256_hash(const struct LDKSha256 *NONNULL_PTR o);
5129         public static native long Sha256_hash(long o);
5130         // bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b);
5131         public static native boolean Sha256_eq(long a, long b);
5132         // void Description_free(struct LDKDescription this_obj);
5133         public static native void Description_free(long this_obj);
5134         // struct LDKDescription Description_clone(const struct LDKDescription *NONNULL_PTR orig);
5135         public static native long Description_clone(long orig);
5136         // uint64_t Description_hash(const struct LDKDescription *NONNULL_PTR o);
5137         public static native long Description_hash(long o);
5138         // bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b);
5139         public static native boolean Description_eq(long a, long b);
5140         // void PayeePubKey_free(struct LDKPayeePubKey this_obj);
5141         public static native void PayeePubKey_free(long this_obj);
5142         // struct LDKPayeePubKey PayeePubKey_clone(const struct LDKPayeePubKey *NONNULL_PTR orig);
5143         public static native long PayeePubKey_clone(long orig);
5144         // uint64_t PayeePubKey_hash(const struct LDKPayeePubKey *NONNULL_PTR o);
5145         public static native long PayeePubKey_hash(long o);
5146         // bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b);
5147         public static native boolean PayeePubKey_eq(long a, long b);
5148         // void ExpiryTime_free(struct LDKExpiryTime this_obj);
5149         public static native void ExpiryTime_free(long this_obj);
5150         // struct LDKExpiryTime ExpiryTime_clone(const struct LDKExpiryTime *NONNULL_PTR orig);
5151         public static native long ExpiryTime_clone(long orig);
5152         // uint64_t ExpiryTime_hash(const struct LDKExpiryTime *NONNULL_PTR o);
5153         public static native long ExpiryTime_hash(long o);
5154         // bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b);
5155         public static native boolean ExpiryTime_eq(long a, long b);
5156         // void MinFinalCltvExpiry_free(struct LDKMinFinalCltvExpiry this_obj);
5157         public static native void MinFinalCltvExpiry_free(long this_obj);
5158         // struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_clone(const struct LDKMinFinalCltvExpiry *NONNULL_PTR orig);
5159         public static native long MinFinalCltvExpiry_clone(long orig);
5160         // uint64_t MinFinalCltvExpiry_hash(const struct LDKMinFinalCltvExpiry *NONNULL_PTR o);
5161         public static native long MinFinalCltvExpiry_hash(long o);
5162         // bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b);
5163         public static native boolean MinFinalCltvExpiry_eq(long a, long b);
5164         // void Fallback_free(struct LDKFallback this_ptr);
5165         public static native void Fallback_free(long this_ptr);
5166         // struct LDKFallback Fallback_clone(const struct LDKFallback *NONNULL_PTR orig);
5167         public static native long Fallback_clone(long orig);
5168         // struct LDKFallback Fallback_seg_wit_program(struct LDKu5 version, struct LDKCVec_u8Z program);
5169         public static native long Fallback_seg_wit_program(byte version, byte[] program);
5170         // struct LDKFallback Fallback_pub_key_hash(struct LDKTwentyBytes a);
5171         public static native long Fallback_pub_key_hash(byte[] a);
5172         // struct LDKFallback Fallback_script_hash(struct LDKTwentyBytes a);
5173         public static native long Fallback_script_hash(byte[] a);
5174         // uint64_t Fallback_hash(const struct LDKFallback *NONNULL_PTR o);
5175         public static native long Fallback_hash(long o);
5176         // bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b);
5177         public static native boolean Fallback_eq(long a, long b);
5178         // void InvoiceSignature_free(struct LDKInvoiceSignature this_obj);
5179         public static native void InvoiceSignature_free(long this_obj);
5180         // struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignature *NONNULL_PTR orig);
5181         public static native long InvoiceSignature_clone(long orig);
5182         // bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b);
5183         public static native boolean InvoiceSignature_eq(long a, long b);
5184         // void PrivateRoute_free(struct LDKPrivateRoute this_obj);
5185         public static native void PrivateRoute_free(long this_obj);
5186         // struct LDKPrivateRoute PrivateRoute_clone(const struct LDKPrivateRoute *NONNULL_PTR orig);
5187         public static native long PrivateRoute_clone(long orig);
5188         // uint64_t PrivateRoute_hash(const struct LDKPrivateRoute *NONNULL_PTR o);
5189         public static native long PrivateRoute_hash(long o);
5190         // bool PrivateRoute_eq(const struct LDKPrivateRoute *NONNULL_PTR a, const struct LDKPrivateRoute *NONNULL_PTR b);
5191         public static native boolean PrivateRoute_eq(long a, long b);
5192         // MUST_USE_RES struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ SignedRawInvoice_into_parts(struct LDKSignedRawInvoice this_arg);
5193         public static native long SignedRawInvoice_into_parts(long this_arg);
5194         // MUST_USE_RES struct LDKRawInvoice SignedRawInvoice_raw_invoice(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
5195         public static native long SignedRawInvoice_raw_invoice(long this_arg);
5196         // MUST_USE_RES const uint8_t (*SignedRawInvoice_hash(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg))[32];
5197         public static native byte[] SignedRawInvoice_hash(long this_arg);
5198         // MUST_USE_RES struct LDKInvoiceSignature SignedRawInvoice_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
5199         public static native long SignedRawInvoice_signature(long this_arg);
5200         // MUST_USE_RES struct LDKCResult_PayeePubKeyErrorZ SignedRawInvoice_recover_payee_pub_key(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
5201         public static native long SignedRawInvoice_recover_payee_pub_key(long this_arg);
5202         // MUST_USE_RES bool SignedRawInvoice_check_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
5203         public static native boolean SignedRawInvoice_check_signature(long this_arg);
5204         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
5205         public static native byte[] RawInvoice_hash(long this_arg);
5206         // MUST_USE_RES struct LDKSha256 RawInvoice_payment_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
5207         public static native long RawInvoice_payment_hash(long this_arg);
5208         // MUST_USE_RES struct LDKDescription RawInvoice_description(const struct LDKRawInvoice *NONNULL_PTR this_arg);
5209         public static native long RawInvoice_description(long this_arg);
5210         // MUST_USE_RES struct LDKPayeePubKey RawInvoice_payee_pub_key(const struct LDKRawInvoice *NONNULL_PTR this_arg);
5211         public static native long RawInvoice_payee_pub_key(long this_arg);
5212         // MUST_USE_RES struct LDKSha256 RawInvoice_description_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
5213         public static native long RawInvoice_description_hash(long this_arg);
5214         // MUST_USE_RES struct LDKExpiryTime RawInvoice_expiry_time(const struct LDKRawInvoice *NONNULL_PTR this_arg);
5215         public static native long RawInvoice_expiry_time(long this_arg);
5216         // MUST_USE_RES struct LDKMinFinalCltvExpiry RawInvoice_min_final_cltv_expiry(const struct LDKRawInvoice *NONNULL_PTR this_arg);
5217         public static native long RawInvoice_min_final_cltv_expiry(long this_arg);
5218         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_payment_secret(const struct LDKRawInvoice *NONNULL_PTR this_arg);
5219         public static native byte[] RawInvoice_payment_secret(long this_arg);
5220         // MUST_USE_RES struct LDKInvoiceFeatures RawInvoice_features(const struct LDKRawInvoice *NONNULL_PTR this_arg);
5221         public static native long RawInvoice_features(long this_arg);
5222         // MUST_USE_RES struct LDKCVec_PrivateRouteZ RawInvoice_private_routes(const struct LDKRawInvoice *NONNULL_PTR this_arg);
5223         public static native long[] RawInvoice_private_routes(long this_arg);
5224         // MUST_USE_RES struct LDKCOption_u64Z RawInvoice_amount_pico_btc(const struct LDKRawInvoice *NONNULL_PTR this_arg);
5225         public static native long RawInvoice_amount_pico_btc(long this_arg);
5226         // MUST_USE_RES enum LDKCurrency RawInvoice_currency(const struct LDKRawInvoice *NONNULL_PTR this_arg);
5227         public static native Currency RawInvoice_currency(long this_arg);
5228         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_unix_timestamp(uint64_t unix_seconds);
5229         public static native long PositiveTimestamp_from_unix_timestamp(long unix_seconds);
5230         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_system_time(uint64_t time);
5231         public static native long PositiveTimestamp_from_system_time(long time);
5232         // MUST_USE_RES uint64_t PositiveTimestamp_as_unix_timestamp(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
5233         public static native long PositiveTimestamp_as_unix_timestamp(long this_arg);
5234         // MUST_USE_RES uint64_t PositiveTimestamp_as_time(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
5235         public static native long PositiveTimestamp_as_time(long this_arg);
5236         // MUST_USE_RES struct LDKSignedRawInvoice Invoice_into_signed_raw(struct LDKInvoice this_arg);
5237         public static native long Invoice_into_signed_raw(long this_arg);
5238         // MUST_USE_RES struct LDKCResult_NoneSemanticErrorZ Invoice_check_signature(const struct LDKInvoice *NONNULL_PTR this_arg);
5239         public static native long Invoice_check_signature(long this_arg);
5240         // MUST_USE_RES struct LDKCResult_InvoiceSemanticErrorZ Invoice_from_signed(struct LDKSignedRawInvoice signed_invoice);
5241         public static native long Invoice_from_signed(long signed_invoice);
5242         // MUST_USE_RES uint64_t Invoice_timestamp(const struct LDKInvoice *NONNULL_PTR this_arg);
5243         public static native long Invoice_timestamp(long this_arg);
5244         // MUST_USE_RES const uint8_t (*Invoice_payment_hash(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
5245         public static native byte[] Invoice_payment_hash(long this_arg);
5246         // MUST_USE_RES struct LDKPublicKey Invoice_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
5247         public static native byte[] Invoice_payee_pub_key(long this_arg);
5248         // MUST_USE_RES struct LDKThirtyTwoBytes Invoice_payment_secret(const struct LDKInvoice *NONNULL_PTR this_arg);
5249         public static native byte[] Invoice_payment_secret(long this_arg);
5250         // MUST_USE_RES struct LDKInvoiceFeatures Invoice_features(const struct LDKInvoice *NONNULL_PTR this_arg);
5251         public static native long Invoice_features(long this_arg);
5252         // MUST_USE_RES struct LDKPublicKey Invoice_recover_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
5253         public static native byte[] Invoice_recover_payee_pub_key(long this_arg);
5254         // MUST_USE_RES uint64_t Invoice_expiry_time(const struct LDKInvoice *NONNULL_PTR this_arg);
5255         public static native long Invoice_expiry_time(long this_arg);
5256         // MUST_USE_RES uint64_t Invoice_min_final_cltv_expiry(const struct LDKInvoice *NONNULL_PTR this_arg);
5257         public static native long Invoice_min_final_cltv_expiry(long this_arg);
5258         // MUST_USE_RES struct LDKCVec_PrivateRouteZ Invoice_private_routes(const struct LDKInvoice *NONNULL_PTR this_arg);
5259         public static native long[] Invoice_private_routes(long this_arg);
5260         // MUST_USE_RES struct LDKCVec_RouteHintZ Invoice_route_hints(const struct LDKInvoice *NONNULL_PTR this_arg);
5261         public static native long[] Invoice_route_hints(long this_arg);
5262         // MUST_USE_RES enum LDKCurrency Invoice_currency(const struct LDKInvoice *NONNULL_PTR this_arg);
5263         public static native Currency Invoice_currency(long this_arg);
5264         // MUST_USE_RES struct LDKCOption_u64Z Invoice_amount_pico_btc(const struct LDKInvoice *NONNULL_PTR this_arg);
5265         public static native long Invoice_amount_pico_btc(long this_arg);
5266         // MUST_USE_RES struct LDKCResult_DescriptionCreationErrorZ Description_new(struct LDKStr description);
5267         public static native long Description_new(String description);
5268         // MUST_USE_RES struct LDKStr Description_into_inner(struct LDKDescription this_arg);
5269         public static native String Description_into_inner(long this_arg);
5270         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_seconds(uint64_t seconds);
5271         public static native long ExpiryTime_from_seconds(long seconds);
5272         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_duration(uint64_t duration);
5273         public static native long ExpiryTime_from_duration(long duration);
5274         // MUST_USE_RES uint64_t ExpiryTime_as_seconds(const struct LDKExpiryTime *NONNULL_PTR this_arg);
5275         public static native long ExpiryTime_as_seconds(long this_arg);
5276         // MUST_USE_RES uint64_t ExpiryTime_as_duration(const struct LDKExpiryTime *NONNULL_PTR this_arg);
5277         public static native long ExpiryTime_as_duration(long this_arg);
5278         // MUST_USE_RES struct LDKCResult_PrivateRouteCreationErrorZ PrivateRoute_new(struct LDKRouteHint hops);
5279         public static native long PrivateRoute_new(long hops);
5280         // MUST_USE_RES struct LDKRouteHint PrivateRoute_into_inner(struct LDKPrivateRoute this_arg);
5281         public static native long PrivateRoute_into_inner(long this_arg);
5282         // enum LDKCreationError CreationError_clone(const enum LDKCreationError *NONNULL_PTR orig);
5283         public static native CreationError CreationError_clone(long orig);
5284         // enum LDKCreationError CreationError_description_too_long(void);
5285         public static native CreationError CreationError_description_too_long();
5286         // enum LDKCreationError CreationError_route_too_long(void);
5287         public static native CreationError CreationError_route_too_long();
5288         // enum LDKCreationError CreationError_timestamp_out_of_bounds(void);
5289         public static native CreationError CreationError_timestamp_out_of_bounds();
5290         // enum LDKCreationError CreationError_expiry_time_out_of_bounds(void);
5291         public static native CreationError CreationError_expiry_time_out_of_bounds();
5292         // bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b);
5293         public static native boolean CreationError_eq(long a, long b);
5294         // struct LDKStr CreationError_to_str(const enum LDKCreationError *NONNULL_PTR o);
5295         public static native String CreationError_to_str(long o);
5296         // enum LDKSemanticError SemanticError_clone(const enum LDKSemanticError *NONNULL_PTR orig);
5297         public static native SemanticError SemanticError_clone(long orig);
5298         // enum LDKSemanticError SemanticError_no_payment_hash(void);
5299         public static native SemanticError SemanticError_no_payment_hash();
5300         // enum LDKSemanticError SemanticError_multiple_payment_hashes(void);
5301         public static native SemanticError SemanticError_multiple_payment_hashes();
5302         // enum LDKSemanticError SemanticError_no_description(void);
5303         public static native SemanticError SemanticError_no_description();
5304         // enum LDKSemanticError SemanticError_multiple_descriptions(void);
5305         public static native SemanticError SemanticError_multiple_descriptions();
5306         // enum LDKSemanticError SemanticError_no_payment_secret(void);
5307         public static native SemanticError SemanticError_no_payment_secret();
5308         // enum LDKSemanticError SemanticError_multiple_payment_secrets(void);
5309         public static native SemanticError SemanticError_multiple_payment_secrets();
5310         // enum LDKSemanticError SemanticError_invalid_features(void);
5311         public static native SemanticError SemanticError_invalid_features();
5312         // enum LDKSemanticError SemanticError_invalid_recovery_id(void);
5313         public static native SemanticError SemanticError_invalid_recovery_id();
5314         // enum LDKSemanticError SemanticError_invalid_signature(void);
5315         public static native SemanticError SemanticError_invalid_signature();
5316         // enum LDKSemanticError SemanticError_imprecise_amount(void);
5317         public static native SemanticError SemanticError_imprecise_amount();
5318         // bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b);
5319         public static native boolean SemanticError_eq(long a, long b);
5320         // struct LDKStr SemanticError_to_str(const enum LDKSemanticError *NONNULL_PTR o);
5321         public static native String SemanticError_to_str(long o);
5322         // void SignOrCreationError_free(struct LDKSignOrCreationError this_ptr);
5323         public static native void SignOrCreationError_free(long this_ptr);
5324         // struct LDKSignOrCreationError SignOrCreationError_clone(const struct LDKSignOrCreationError *NONNULL_PTR orig);
5325         public static native long SignOrCreationError_clone(long orig);
5326         // struct LDKSignOrCreationError SignOrCreationError_sign_error(void);
5327         public static native long SignOrCreationError_sign_error();
5328         // struct LDKSignOrCreationError SignOrCreationError_creation_error(enum LDKCreationError a);
5329         public static native long SignOrCreationError_creation_error(CreationError a);
5330         // bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b);
5331         public static native boolean SignOrCreationError_eq(long a, long b);
5332         // struct LDKStr SignOrCreationError_to_str(const struct LDKSignOrCreationError *NONNULL_PTR o);
5333         public static native String SignOrCreationError_to_str(long o);
5334         // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description);
5335         public static native long create_invoice_from_channelmanager(long channelmanager, long keys_manager, Currency network, long amt_msat, String description);
5336         // struct LDKCResult_SiPrefixNoneZ SiPrefix_from_str(struct LDKStr s);
5337         public static native long SiPrefix_from_str(String s);
5338         // struct LDKCResult_InvoiceNoneZ Invoice_from_str(struct LDKStr s);
5339         public static native long Invoice_from_str(String s);
5340         // struct LDKCResult_SignedRawInvoiceNoneZ SignedRawInvoice_from_str(struct LDKStr s);
5341         public static native long SignedRawInvoice_from_str(String s);
5342         // struct LDKStr Invoice_to_str(const struct LDKInvoice *NONNULL_PTR o);
5343         public static native String Invoice_to_str(long o);
5344         // struct LDKStr SignedRawInvoice_to_str(const struct LDKSignedRawInvoice *NONNULL_PTR o);
5345         public static native String SignedRawInvoice_to_str(long o);
5346         // struct LDKStr Currency_to_str(const enum LDKCurrency *NONNULL_PTR o);
5347         public static native String Currency_to_str(long o);
5348         // struct LDKStr SiPrefix_to_str(const enum LDKSiPrefix *NONNULL_PTR o);
5349         public static native String SiPrefix_to_str(long o);
5350 }