49197d37bcd3809fd57ffe2ed26a47d3debb1af4
[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 { COption_NoneZ.values(); /* Force enum statics to run */ }
71         static { ChannelMonitorUpdateErr.values(); /* Force enum statics to run */ }
72         static { ConfirmationTarget.values(); /* Force enum statics to run */ }
73         static { CreationError.values(); /* Force enum statics to run */ }
74         static { Currency.values(); /* Force enum statics to run */ }
75         static { IOError.values(); /* Force enum statics to run */ }
76         static { Level.values(); /* Force enum statics to run */ }
77         static { Network.values(); /* Force enum statics to run */ }
78         static { Secp256k1Error.values(); /* Force enum statics to run */ }
79         static { SemanticError.values(); /* Force enum statics to run */ }
80         static { SiPrefix.values(); /* Force enum statics to run */ }
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         // struct LDKSecretKey CResult_SecretKeyErrorZ_get_ok(LDKCResult_SecretKeyErrorZ *NONNULL_PTR owner);
86         public static native byte[] CResult_SecretKeyErrorZ_get_ok(long owner);
87         // enum LDKSecp256k1Error CResult_SecretKeyErrorZ_get_err(LDKCResult_SecretKeyErrorZ *NONNULL_PTR owner);
88         public static native Secp256k1Error CResult_SecretKeyErrorZ_get_err(long owner);
89         // struct LDKPublicKey CResult_PublicKeyErrorZ_get_ok(LDKCResult_PublicKeyErrorZ *NONNULL_PTR owner);
90         public static native byte[] CResult_PublicKeyErrorZ_get_ok(long owner);
91         // enum LDKSecp256k1Error CResult_PublicKeyErrorZ_get_err(LDKCResult_PublicKeyErrorZ *NONNULL_PTR owner);
92         public static native Secp256k1Error CResult_PublicKeyErrorZ_get_err(long owner);
93         // struct LDKTxCreationKeys CResult_TxCreationKeysDecodeErrorZ_get_ok(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR owner);
94         public static native long CResult_TxCreationKeysDecodeErrorZ_get_ok(long owner);
95         // struct LDKDecodeError CResult_TxCreationKeysDecodeErrorZ_get_err(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR owner);
96         public static native long CResult_TxCreationKeysDecodeErrorZ_get_err(long owner);
97         // struct LDKChannelPublicKeys CResult_ChannelPublicKeysDecodeErrorZ_get_ok(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR owner);
98         public static native long CResult_ChannelPublicKeysDecodeErrorZ_get_ok(long owner);
99         // struct LDKDecodeError CResult_ChannelPublicKeysDecodeErrorZ_get_err(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR owner);
100         public static native long CResult_ChannelPublicKeysDecodeErrorZ_get_err(long owner);
101         // struct LDKTxCreationKeys CResult_TxCreationKeysErrorZ_get_ok(LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR owner);
102         public static native long CResult_TxCreationKeysErrorZ_get_ok(long owner);
103         // enum LDKSecp256k1Error CResult_TxCreationKeysErrorZ_get_err(LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR owner);
104         public static native Secp256k1Error CResult_TxCreationKeysErrorZ_get_err(long owner);
105         public static class LDKCOption_u32Z {
106                 private LDKCOption_u32Z() {}
107                 public final static class Some extends LDKCOption_u32Z {
108                         public int some;
109                         Some(int some) { this.some = some; }
110                 }
111                 public final static class None extends LDKCOption_u32Z {
112                         None() { }
113                 }
114                 static native void init();
115         }
116         static { LDKCOption_u32Z.init(); }
117         public static native LDKCOption_u32Z LDKCOption_u32Z_ref_from_ptr(long ptr);
118         // struct LDKHTLCOutputInCommitment CResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR owner);
119         public static native long CResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long owner);
120         // struct LDKDecodeError CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR owner);
121         public static native long CResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long owner);
122         // struct LDKCounterpartyChannelTransactionParameters CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
123         public static native long CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long owner);
124         // struct LDKDecodeError CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
125         public static native long CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long owner);
126         // struct LDKChannelTransactionParameters CResult_ChannelTransactionParametersDecodeErrorZ_get_ok(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
127         public static native long CResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long owner);
128         // struct LDKDecodeError CResult_ChannelTransactionParametersDecodeErrorZ_get_err(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR owner);
129         public static native long CResult_ChannelTransactionParametersDecodeErrorZ_get_err(long owner);
130         // struct LDKHolderCommitmentTransaction CResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
131         public static native long CResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long owner);
132         // struct LDKDecodeError CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
133         public static native long CResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long owner);
134         // struct LDKBuiltCommitmentTransaction CResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
135         public static native long CResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long owner);
136         // struct LDKDecodeError CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
137         public static native long CResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long owner);
138         // struct LDKTrustedClosingTransaction *CResult_TrustedClosingTransactionNoneZ_get_ok(LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR owner);
139         public static native long CResult_TrustedClosingTransactionNoneZ_get_ok(long owner);
140         // void CResult_TrustedClosingTransactionNoneZ_get_err(LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR owner);
141         public static native void CResult_TrustedClosingTransactionNoneZ_get_err(long owner);
142         // struct LDKCommitmentTransaction CResult_CommitmentTransactionDecodeErrorZ_get_ok(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
143         public static native long CResult_CommitmentTransactionDecodeErrorZ_get_ok(long owner);
144         // struct LDKDecodeError CResult_CommitmentTransactionDecodeErrorZ_get_err(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR owner);
145         public static native long CResult_CommitmentTransactionDecodeErrorZ_get_err(long owner);
146         // struct LDKTrustedCommitmentTransaction *CResult_TrustedCommitmentTransactionNoneZ_get_ok(LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR owner);
147         public static native long CResult_TrustedCommitmentTransactionNoneZ_get_ok(long owner);
148         // void CResult_TrustedCommitmentTransactionNoneZ_get_err(LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR owner);
149         public static native void CResult_TrustedCommitmentTransactionNoneZ_get_err(long owner);
150         // struct LDKCVec_SignatureZ CResult_CVec_SignatureZNoneZ_get_ok(LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR owner);
151         public static native byte[][] CResult_CVec_SignatureZNoneZ_get_ok(long owner);
152         // void CResult_CVec_SignatureZNoneZ_get_err(LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR owner);
153         public static native void CResult_CVec_SignatureZNoneZ_get_err(long owner);
154         // struct LDKShutdownScript CResult_ShutdownScriptDecodeErrorZ_get_ok(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR owner);
155         public static native long CResult_ShutdownScriptDecodeErrorZ_get_ok(long owner);
156         // struct LDKDecodeError CResult_ShutdownScriptDecodeErrorZ_get_err(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR owner);
157         public static native long CResult_ShutdownScriptDecodeErrorZ_get_err(long owner);
158         // struct LDKShutdownScript CResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR owner);
159         public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(long owner);
160         // struct LDKInvalidShutdownScript CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR owner);
161         public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_get_err(long owner);
162         // void CResult_NoneErrorZ_get_ok(LDKCResult_NoneErrorZ *NONNULL_PTR owner);
163         public static native void CResult_NoneErrorZ_get_ok(long owner);
164         // enum LDKIOError CResult_NoneErrorZ_get_err(LDKCResult_NoneErrorZ *NONNULL_PTR owner);
165         public static native IOError CResult_NoneErrorZ_get_err(long owner);
166         // struct LDKRouteHop CResult_RouteHopDecodeErrorZ_get_ok(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR owner);
167         public static native long CResult_RouteHopDecodeErrorZ_get_ok(long owner);
168         // struct LDKDecodeError CResult_RouteHopDecodeErrorZ_get_err(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR owner);
169         public static native long CResult_RouteHopDecodeErrorZ_get_err(long owner);
170         // struct LDKRoute CResult_RouteDecodeErrorZ_get_ok(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR owner);
171         public static native long CResult_RouteDecodeErrorZ_get_ok(long owner);
172         // struct LDKDecodeError CResult_RouteDecodeErrorZ_get_err(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR owner);
173         public static native long CResult_RouteDecodeErrorZ_get_err(long owner);
174         // struct LDKRouteParameters CResult_RouteParametersDecodeErrorZ_get_ok(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR owner);
175         public static native long CResult_RouteParametersDecodeErrorZ_get_ok(long owner);
176         // struct LDKDecodeError CResult_RouteParametersDecodeErrorZ_get_err(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR owner);
177         public static native long CResult_RouteParametersDecodeErrorZ_get_err(long owner);
178         public static class LDKCOption_u64Z {
179                 private LDKCOption_u64Z() {}
180                 public final static class Some extends LDKCOption_u64Z {
181                         public long some;
182                         Some(long some) { this.some = some; }
183                 }
184                 public final static class None extends LDKCOption_u64Z {
185                         None() { }
186                 }
187                 static native void init();
188         }
189         static { LDKCOption_u64Z.init(); }
190         public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
191         // struct LDKPayee CResult_PayeeDecodeErrorZ_get_ok(LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR owner);
192         public static native long CResult_PayeeDecodeErrorZ_get_ok(long owner);
193         // struct LDKDecodeError CResult_PayeeDecodeErrorZ_get_err(LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR owner);
194         public static native long CResult_PayeeDecodeErrorZ_get_err(long owner);
195         // struct LDKRouteHint CResult_RouteHintDecodeErrorZ_get_ok(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR owner);
196         public static native long CResult_RouteHintDecodeErrorZ_get_ok(long owner);
197         // struct LDKDecodeError CResult_RouteHintDecodeErrorZ_get_err(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR owner);
198         public static native long CResult_RouteHintDecodeErrorZ_get_err(long owner);
199         // struct LDKRouteHintHop CResult_RouteHintHopDecodeErrorZ_get_ok(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR owner);
200         public static native long CResult_RouteHintHopDecodeErrorZ_get_ok(long owner);
201         // struct LDKDecodeError CResult_RouteHintHopDecodeErrorZ_get_err(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR owner);
202         public static native long CResult_RouteHintHopDecodeErrorZ_get_err(long owner);
203         // struct LDKRoute CResult_RouteLightningErrorZ_get_ok(LDKCResult_RouteLightningErrorZ *NONNULL_PTR owner);
204         public static native long CResult_RouteLightningErrorZ_get_ok(long owner);
205         // struct LDKLightningError CResult_RouteLightningErrorZ_get_err(LDKCResult_RouteLightningErrorZ *NONNULL_PTR owner);
206         public static native long CResult_RouteLightningErrorZ_get_err(long owner);
207         // struct LDKTxOut CResult_TxOutAccessErrorZ_get_ok(LDKCResult_TxOutAccessErrorZ *NONNULL_PTR owner);
208         public static native long CResult_TxOutAccessErrorZ_get_ok(long owner);
209         // enum LDKAccessError CResult_TxOutAccessErrorZ_get_err(LDKCResult_TxOutAccessErrorZ *NONNULL_PTR owner);
210         public static native AccessError CResult_TxOutAccessErrorZ_get_err(long owner);
211         // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner);
212         public static native long C2Tuple_usizeTransactionZ_get_a(long owner);
213         // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR owner);
214         public static native byte[] C2Tuple_usizeTransactionZ_get_b(long owner);
215         // void CResult_NoneChannelMonitorUpdateErrZ_get_ok(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner);
216         public static native void CResult_NoneChannelMonitorUpdateErrZ_get_ok(long owner);
217         // enum LDKChannelMonitorUpdateErr CResult_NoneChannelMonitorUpdateErrZ_get_err(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR owner);
218         public static native ChannelMonitorUpdateErr CResult_NoneChannelMonitorUpdateErrZ_get_err(long owner);
219         public static class LDKMonitorEvent {
220                 private LDKMonitorEvent() {}
221                 public final static class HTLCEvent extends LDKMonitorEvent {
222                         public long htlc_event;
223                         HTLCEvent(long htlc_event) { this.htlc_event = htlc_event; }
224                 }
225                 public final static class CommitmentTxConfirmed extends LDKMonitorEvent {
226                         public long commitment_tx_confirmed;
227                         CommitmentTxConfirmed(long commitment_tx_confirmed) { this.commitment_tx_confirmed = commitment_tx_confirmed; }
228                 }
229                 public final static class UpdateCompleted extends LDKMonitorEvent {
230                         public long funding_txo;
231                         public long monitor_update_id;
232                         UpdateCompleted(long funding_txo, long monitor_update_id) { this.funding_txo = funding_txo; this.monitor_update_id = monitor_update_id; }
233                 }
234                 public final static class UpdateFailed extends LDKMonitorEvent {
235                         public long update_failed;
236                         UpdateFailed(long update_failed) { this.update_failed = update_failed; }
237                 }
238                 static native void init();
239         }
240         static { LDKMonitorEvent.init(); }
241         public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
242         public static class LDKCOption_C2Tuple_usizeTransactionZZ {
243                 private LDKCOption_C2Tuple_usizeTransactionZZ() {}
244                 public final static class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
245                         public long some;
246                         Some(long some) { this.some = some; }
247                 }
248                 public final static class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
249                         None() { }
250                 }
251                 static native void init();
252         }
253         static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
254         public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
255         public static class LDKClosureReason {
256                 private LDKClosureReason() {}
257                 public final static class CounterpartyForceClosed extends LDKClosureReason {
258                         public String peer_msg;
259                         CounterpartyForceClosed(String peer_msg) { this.peer_msg = peer_msg; }
260                 }
261                 public final static class HolderForceClosed extends LDKClosureReason {
262                         HolderForceClosed() { }
263                 }
264                 public final static class CooperativeClosure extends LDKClosureReason {
265                         CooperativeClosure() { }
266                 }
267                 public final static class CommitmentTxConfirmed extends LDKClosureReason {
268                         CommitmentTxConfirmed() { }
269                 }
270                 public final static class FundingTimedOut extends LDKClosureReason {
271                         FundingTimedOut() { }
272                 }
273                 public final static class ProcessingError extends LDKClosureReason {
274                         public String err;
275                         ProcessingError(String err) { this.err = err; }
276                 }
277                 public final static class DisconnectedPeer extends LDKClosureReason {
278                         DisconnectedPeer() { }
279                 }
280                 public final static class OutdatedChannelManager extends LDKClosureReason {
281                         OutdatedChannelManager() { }
282                 }
283                 static native void init();
284         }
285         static { LDKClosureReason.init(); }
286         public static native LDKClosureReason LDKClosureReason_ref_from_ptr(long ptr);
287         public static class LDKCOption_ClosureReasonZ {
288                 private LDKCOption_ClosureReasonZ() {}
289                 public final static class Some extends LDKCOption_ClosureReasonZ {
290                         public long some;
291                         Some(long some) { this.some = some; }
292                 }
293                 public final static class None extends LDKCOption_ClosureReasonZ {
294                         None() { }
295                 }
296                 static native void init();
297         }
298         static { LDKCOption_ClosureReasonZ.init(); }
299         public static native LDKCOption_ClosureReasonZ LDKCOption_ClosureReasonZ_ref_from_ptr(long ptr);
300         // struct LDKCOption_ClosureReasonZ CResult_COption_ClosureReasonZDecodeErrorZ_get_ok(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR owner);
301         public static native long CResult_COption_ClosureReasonZDecodeErrorZ_get_ok(long owner);
302         // struct LDKDecodeError CResult_COption_ClosureReasonZDecodeErrorZ_get_err(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR owner);
303         public static native long CResult_COption_ClosureReasonZDecodeErrorZ_get_err(long owner);
304         public static class LDKNetworkUpdate {
305                 private LDKNetworkUpdate() {}
306                 public final static class ChannelUpdateMessage extends LDKNetworkUpdate {
307                         public long msg;
308                         ChannelUpdateMessage(long msg) { this.msg = msg; }
309                 }
310                 public final static class ChannelClosed extends LDKNetworkUpdate {
311                         public long short_channel_id;
312                         public boolean is_permanent;
313                         ChannelClosed(long short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
314                 }
315                 public final static class NodeFailure extends LDKNetworkUpdate {
316                         public byte[] node_id;
317                         public boolean is_permanent;
318                         NodeFailure(byte[] node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
319                 }
320                 static native void init();
321         }
322         static { LDKNetworkUpdate.init(); }
323         public static native LDKNetworkUpdate LDKNetworkUpdate_ref_from_ptr(long ptr);
324         public static class LDKCOption_NetworkUpdateZ {
325                 private LDKCOption_NetworkUpdateZ() {}
326                 public final static class Some extends LDKCOption_NetworkUpdateZ {
327                         public long some;
328                         Some(long some) { this.some = some; }
329                 }
330                 public final static class None extends LDKCOption_NetworkUpdateZ {
331                         None() { }
332                 }
333                 static native void init();
334         }
335         static { LDKCOption_NetworkUpdateZ.init(); }
336         public static native LDKCOption_NetworkUpdateZ LDKCOption_NetworkUpdateZ_ref_from_ptr(long ptr);
337         public static class LDKSpendableOutputDescriptor {
338                 private LDKSpendableOutputDescriptor() {}
339                 public final static class StaticOutput extends LDKSpendableOutputDescriptor {
340                         public long outpoint;
341                         public long output;
342                         StaticOutput(long outpoint, long output) { this.outpoint = outpoint; this.output = output; }
343                 }
344                 public final static class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
345                         public long delayed_payment_output;
346                         DelayedPaymentOutput(long delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
347                 }
348                 public final static class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
349                         public long static_payment_output;
350                         StaticPaymentOutput(long static_payment_output) { this.static_payment_output = static_payment_output; }
351                 }
352                 static native void init();
353         }
354         static { LDKSpendableOutputDescriptor.init(); }
355         public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
356         public static class LDKPaymentPurpose {
357                 private LDKPaymentPurpose() {}
358                 public final static class InvoicePayment extends LDKPaymentPurpose {
359                         public byte[] payment_preimage;
360                         public byte[] payment_secret;
361                         InvoicePayment(byte[] payment_preimage, byte[] payment_secret) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; }
362                 }
363                 public final static class SpontaneousPayment extends LDKPaymentPurpose {
364                         public byte[] spontaneous_payment;
365                         SpontaneousPayment(byte[] spontaneous_payment) { this.spontaneous_payment = spontaneous_payment; }
366                 }
367                 static native void init();
368         }
369         static { LDKPaymentPurpose.init(); }
370         public static native LDKPaymentPurpose LDKPaymentPurpose_ref_from_ptr(long ptr);
371         public static class LDKEvent {
372                 private LDKEvent() {}
373                 public final static class FundingGenerationReady extends LDKEvent {
374                         public byte[] temporary_channel_id;
375                         public long channel_value_satoshis;
376                         public byte[] output_script;
377                         public long user_channel_id;
378                         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; }
379                 }
380                 public final static class PaymentReceived extends LDKEvent {
381                         public byte[] payment_hash;
382                         public long amt;
383                         public long purpose;
384                         PaymentReceived(byte[] payment_hash, long amt, long purpose) { this.payment_hash = payment_hash; this.amt = amt; this.purpose = purpose; }
385                 }
386                 public final static class PaymentSent extends LDKEvent {
387                         public byte[] payment_id;
388                         public byte[] payment_preimage;
389                         public byte[] payment_hash;
390                         public long fee_paid_msat;
391                         PaymentSent(byte[] payment_id, byte[] payment_preimage, byte[] payment_hash, long fee_paid_msat) { this.payment_id = payment_id; this.payment_preimage = payment_preimage; this.payment_hash = payment_hash; this.fee_paid_msat = fee_paid_msat; }
392                 }
393                 public final static class PaymentPathFailed extends LDKEvent {
394                         public byte[] payment_id;
395                         public byte[] payment_hash;
396                         public boolean rejected_by_dest;
397                         public long network_update;
398                         public boolean all_paths_failed;
399                         public long[] path;
400                         public long short_channel_id;
401                         public long retry;
402                         PaymentPathFailed(byte[] payment_id, byte[] payment_hash, boolean rejected_by_dest, long network_update, boolean all_paths_failed, long[] path, long short_channel_id, long retry) { this.payment_id = payment_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; this.retry = retry; }
403                 }
404                 public final static class PaymentFailed extends LDKEvent {
405                         public byte[] payment_id;
406                         public byte[] payment_hash;
407                         PaymentFailed(byte[] payment_id, byte[] payment_hash) { this.payment_id = payment_id; this.payment_hash = payment_hash; }
408                 }
409                 public final static class PendingHTLCsForwardable extends LDKEvent {
410                         public long time_forwardable;
411                         PendingHTLCsForwardable(long time_forwardable) { this.time_forwardable = time_forwardable; }
412                 }
413                 public final static class SpendableOutputs extends LDKEvent {
414                         public long[] outputs;
415                         SpendableOutputs(long[] outputs) { this.outputs = outputs; }
416                 }
417                 public final static class PaymentForwarded extends LDKEvent {
418                         public long fee_earned_msat;
419                         public boolean claim_from_onchain_tx;
420                         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; }
421                 }
422                 public final static class ChannelClosed extends LDKEvent {
423                         public byte[] channel_id;
424                         public long user_channel_id;
425                         public long reason;
426                         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; }
427                 }
428                 public final static class DiscardFunding extends LDKEvent {
429                         public byte[] channel_id;
430                         public byte[] transaction;
431                         DiscardFunding(byte[] channel_id, byte[] transaction) { this.channel_id = channel_id; this.transaction = transaction; }
432                 }
433                 public final static class PaymentPathSuccessful extends LDKEvent {
434                         public byte[] payment_id;
435                         public byte[] payment_hash;
436                         public long[] path;
437                         PaymentPathSuccessful(byte[] payment_id, byte[] payment_hash, long[] path) { this.payment_id = payment_id; this.payment_hash = payment_hash; this.path = path; }
438                 }
439                 static native void init();
440         }
441         static { LDKEvent.init(); }
442         public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
443         public static class LDKCOption_EventZ {
444                 private LDKCOption_EventZ() {}
445                 public final static class Some extends LDKCOption_EventZ {
446                         public long some;
447                         Some(long some) { this.some = some; }
448                 }
449                 public final static class None extends LDKCOption_EventZ {
450                         None() { }
451                 }
452                 static native void init();
453         }
454         static { LDKCOption_EventZ.init(); }
455         public static native LDKCOption_EventZ LDKCOption_EventZ_ref_from_ptr(long ptr);
456         // struct LDKCOption_EventZ CResult_COption_EventZDecodeErrorZ_get_ok(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR owner);
457         public static native long CResult_COption_EventZDecodeErrorZ_get_ok(long owner);
458         // struct LDKDecodeError CResult_COption_EventZDecodeErrorZ_get_err(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR owner);
459         public static native long CResult_COption_EventZDecodeErrorZ_get_err(long owner);
460         public static class LDKErrorAction {
461                 private LDKErrorAction() {}
462                 public final static class DisconnectPeer extends LDKErrorAction {
463                         public long msg;
464                         DisconnectPeer(long msg) { this.msg = msg; }
465                 }
466                 public final static class IgnoreError extends LDKErrorAction {
467                         IgnoreError() { }
468                 }
469                 public final static class IgnoreAndLog extends LDKErrorAction {
470                         public Level ignore_and_log;
471                         IgnoreAndLog(Level ignore_and_log) { this.ignore_and_log = ignore_and_log; }
472                 }
473                 public final static class IgnoreDuplicateGossip extends LDKErrorAction {
474                         IgnoreDuplicateGossip() { }
475                 }
476                 public final static class SendErrorMessage extends LDKErrorAction {
477                         public long msg;
478                         SendErrorMessage(long msg) { this.msg = msg; }
479                 }
480                 static native void init();
481         }
482         static { LDKErrorAction.init(); }
483         public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
484         public static class LDKMessageSendEvent {
485                 private LDKMessageSendEvent() {}
486                 public final static class SendAcceptChannel extends LDKMessageSendEvent {
487                         public byte[] node_id;
488                         public long msg;
489                         SendAcceptChannel(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
490                 }
491                 public final static class SendOpenChannel extends LDKMessageSendEvent {
492                         public byte[] node_id;
493                         public long msg;
494                         SendOpenChannel(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
495                 }
496                 public final static class SendFundingCreated extends LDKMessageSendEvent {
497                         public byte[] node_id;
498                         public long msg;
499                         SendFundingCreated(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
500                 }
501                 public final static class SendFundingSigned extends LDKMessageSendEvent {
502                         public byte[] node_id;
503                         public long msg;
504                         SendFundingSigned(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
505                 }
506                 public final static class SendFundingLocked extends LDKMessageSendEvent {
507                         public byte[] node_id;
508                         public long msg;
509                         SendFundingLocked(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
510                 }
511                 public final static class SendAnnouncementSignatures extends LDKMessageSendEvent {
512                         public byte[] node_id;
513                         public long msg;
514                         SendAnnouncementSignatures(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
515                 }
516                 public final static class UpdateHTLCs extends LDKMessageSendEvent {
517                         public byte[] node_id;
518                         public long updates;
519                         UpdateHTLCs(byte[] node_id, long updates) { this.node_id = node_id; this.updates = updates; }
520                 }
521                 public final static class SendRevokeAndACK extends LDKMessageSendEvent {
522                         public byte[] node_id;
523                         public long msg;
524                         SendRevokeAndACK(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
525                 }
526                 public final static class SendClosingSigned extends LDKMessageSendEvent {
527                         public byte[] node_id;
528                         public long msg;
529                         SendClosingSigned(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
530                 }
531                 public final static class SendShutdown extends LDKMessageSendEvent {
532                         public byte[] node_id;
533                         public long msg;
534                         SendShutdown(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
535                 }
536                 public final static class SendChannelReestablish extends LDKMessageSendEvent {
537                         public byte[] node_id;
538                         public long msg;
539                         SendChannelReestablish(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
540                 }
541                 public final static class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
542                         public long msg;
543                         public long update_msg;
544                         BroadcastChannelAnnouncement(long msg, long update_msg) { this.msg = msg; this.update_msg = update_msg; }
545                 }
546                 public final static class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
547                         public long msg;
548                         BroadcastNodeAnnouncement(long msg) { this.msg = msg; }
549                 }
550                 public final static class BroadcastChannelUpdate extends LDKMessageSendEvent {
551                         public long msg;
552                         BroadcastChannelUpdate(long msg) { this.msg = msg; }
553                 }
554                 public final static class SendChannelUpdate extends LDKMessageSendEvent {
555                         public byte[] node_id;
556                         public long msg;
557                         SendChannelUpdate(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
558                 }
559                 public final static class HandleError extends LDKMessageSendEvent {
560                         public byte[] node_id;
561                         public long action;
562                         HandleError(byte[] node_id, long action) { this.node_id = node_id; this.action = action; }
563                 }
564                 public final static class SendChannelRangeQuery extends LDKMessageSendEvent {
565                         public byte[] node_id;
566                         public long msg;
567                         SendChannelRangeQuery(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
568                 }
569                 public final static class SendShortIdsQuery extends LDKMessageSendEvent {
570                         public byte[] node_id;
571                         public long msg;
572                         SendShortIdsQuery(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
573                 }
574                 public final static class SendReplyChannelRange extends LDKMessageSendEvent {
575                         public byte[] node_id;
576                         public long msg;
577                         SendReplyChannelRange(byte[] node_id, long msg) { this.node_id = node_id; this.msg = msg; }
578                 }
579                 static native void init();
580         }
581         static { LDKMessageSendEvent.init(); }
582         public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
583         // struct LDKScoringParameters *CResult_ScoringParametersDecodeErrorZ_get_ok(LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR owner);
584         public static native long CResult_ScoringParametersDecodeErrorZ_get_ok(long owner);
585         // struct LDKDecodeError CResult_ScoringParametersDecodeErrorZ_get_err(LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR owner);
586         public static native long CResult_ScoringParametersDecodeErrorZ_get_err(long owner);
587         // struct LDKScorer *CResult_ScorerDecodeErrorZ_get_ok(LDKCResult_ScorerDecodeErrorZ *NONNULL_PTR owner);
588         public static native long CResult_ScorerDecodeErrorZ_get_ok(long owner);
589         // struct LDKDecodeError CResult_ScorerDecodeErrorZ_get_err(LDKCResult_ScorerDecodeErrorZ *NONNULL_PTR owner);
590         public static native long CResult_ScorerDecodeErrorZ_get_err(long owner);
591         // struct LDKInitFeatures CResult_InitFeaturesDecodeErrorZ_get_ok(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
592         public static native long CResult_InitFeaturesDecodeErrorZ_get_ok(long owner);
593         // struct LDKDecodeError CResult_InitFeaturesDecodeErrorZ_get_err(LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR owner);
594         public static native long CResult_InitFeaturesDecodeErrorZ_get_err(long owner);
595         // struct LDKChannelFeatures CResult_ChannelFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner);
596         public static native long CResult_ChannelFeaturesDecodeErrorZ_get_ok(long owner);
597         // struct LDKDecodeError CResult_ChannelFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR owner);
598         public static native long CResult_ChannelFeaturesDecodeErrorZ_get_err(long owner);
599         // struct LDKNodeFeatures CResult_NodeFeaturesDecodeErrorZ_get_ok(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner);
600         public static native long CResult_NodeFeaturesDecodeErrorZ_get_ok(long owner);
601         // struct LDKDecodeError CResult_NodeFeaturesDecodeErrorZ_get_err(LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR owner);
602         public static native long CResult_NodeFeaturesDecodeErrorZ_get_err(long owner);
603         // struct LDKInvoiceFeatures CResult_InvoiceFeaturesDecodeErrorZ_get_ok(LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner);
604         public static native long CResult_InvoiceFeaturesDecodeErrorZ_get_ok(long owner);
605         // struct LDKDecodeError CResult_InvoiceFeaturesDecodeErrorZ_get_err(LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR owner);
606         public static native long CResult_InvoiceFeaturesDecodeErrorZ_get_err(long owner);
607         // struct LDKChannelTypeFeatures CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner);
608         public static native long CResult_ChannelTypeFeaturesDecodeErrorZ_get_ok(long owner);
609         // struct LDKDecodeError CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR owner);
610         public static native long CResult_ChannelTypeFeaturesDecodeErrorZ_get_err(long owner);
611         // struct LDKDelayedPaymentOutputDescriptor CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
612         public static native long CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(long owner);
613         // struct LDKDecodeError CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
614         public static native long CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(long owner);
615         // struct LDKStaticPaymentOutputDescriptor CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
616         public static native long CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(long owner);
617         // struct LDKDecodeError CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
618         public static native long CResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(long owner);
619         // struct LDKSpendableOutputDescriptor CResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
620         public static native long CResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long owner);
621         // struct LDKDecodeError CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR owner);
622         public static native long CResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long owner);
623         // void CResult_NoneNoneZ_get_ok(LDKCResult_NoneNoneZ *NONNULL_PTR owner);
624         public static native void CResult_NoneNoneZ_get_ok(long owner);
625         // void CResult_NoneNoneZ_get_err(LDKCResult_NoneNoneZ *NONNULL_PTR owner);
626         public static native void CResult_NoneNoneZ_get_err(long owner);
627         // struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR owner);
628         public static native byte[] C2Tuple_SignatureCVec_SignatureZZ_get_a(long owner);
629         // struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR owner);
630         public static native byte[][] C2Tuple_SignatureCVec_SignatureZZ_get_b(long owner);
631         // struct LDKC2Tuple_SignatureCVec_SignatureZZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR owner);
632         public static native long CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long owner);
633         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR owner);
634         public static native void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long owner);
635         // struct LDKSignature CResult_SignatureNoneZ_get_ok(LDKCResult_SignatureNoneZ *NONNULL_PTR owner);
636         public static native byte[] CResult_SignatureNoneZ_get_ok(long owner);
637         // void CResult_SignatureNoneZ_get_err(LDKCResult_SignatureNoneZ *NONNULL_PTR owner);
638         public static native void CResult_SignatureNoneZ_get_err(long owner);
639         public interface LDKBaseSign {
640                  byte[] get_per_commitment_point(long idx);
641                  byte[] release_commitment_secret(long idx);
642                  long validate_holder_commitment(long holder_tx);
643                  byte[] channel_keys_id();
644                  long sign_counterparty_commitment(long commitment_tx);
645                  long validate_counterparty_revocation(long idx, byte[] secret);
646                  long sign_holder_commitment_and_htlcs(long commitment_tx);
647                  long sign_justice_revoked_output(byte[] justice_tx, long input, long amount, byte[] per_commitment_key);
648                  long sign_justice_revoked_htlc(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
649                  long sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc);
650                  long sign_closing_transaction(long closing_tx);
651                  long sign_channel_announcement(long msg);
652                  void ready_channel(long channel_parameters);
653         }
654         public static native long LDKBaseSign_new(LDKBaseSign impl, long pubkeys);
655         // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
656         public static native byte[] BaseSign_get_per_commitment_point(long this_arg, long idx);
657         // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
658         public static native byte[] BaseSign_release_commitment_secret(long this_arg, long idx);
659         // LDKCResult_NoneNoneZ BaseSign_validate_holder_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR holder_tx
660         public static native long BaseSign_validate_holder_commitment(long this_arg, long holder_tx);
661         // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
662         public static native byte[] BaseSign_channel_keys_id(long this_arg);
663         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
664         public static native long BaseSign_sign_counterparty_commitment(long this_arg, long commitment_tx);
665         // LDKCResult_NoneNoneZ BaseSign_validate_counterparty_revocation LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx, const uint8_t (*secret)[32]
666         public static native long BaseSign_validate_counterparty_revocation(long this_arg, long idx, byte[] secret);
667         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
668         public static native long BaseSign_sign_holder_commitment_and_htlcs(long this_arg, long commitment_tx);
669         // 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]
670         public static native long BaseSign_sign_justice_revoked_output(long this_arg, byte[] justice_tx, long input, long amount, byte[] per_commitment_key);
671         // 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
672         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);
673         // 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
674         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);
675         // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, const struct LDKClosingTransaction *NONNULL_PTR closing_tx
676         public static native long BaseSign_sign_closing_transaction(long this_arg, long closing_tx);
677         // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
678         public static native long BaseSign_sign_channel_announcement(long this_arg, long msg);
679         // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
680         public static native void BaseSign_ready_channel(long this_arg, long channel_parameters);
681         // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
682         public static native long BaseSign_get_pubkeys(long this_arg);
683         public interface LDKSign {
684                  byte[] write();
685         }
686         public static native long LDKSign_new(LDKSign impl, LDKBaseSign BaseSign, long pubkeys);
687         public static native long LDKSign_get_BaseSign(long arg);
688         // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
689         public static native byte[] Sign_write(long this_arg);
690         // struct LDKSign CResult_SignDecodeErrorZ_get_ok(LDKCResult_SignDecodeErrorZ *NONNULL_PTR owner);
691         public static native long CResult_SignDecodeErrorZ_get_ok(long owner);
692         // struct LDKDecodeError CResult_SignDecodeErrorZ_get_err(LDKCResult_SignDecodeErrorZ *NONNULL_PTR owner);
693         public static native long CResult_SignDecodeErrorZ_get_err(long owner);
694         // struct LDKRecoverableSignature CResult_RecoverableSignatureNoneZ_get_ok(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR owner);
695         public static native byte[] CResult_RecoverableSignatureNoneZ_get_ok(long owner);
696         // void CResult_RecoverableSignatureNoneZ_get_err(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR owner);
697         public static native void CResult_RecoverableSignatureNoneZ_get_err(long owner);
698         // struct LDKCVec_CVec_u8ZZ CResult_CVec_CVec_u8ZZNoneZ_get_ok(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR owner);
699         public static native byte[][] CResult_CVec_CVec_u8ZZNoneZ_get_ok(long owner);
700         // void CResult_CVec_CVec_u8ZZNoneZ_get_err(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR owner);
701         public static native void CResult_CVec_CVec_u8ZZNoneZ_get_err(long owner);
702         // struct LDKInMemorySigner CResult_InMemorySignerDecodeErrorZ_get_ok(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner);
703         public static native long CResult_InMemorySignerDecodeErrorZ_get_ok(long owner);
704         // struct LDKDecodeError CResult_InMemorySignerDecodeErrorZ_get_err(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR owner);
705         public static native long CResult_InMemorySignerDecodeErrorZ_get_err(long owner);
706         // struct LDKTransaction CResult_TransactionNoneZ_get_ok(LDKCResult_TransactionNoneZ *NONNULL_PTR owner);
707         public static native byte[] CResult_TransactionNoneZ_get_ok(long owner);
708         // void CResult_TransactionNoneZ_get_err(LDKCResult_TransactionNoneZ *NONNULL_PTR owner);
709         public static native void CResult_TransactionNoneZ_get_err(long owner);
710         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR owner);
711         public static native byte[] C2Tuple_BlockHashChannelMonitorZ_get_a(long owner);
712         // struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR owner);
713         public static native long C2Tuple_BlockHashChannelMonitorZ_get_b(long owner);
714         // struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR owner);
715         public static native long[] CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long owner);
716         // enum LDKIOError CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_err(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR owner);
717         public static native IOError CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_err(long owner);
718         public static class LDKCOption_u16Z {
719                 private LDKCOption_u16Z() {}
720                 public final static class Some extends LDKCOption_u16Z {
721                         public short some;
722                         Some(short some) { this.some = some; }
723                 }
724                 public final static class None extends LDKCOption_u16Z {
725                         None() { }
726                 }
727                 static native void init();
728         }
729         static { LDKCOption_u16Z.init(); }
730         public static native LDKCOption_u16Z LDKCOption_u16Z_ref_from_ptr(long ptr);
731         public static class LDKAPIError {
732                 private LDKAPIError() {}
733                 public final static class APIMisuseError extends LDKAPIError {
734                         public String err;
735                         APIMisuseError(String err) { this.err = err; }
736                 }
737                 public final static class FeeRateTooHigh extends LDKAPIError {
738                         public String err;
739                         public int feerate;
740                         FeeRateTooHigh(String err, int feerate) { this.err = err; this.feerate = feerate; }
741                 }
742                 public final static class RouteError extends LDKAPIError {
743                         public String err;
744                         RouteError(String err) { this.err = err; }
745                 }
746                 public final static class ChannelUnavailable extends LDKAPIError {
747                         public String err;
748                         ChannelUnavailable(String err) { this.err = err; }
749                 }
750                 public final static class MonitorUpdateFailed extends LDKAPIError {
751                         MonitorUpdateFailed() { }
752                 }
753                 public final static class IncompatibleShutdownScript extends LDKAPIError {
754                         public long script;
755                         IncompatibleShutdownScript(long script) { this.script = script; }
756                 }
757                 static native void init();
758         }
759         static { LDKAPIError.init(); }
760         public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
761         // void CResult_NoneAPIErrorZ_get_ok(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner);
762         public static native void CResult_NoneAPIErrorZ_get_ok(long owner);
763         // struct LDKAPIError CResult_NoneAPIErrorZ_get_err(LDKCResult_NoneAPIErrorZ *NONNULL_PTR owner);
764         public static native long CResult_NoneAPIErrorZ_get_err(long owner);
765         // struct LDKThirtyTwoBytes CResult__u832APIErrorZ_get_ok(LDKCResult__u832APIErrorZ *NONNULL_PTR owner);
766         public static native byte[] CResult__u832APIErrorZ_get_ok(long owner);
767         // struct LDKAPIError CResult__u832APIErrorZ_get_err(LDKCResult__u832APIErrorZ *NONNULL_PTR owner);
768         public static native long CResult__u832APIErrorZ_get_err(long owner);
769         public static class LDKPaymentSendFailure {
770                 private LDKPaymentSendFailure() {}
771                 public final static class ParameterError extends LDKPaymentSendFailure {
772                         public long parameter_error;
773                         ParameterError(long parameter_error) { this.parameter_error = parameter_error; }
774                 }
775                 public final static class PathParameterError extends LDKPaymentSendFailure {
776                         public long[] path_parameter_error;
777                         PathParameterError(long[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
778                 }
779                 public final static class AllFailedRetrySafe extends LDKPaymentSendFailure {
780                         public long[] all_failed_retry_safe;
781                         AllFailedRetrySafe(long[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
782                 }
783                 public final static class PartialFailure extends LDKPaymentSendFailure {
784                         public long[] results;
785                         public long failed_paths_retry;
786                         public byte[] payment_id;
787                         PartialFailure(long[] results, long failed_paths_retry, byte[] payment_id) { this.results = results; this.failed_paths_retry = failed_paths_retry; this.payment_id = payment_id; }
788                 }
789                 static native void init();
790         }
791         static { LDKPaymentSendFailure.init(); }
792         public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
793         // struct LDKThirtyTwoBytes CResult_PaymentIdPaymentSendFailureZ_get_ok(LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR owner);
794         public static native byte[] CResult_PaymentIdPaymentSendFailureZ_get_ok(long owner);
795         // struct LDKPaymentSendFailure CResult_PaymentIdPaymentSendFailureZ_get_err(LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR owner);
796         public static native long CResult_PaymentIdPaymentSendFailureZ_get_err(long owner);
797         // void CResult_NonePaymentSendFailureZ_get_ok(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR owner);
798         public static native void CResult_NonePaymentSendFailureZ_get_ok(long owner);
799         // struct LDKPaymentSendFailure CResult_NonePaymentSendFailureZ_get_err(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR owner);
800         public static native long CResult_NonePaymentSendFailureZ_get_err(long owner);
801         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_a(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR owner);
802         public static native byte[] C2Tuple_PaymentHashPaymentIdZ_get_a(long owner);
803         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_b(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR owner);
804         public static native byte[] C2Tuple_PaymentHashPaymentIdZ_get_b(long owner);
805         // struct LDKC2Tuple_PaymentHashPaymentIdZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR owner);
806         public static native long CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(long owner);
807         // struct LDKPaymentSendFailure CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR owner);
808         public static native long CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(long owner);
809         public static class LDKNetAddress {
810                 private LDKNetAddress() {}
811                 public final static class IPv4 extends LDKNetAddress {
812                         public byte[] addr;
813                         public short port;
814                         IPv4(byte[] addr, short port) { this.addr = addr; this.port = port; }
815                 }
816                 public final static class IPv6 extends LDKNetAddress {
817                         public byte[] addr;
818                         public short port;
819                         IPv6(byte[] addr, short port) { this.addr = addr; this.port = port; }
820                 }
821                 public final static class OnionV2 extends LDKNetAddress {
822                         public byte[] onion_v2;
823                         OnionV2(byte[] onion_v2) { this.onion_v2 = onion_v2; }
824                 }
825                 public final static class OnionV3 extends LDKNetAddress {
826                         public byte[] ed25519_pubkey;
827                         public short checksum;
828                         public byte version;
829                         public short port;
830                         OnionV3(byte[] ed25519_pubkey, short checksum, byte version, short port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
831                 }
832                 static native void init();
833         }
834         static { LDKNetAddress.init(); }
835         public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
836         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR owner);
837         public static native byte[] C2Tuple_PaymentHashPaymentSecretZ_get_a(long owner);
838         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR owner);
839         public static native byte[] C2Tuple_PaymentHashPaymentSecretZ_get_b(long owner);
840         // struct LDKC2Tuple_PaymentHashPaymentSecretZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_ok(LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR owner);
841         public static native long CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_ok(long owner);
842         // void CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_err(LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR owner);
843         public static native void CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_get_err(long owner);
844         // struct LDKC2Tuple_PaymentHashPaymentSecretZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_ok(LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR owner);
845         public static native long CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_ok(long owner);
846         // struct LDKAPIError CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_err(LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR owner);
847         public static native long CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_get_err(long owner);
848         // struct LDKThirtyTwoBytes CResult_PaymentSecretNoneZ_get_ok(LDKCResult_PaymentSecretNoneZ *NONNULL_PTR owner);
849         public static native byte[] CResult_PaymentSecretNoneZ_get_ok(long owner);
850         // void CResult_PaymentSecretNoneZ_get_err(LDKCResult_PaymentSecretNoneZ *NONNULL_PTR owner);
851         public static native void CResult_PaymentSecretNoneZ_get_err(long owner);
852         // struct LDKThirtyTwoBytes CResult_PaymentSecretAPIErrorZ_get_ok(LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR owner);
853         public static native byte[] CResult_PaymentSecretAPIErrorZ_get_ok(long owner);
854         // struct LDKAPIError CResult_PaymentSecretAPIErrorZ_get_err(LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR owner);
855         public static native long CResult_PaymentSecretAPIErrorZ_get_err(long owner);
856         // struct LDKThirtyTwoBytes CResult_PaymentPreimageAPIErrorZ_get_ok(LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR owner);
857         public static native byte[] CResult_PaymentPreimageAPIErrorZ_get_ok(long owner);
858         // struct LDKAPIError CResult_PaymentPreimageAPIErrorZ_get_err(LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR owner);
859         public static native long CResult_PaymentPreimageAPIErrorZ_get_err(long owner);
860         public interface LDKWatch {
861                  long watch_channel(long funding_txo, long monitor);
862                  long update_channel(long funding_txo, long update);
863                  long[] release_pending_monitor_events();
864         }
865         public static native long LDKWatch_new(LDKWatch impl);
866         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
867         public static native long Watch_watch_channel(long this_arg, long funding_txo, long monitor);
868         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
869         public static native long Watch_update_channel(long this_arg, long funding_txo, long update);
870         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
871         public static native long[] Watch_release_pending_monitor_events(long this_arg);
872         public interface LDKBroadcasterInterface {
873                  void broadcast_transaction(byte[] tx);
874         }
875         public static native long LDKBroadcasterInterface_new(LDKBroadcasterInterface impl);
876         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
877         public static native void BroadcasterInterface_broadcast_transaction(long this_arg, byte[] tx);
878         public interface LDKKeysInterface {
879                  byte[] get_node_secret();
880                  byte[] get_destination_script();
881                  long get_shutdown_scriptpubkey();
882                  long get_channel_signer(boolean inbound, long channel_value_satoshis);
883                  byte[] get_secure_random_bytes();
884                  long read_chan_signer(byte[] reader);
885                  long sign_invoice(byte[] invoice_preimage);
886                  byte[] get_inbound_payment_key_material();
887         }
888         public static native long LDKKeysInterface_new(LDKKeysInterface impl);
889         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
890         public static native byte[] KeysInterface_get_node_secret(long this_arg);
891         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
892         public static native byte[] KeysInterface_get_destination_script(long this_arg);
893         // LDKShutdownScript KeysInterface_get_shutdown_scriptpubkey LDKKeysInterface *NONNULL_PTR this_arg
894         public static native long KeysInterface_get_shutdown_scriptpubkey(long this_arg);
895         // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
896         public static native long KeysInterface_get_channel_signer(long this_arg, boolean inbound, long channel_value_satoshis);
897         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
898         public static native byte[] KeysInterface_get_secure_random_bytes(long this_arg);
899         // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
900         public static native long KeysInterface_read_chan_signer(long this_arg, byte[] reader);
901         // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
902         public static native long KeysInterface_sign_invoice(long this_arg, byte[] invoice_preimage);
903         // LDKThirtyTwoBytes KeysInterface_get_inbound_payment_key_material LDKKeysInterface *NONNULL_PTR this_arg
904         public static native byte[] KeysInterface_get_inbound_payment_key_material(long this_arg);
905         public interface LDKFeeEstimator {
906                  int get_est_sat_per_1000_weight(ConfirmationTarget confirmation_target);
907         }
908         public static native long LDKFeeEstimator_new(LDKFeeEstimator impl);
909         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
910         public static native int FeeEstimator_get_est_sat_per_1000_weight(long this_arg, ConfirmationTarget confirmation_target);
911         public interface LDKLogger {
912                  void log(long record);
913         }
914         public static native long LDKLogger_new(LDKLogger impl);
915         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR owner);
916         public static native byte[] C2Tuple_BlockHashChannelManagerZ_get_a(long owner);
917         // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR owner);
918         public static native long C2Tuple_BlockHashChannelManagerZ_get_b(long owner);
919         // struct LDKC2Tuple_BlockHashChannelManagerZ *CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner);
920         public static native long CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long owner);
921         // struct LDKDecodeError CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR owner);
922         public static native long CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long owner);
923         // struct LDKChannelConfig CResult_ChannelConfigDecodeErrorZ_get_ok(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR owner);
924         public static native long CResult_ChannelConfigDecodeErrorZ_get_ok(long owner);
925         // struct LDKDecodeError CResult_ChannelConfigDecodeErrorZ_get_err(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR owner);
926         public static native long CResult_ChannelConfigDecodeErrorZ_get_err(long owner);
927         // struct LDKOutPoint CResult_OutPointDecodeErrorZ_get_ok(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR owner);
928         public static native long CResult_OutPointDecodeErrorZ_get_ok(long owner);
929         // struct LDKDecodeError CResult_OutPointDecodeErrorZ_get_err(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR owner);
930         public static native long CResult_OutPointDecodeErrorZ_get_err(long owner);
931         public interface LDKType {
932                  short type_id();
933                  String debug_str();
934                  byte[] write();
935         }
936         public static native long LDKType_new(LDKType impl);
937         // uint16_t Type_type_id LDKType *NONNULL_PTR this_arg
938         public static native short Type_type_id(long this_arg);
939         // LDKStr Type_debug_str LDKType *NONNULL_PTR this_arg
940         public static native String Type_debug_str(long this_arg);
941         // LDKCVec_u8Z Type_write LDKType *NONNULL_PTR this_arg
942         public static native byte[] Type_write(long this_arg);
943         public static class LDKCOption_TypeZ {
944                 private LDKCOption_TypeZ() {}
945                 public final static class Some extends LDKCOption_TypeZ {
946                         public long some;
947                         Some(long some) { this.some = some; }
948                 }
949                 public final static class None extends LDKCOption_TypeZ {
950                         None() { }
951                 }
952                 static native void init();
953         }
954         static { LDKCOption_TypeZ.init(); }
955         public static native LDKCOption_TypeZ LDKCOption_TypeZ_ref_from_ptr(long ptr);
956         // struct LDKCOption_TypeZ CResult_COption_TypeZDecodeErrorZ_get_ok(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR owner);
957         public static native long CResult_COption_TypeZDecodeErrorZ_get_ok(long owner);
958         // struct LDKDecodeError CResult_COption_TypeZDecodeErrorZ_get_err(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR owner);
959         public static native long CResult_COption_TypeZDecodeErrorZ_get_err(long owner);
960         public static class LDKPaymentError {
961                 private LDKPaymentError() {}
962                 public final static class Invoice extends LDKPaymentError {
963                         public String invoice;
964                         Invoice(String invoice) { this.invoice = invoice; }
965                 }
966                 public final static class Routing extends LDKPaymentError {
967                         public long routing;
968                         Routing(long routing) { this.routing = routing; }
969                 }
970                 public final static class Sending extends LDKPaymentError {
971                         public long sending;
972                         Sending(long sending) { this.sending = sending; }
973                 }
974                 static native void init();
975         }
976         static { LDKPaymentError.init(); }
977         public static native LDKPaymentError LDKPaymentError_ref_from_ptr(long ptr);
978         // struct LDKThirtyTwoBytes CResult_PaymentIdPaymentErrorZ_get_ok(LDKCResult_PaymentIdPaymentErrorZ *NONNULL_PTR owner);
979         public static native byte[] CResult_PaymentIdPaymentErrorZ_get_ok(long owner);
980         // struct LDKPaymentError CResult_PaymentIdPaymentErrorZ_get_err(LDKCResult_PaymentIdPaymentErrorZ *NONNULL_PTR owner);
981         public static native long CResult_PaymentIdPaymentErrorZ_get_err(long owner);
982         // enum LDKSiPrefix CResult_SiPrefixNoneZ_get_ok(LDKCResult_SiPrefixNoneZ *NONNULL_PTR owner);
983         public static native SiPrefix CResult_SiPrefixNoneZ_get_ok(long owner);
984         // void CResult_SiPrefixNoneZ_get_err(LDKCResult_SiPrefixNoneZ *NONNULL_PTR owner);
985         public static native void CResult_SiPrefixNoneZ_get_err(long owner);
986         // struct LDKInvoice CResult_InvoiceNoneZ_get_ok(LDKCResult_InvoiceNoneZ *NONNULL_PTR owner);
987         public static native long CResult_InvoiceNoneZ_get_ok(long owner);
988         // void CResult_InvoiceNoneZ_get_err(LDKCResult_InvoiceNoneZ *NONNULL_PTR owner);
989         public static native void CResult_InvoiceNoneZ_get_err(long owner);
990         // struct LDKSignedRawInvoice CResult_SignedRawInvoiceNoneZ_get_ok(LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR owner);
991         public static native long CResult_SignedRawInvoiceNoneZ_get_ok(long owner);
992         // void CResult_SignedRawInvoiceNoneZ_get_err(LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR owner);
993         public static native void CResult_SignedRawInvoiceNoneZ_get_err(long owner);
994         // struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR owner);
995         public static native long C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(long owner);
996         // struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR owner);
997         public static native byte[] C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(long owner);
998         // struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR owner);
999         public static native long C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(long owner);
1000         // struct LDKPayeePubKey CResult_PayeePubKeyErrorZ_get_ok(LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR owner);
1001         public static native long CResult_PayeePubKeyErrorZ_get_ok(long owner);
1002         // enum LDKSecp256k1Error CResult_PayeePubKeyErrorZ_get_err(LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR owner);
1003         public static native Secp256k1Error CResult_PayeePubKeyErrorZ_get_err(long owner);
1004         // struct LDKPositiveTimestamp CResult_PositiveTimestampCreationErrorZ_get_ok(LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR owner);
1005         public static native long CResult_PositiveTimestampCreationErrorZ_get_ok(long owner);
1006         // enum LDKCreationError CResult_PositiveTimestampCreationErrorZ_get_err(LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR owner);
1007         public static native CreationError CResult_PositiveTimestampCreationErrorZ_get_err(long owner);
1008         // void CResult_NoneSemanticErrorZ_get_ok(LDKCResult_NoneSemanticErrorZ *NONNULL_PTR owner);
1009         public static native void CResult_NoneSemanticErrorZ_get_ok(long owner);
1010         // enum LDKSemanticError CResult_NoneSemanticErrorZ_get_err(LDKCResult_NoneSemanticErrorZ *NONNULL_PTR owner);
1011         public static native SemanticError CResult_NoneSemanticErrorZ_get_err(long owner);
1012         // struct LDKInvoice CResult_InvoiceSemanticErrorZ_get_ok(LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR owner);
1013         public static native long CResult_InvoiceSemanticErrorZ_get_ok(long owner);
1014         // enum LDKSemanticError CResult_InvoiceSemanticErrorZ_get_err(LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR owner);
1015         public static native SemanticError CResult_InvoiceSemanticErrorZ_get_err(long owner);
1016         // struct LDKDescription CResult_DescriptionCreationErrorZ_get_ok(LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR owner);
1017         public static native long CResult_DescriptionCreationErrorZ_get_ok(long owner);
1018         // enum LDKCreationError CResult_DescriptionCreationErrorZ_get_err(LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR owner);
1019         public static native CreationError CResult_DescriptionCreationErrorZ_get_err(long owner);
1020         // struct LDKExpiryTime CResult_ExpiryTimeCreationErrorZ_get_ok(LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR owner);
1021         public static native long CResult_ExpiryTimeCreationErrorZ_get_ok(long owner);
1022         // enum LDKCreationError CResult_ExpiryTimeCreationErrorZ_get_err(LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR owner);
1023         public static native CreationError CResult_ExpiryTimeCreationErrorZ_get_err(long owner);
1024         // struct LDKPrivateRoute CResult_PrivateRouteCreationErrorZ_get_ok(LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR owner);
1025         public static native long CResult_PrivateRouteCreationErrorZ_get_ok(long owner);
1026         // enum LDKCreationError CResult_PrivateRouteCreationErrorZ_get_err(LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR owner);
1027         public static native CreationError CResult_PrivateRouteCreationErrorZ_get_err(long owner);
1028         // struct LDKStr CResult_StringErrorZ_get_ok(LDKCResult_StringErrorZ *NONNULL_PTR owner);
1029         public static native String CResult_StringErrorZ_get_ok(long owner);
1030         // enum LDKSecp256k1Error CResult_StringErrorZ_get_err(LDKCResult_StringErrorZ *NONNULL_PTR owner);
1031         public static native Secp256k1Error CResult_StringErrorZ_get_err(long owner);
1032         // struct LDKChannelMonitorUpdate CResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR owner);
1033         public static native long CResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long owner);
1034         // struct LDKDecodeError CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR owner);
1035         public static native long CResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long owner);
1036         public static class LDKCOption_MonitorEventZ {
1037                 private LDKCOption_MonitorEventZ() {}
1038                 public final static class Some extends LDKCOption_MonitorEventZ {
1039                         public long some;
1040                         Some(long some) { this.some = some; }
1041                 }
1042                 public final static class None extends LDKCOption_MonitorEventZ {
1043                         None() { }
1044                 }
1045                 static native void init();
1046         }
1047         static { LDKCOption_MonitorEventZ.init(); }
1048         public static native LDKCOption_MonitorEventZ LDKCOption_MonitorEventZ_ref_from_ptr(long ptr);
1049         // struct LDKCOption_MonitorEventZ CResult_COption_MonitorEventZDecodeErrorZ_get_ok(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR owner);
1050         public static native long CResult_COption_MonitorEventZDecodeErrorZ_get_ok(long owner);
1051         // struct LDKDecodeError CResult_COption_MonitorEventZDecodeErrorZ_get_err(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR owner);
1052         public static native long CResult_COption_MonitorEventZDecodeErrorZ_get_err(long owner);
1053         // struct LDKHTLCUpdate CResult_HTLCUpdateDecodeErrorZ_get_ok(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR owner);
1054         public static native long CResult_HTLCUpdateDecodeErrorZ_get_ok(long owner);
1055         // struct LDKDecodeError CResult_HTLCUpdateDecodeErrorZ_get_err(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR owner);
1056         public static native long CResult_HTLCUpdateDecodeErrorZ_get_err(long owner);
1057         // struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR owner);
1058         public static native long C2Tuple_OutPointScriptZ_get_a(long owner);
1059         // struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR owner);
1060         public static native byte[] C2Tuple_OutPointScriptZ_get_b(long owner);
1061         // uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR owner);
1062         public static native int C2Tuple_u32ScriptZ_get_a(long owner);
1063         // struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR owner);
1064         public static native byte[] C2Tuple_u32ScriptZ_get_b(long owner);
1065         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR owner);
1066         public static native byte[] C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long owner);
1067         // struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR owner);
1068         public static native long[] C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long owner);
1069         // uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR owner);
1070         public static native int C2Tuple_u32TxOutZ_get_a(long owner);
1071         // struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR owner);
1072         public static native long C2Tuple_u32TxOutZ_get_b(long owner);
1073         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR owner);
1074         public static native byte[] C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long owner);
1075         // struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR owner);
1076         public static native long[] C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long owner);
1077         public static class LDKBalance {
1078                 private LDKBalance() {}
1079                 public final static class ClaimableOnChannelClose extends LDKBalance {
1080                         public long claimable_amount_satoshis;
1081                         ClaimableOnChannelClose(long claimable_amount_satoshis) { this.claimable_amount_satoshis = claimable_amount_satoshis; }
1082                 }
1083                 public final static class ClaimableAwaitingConfirmations extends LDKBalance {
1084                         public long claimable_amount_satoshis;
1085                         public int confirmation_height;
1086                         ClaimableAwaitingConfirmations(long claimable_amount_satoshis, int confirmation_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.confirmation_height = confirmation_height; }
1087                 }
1088                 public final static class ContentiousClaimable extends LDKBalance {
1089                         public long claimable_amount_satoshis;
1090                         public int timeout_height;
1091                         ContentiousClaimable(long claimable_amount_satoshis, int timeout_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.timeout_height = timeout_height; }
1092                 }
1093                 public final static class MaybeClaimableHTLCAwaitingTimeout extends LDKBalance {
1094                         public long claimable_amount_satoshis;
1095                         public int claimable_height;
1096                         MaybeClaimableHTLCAwaitingTimeout(long claimable_amount_satoshis, int claimable_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.claimable_height = claimable_height; }
1097                 }
1098                 static native void init();
1099         }
1100         static { LDKBalance.init(); }
1101         public static native LDKBalance LDKBalance_ref_from_ptr(long ptr);
1102         // struct LDKC2Tuple_BlockHashChannelMonitorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR owner);
1103         public static native long CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long owner);
1104         // struct LDKDecodeError CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR owner);
1105         public static native long CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long owner);
1106         // void CResult_NoneLightningErrorZ_get_ok(LDKCResult_NoneLightningErrorZ *NONNULL_PTR owner);
1107         public static native void CResult_NoneLightningErrorZ_get_ok(long owner);
1108         // struct LDKLightningError CResult_NoneLightningErrorZ_get_err(LDKCResult_NoneLightningErrorZ *NONNULL_PTR owner);
1109         public static native long CResult_NoneLightningErrorZ_get_err(long owner);
1110         // struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR owner);
1111         public static native byte[] C2Tuple_PublicKeyTypeZ_get_a(long owner);
1112         // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR owner);
1113         public static native long C2Tuple_PublicKeyTypeZ_get_b(long owner);
1114         // bool CResult_boolLightningErrorZ_get_ok(LDKCResult_boolLightningErrorZ *NONNULL_PTR owner);
1115         public static native boolean CResult_boolLightningErrorZ_get_ok(long owner);
1116         // struct LDKLightningError CResult_boolLightningErrorZ_get_err(LDKCResult_boolLightningErrorZ *NONNULL_PTR owner);
1117         public static native long CResult_boolLightningErrorZ_get_err(long owner);
1118         // struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR owner);
1119         public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long owner);
1120         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR owner);
1121         public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long owner);
1122         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR owner);
1123         public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long owner);
1124         // struct LDKCVec_u8Z CResult_CVec_u8ZPeerHandleErrorZ_get_ok(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner);
1125         public static native byte[] CResult_CVec_u8ZPeerHandleErrorZ_get_ok(long owner);
1126         // struct LDKPeerHandleError CResult_CVec_u8ZPeerHandleErrorZ_get_err(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR owner);
1127         public static native long CResult_CVec_u8ZPeerHandleErrorZ_get_err(long owner);
1128         // void CResult_NonePeerHandleErrorZ_get_ok(LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR owner);
1129         public static native void CResult_NonePeerHandleErrorZ_get_ok(long owner);
1130         // struct LDKPeerHandleError CResult_NonePeerHandleErrorZ_get_err(LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR owner);
1131         public static native long CResult_NonePeerHandleErrorZ_get_err(long owner);
1132         // bool CResult_boolPeerHandleErrorZ_get_ok(LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR owner);
1133         public static native boolean CResult_boolPeerHandleErrorZ_get_ok(long owner);
1134         // struct LDKPeerHandleError CResult_boolPeerHandleErrorZ_get_err(LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR owner);
1135         public static native long CResult_boolPeerHandleErrorZ_get_err(long owner);
1136         // struct LDKNodeId CResult_NodeIdDecodeErrorZ_get_ok(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner);
1137         public static native long CResult_NodeIdDecodeErrorZ_get_ok(long owner);
1138         // struct LDKDecodeError CResult_NodeIdDecodeErrorZ_get_err(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR owner);
1139         public static native long CResult_NodeIdDecodeErrorZ_get_err(long owner);
1140         // struct LDKCOption_NetworkUpdateZ CResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR owner);
1141         public static native long CResult_COption_NetworkUpdateZDecodeErrorZ_get_ok(long owner);
1142         // struct LDKDecodeError CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR owner);
1143         public static native long CResult_COption_NetworkUpdateZDecodeErrorZ_get_err(long owner);
1144         public interface LDKAccess {
1145                  long get_utxo(byte[] genesis_hash, long short_channel_id);
1146         }
1147         public static native long LDKAccess_new(LDKAccess impl);
1148         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1149         public static native long Access_get_utxo(long this_arg, byte[] genesis_hash, long short_channel_id);
1150         public static class LDKCOption_AccessZ {
1151                 private LDKCOption_AccessZ() {}
1152                 public final static class Some extends LDKCOption_AccessZ {
1153                         public long some;
1154                         Some(long some) { this.some = some; }
1155                 }
1156                 public final static class None extends LDKCOption_AccessZ {
1157                         None() { }
1158                 }
1159                 static native void init();
1160         }
1161         static { LDKCOption_AccessZ.init(); }
1162         public static native LDKCOption_AccessZ LDKCOption_AccessZ_ref_from_ptr(long ptr);
1163         // struct LDKDirectionalChannelInfo CResult_DirectionalChannelInfoDecodeErrorZ_get_ok(LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR owner);
1164         public static native long CResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long owner);
1165         // struct LDKDecodeError CResult_DirectionalChannelInfoDecodeErrorZ_get_err(LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR owner);
1166         public static native long CResult_DirectionalChannelInfoDecodeErrorZ_get_err(long owner);
1167         // struct LDKChannelInfo CResult_ChannelInfoDecodeErrorZ_get_ok(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR owner);
1168         public static native long CResult_ChannelInfoDecodeErrorZ_get_ok(long owner);
1169         // struct LDKDecodeError CResult_ChannelInfoDecodeErrorZ_get_err(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR owner);
1170         public static native long CResult_ChannelInfoDecodeErrorZ_get_err(long owner);
1171         // struct LDKRoutingFees CResult_RoutingFeesDecodeErrorZ_get_ok(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR owner);
1172         public static native long CResult_RoutingFeesDecodeErrorZ_get_ok(long owner);
1173         // struct LDKDecodeError CResult_RoutingFeesDecodeErrorZ_get_err(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR owner);
1174         public static native long CResult_RoutingFeesDecodeErrorZ_get_err(long owner);
1175         // struct LDKNodeAnnouncementInfo CResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR owner);
1176         public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long owner);
1177         // struct LDKDecodeError CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR owner);
1178         public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long owner);
1179         // struct LDKNodeInfo CResult_NodeInfoDecodeErrorZ_get_ok(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR owner);
1180         public static native long CResult_NodeInfoDecodeErrorZ_get_ok(long owner);
1181         // struct LDKDecodeError CResult_NodeInfoDecodeErrorZ_get_err(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR owner);
1182         public static native long CResult_NodeInfoDecodeErrorZ_get_err(long owner);
1183         // struct LDKNetworkGraph CResult_NetworkGraphDecodeErrorZ_get_ok(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR owner);
1184         public static native long CResult_NetworkGraphDecodeErrorZ_get_ok(long owner);
1185         // struct LDKDecodeError CResult_NetworkGraphDecodeErrorZ_get_err(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR owner);
1186         public static native long CResult_NetworkGraphDecodeErrorZ_get_err(long owner);
1187         public static class LDKCOption_CVec_NetAddressZZ {
1188                 private LDKCOption_CVec_NetAddressZZ() {}
1189                 public final static class Some extends LDKCOption_CVec_NetAddressZZ {
1190                         public long[] some;
1191                         Some(long[] some) { this.some = some; }
1192                 }
1193                 public final static class None extends LDKCOption_CVec_NetAddressZZ {
1194                         None() { }
1195                 }
1196                 static native void init();
1197         }
1198         static { LDKCOption_CVec_NetAddressZZ.init(); }
1199         public static native LDKCOption_CVec_NetAddressZZ LDKCOption_CVec_NetAddressZZ_ref_from_ptr(long ptr);
1200         // struct LDKNetAddress CResult_NetAddressDecodeErrorZ_get_ok(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR owner);
1201         public static native long CResult_NetAddressDecodeErrorZ_get_ok(long owner);
1202         // struct LDKDecodeError CResult_NetAddressDecodeErrorZ_get_err(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR owner);
1203         public static native long CResult_NetAddressDecodeErrorZ_get_err(long owner);
1204         // struct LDKAcceptChannel CResult_AcceptChannelDecodeErrorZ_get_ok(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR owner);
1205         public static native long CResult_AcceptChannelDecodeErrorZ_get_ok(long owner);
1206         // struct LDKDecodeError CResult_AcceptChannelDecodeErrorZ_get_err(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR owner);
1207         public static native long CResult_AcceptChannelDecodeErrorZ_get_err(long owner);
1208         // struct LDKAnnouncementSignatures CResult_AnnouncementSignaturesDecodeErrorZ_get_ok(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR owner);
1209         public static native long CResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long owner);
1210         // struct LDKDecodeError CResult_AnnouncementSignaturesDecodeErrorZ_get_err(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR owner);
1211         public static native long CResult_AnnouncementSignaturesDecodeErrorZ_get_err(long owner);
1212         // struct LDKChannelReestablish CResult_ChannelReestablishDecodeErrorZ_get_ok(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR owner);
1213         public static native long CResult_ChannelReestablishDecodeErrorZ_get_ok(long owner);
1214         // struct LDKDecodeError CResult_ChannelReestablishDecodeErrorZ_get_err(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR owner);
1215         public static native long CResult_ChannelReestablishDecodeErrorZ_get_err(long owner);
1216         // struct LDKClosingSigned CResult_ClosingSignedDecodeErrorZ_get_ok(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR owner);
1217         public static native long CResult_ClosingSignedDecodeErrorZ_get_ok(long owner);
1218         // struct LDKDecodeError CResult_ClosingSignedDecodeErrorZ_get_err(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR owner);
1219         public static native long CResult_ClosingSignedDecodeErrorZ_get_err(long owner);
1220         // struct LDKClosingSignedFeeRange CResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR owner);
1221         public static native long CResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(long owner);
1222         // struct LDKDecodeError CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR owner);
1223         public static native long CResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(long owner);
1224         // struct LDKCommitmentSigned CResult_CommitmentSignedDecodeErrorZ_get_ok(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR owner);
1225         public static native long CResult_CommitmentSignedDecodeErrorZ_get_ok(long owner);
1226         // struct LDKDecodeError CResult_CommitmentSignedDecodeErrorZ_get_err(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR owner);
1227         public static native long CResult_CommitmentSignedDecodeErrorZ_get_err(long owner);
1228         // struct LDKFundingCreated CResult_FundingCreatedDecodeErrorZ_get_ok(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR owner);
1229         public static native long CResult_FundingCreatedDecodeErrorZ_get_ok(long owner);
1230         // struct LDKDecodeError CResult_FundingCreatedDecodeErrorZ_get_err(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR owner);
1231         public static native long CResult_FundingCreatedDecodeErrorZ_get_err(long owner);
1232         // struct LDKFundingSigned CResult_FundingSignedDecodeErrorZ_get_ok(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR owner);
1233         public static native long CResult_FundingSignedDecodeErrorZ_get_ok(long owner);
1234         // struct LDKDecodeError CResult_FundingSignedDecodeErrorZ_get_err(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR owner);
1235         public static native long CResult_FundingSignedDecodeErrorZ_get_err(long owner);
1236         // struct LDKFundingLocked CResult_FundingLockedDecodeErrorZ_get_ok(LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR owner);
1237         public static native long CResult_FundingLockedDecodeErrorZ_get_ok(long owner);
1238         // struct LDKDecodeError CResult_FundingLockedDecodeErrorZ_get_err(LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR owner);
1239         public static native long CResult_FundingLockedDecodeErrorZ_get_err(long owner);
1240         // struct LDKInit CResult_InitDecodeErrorZ_get_ok(LDKCResult_InitDecodeErrorZ *NONNULL_PTR owner);
1241         public static native long CResult_InitDecodeErrorZ_get_ok(long owner);
1242         // struct LDKDecodeError CResult_InitDecodeErrorZ_get_err(LDKCResult_InitDecodeErrorZ *NONNULL_PTR owner);
1243         public static native long CResult_InitDecodeErrorZ_get_err(long owner);
1244         // struct LDKOpenChannel CResult_OpenChannelDecodeErrorZ_get_ok(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR owner);
1245         public static native long CResult_OpenChannelDecodeErrorZ_get_ok(long owner);
1246         // struct LDKDecodeError CResult_OpenChannelDecodeErrorZ_get_err(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR owner);
1247         public static native long CResult_OpenChannelDecodeErrorZ_get_err(long owner);
1248         // struct LDKRevokeAndACK CResult_RevokeAndACKDecodeErrorZ_get_ok(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR owner);
1249         public static native long CResult_RevokeAndACKDecodeErrorZ_get_ok(long owner);
1250         // struct LDKDecodeError CResult_RevokeAndACKDecodeErrorZ_get_err(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR owner);
1251         public static native long CResult_RevokeAndACKDecodeErrorZ_get_err(long owner);
1252         // struct LDKShutdown CResult_ShutdownDecodeErrorZ_get_ok(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR owner);
1253         public static native long CResult_ShutdownDecodeErrorZ_get_ok(long owner);
1254         // struct LDKDecodeError CResult_ShutdownDecodeErrorZ_get_err(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR owner);
1255         public static native long CResult_ShutdownDecodeErrorZ_get_err(long owner);
1256         // struct LDKUpdateFailHTLC CResult_UpdateFailHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR owner);
1257         public static native long CResult_UpdateFailHTLCDecodeErrorZ_get_ok(long owner);
1258         // struct LDKDecodeError CResult_UpdateFailHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR owner);
1259         public static native long CResult_UpdateFailHTLCDecodeErrorZ_get_err(long owner);
1260         // struct LDKUpdateFailMalformedHTLC CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR owner);
1261         public static native long CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long owner);
1262         // struct LDKDecodeError CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR owner);
1263         public static native long CResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long owner);
1264         // struct LDKUpdateFee CResult_UpdateFeeDecodeErrorZ_get_ok(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR owner);
1265         public static native long CResult_UpdateFeeDecodeErrorZ_get_ok(long owner);
1266         // struct LDKDecodeError CResult_UpdateFeeDecodeErrorZ_get_err(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR owner);
1267         public static native long CResult_UpdateFeeDecodeErrorZ_get_err(long owner);
1268         // struct LDKUpdateFulfillHTLC CResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR owner);
1269         public static native long CResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long owner);
1270         // struct LDKDecodeError CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR owner);
1271         public static native long CResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long owner);
1272         // struct LDKUpdateAddHTLC CResult_UpdateAddHTLCDecodeErrorZ_get_ok(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR owner);
1273         public static native long CResult_UpdateAddHTLCDecodeErrorZ_get_ok(long owner);
1274         // struct LDKDecodeError CResult_UpdateAddHTLCDecodeErrorZ_get_err(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR owner);
1275         public static native long CResult_UpdateAddHTLCDecodeErrorZ_get_err(long owner);
1276         // struct LDKPing CResult_PingDecodeErrorZ_get_ok(LDKCResult_PingDecodeErrorZ *NONNULL_PTR owner);
1277         public static native long CResult_PingDecodeErrorZ_get_ok(long owner);
1278         // struct LDKDecodeError CResult_PingDecodeErrorZ_get_err(LDKCResult_PingDecodeErrorZ *NONNULL_PTR owner);
1279         public static native long CResult_PingDecodeErrorZ_get_err(long owner);
1280         // struct LDKPong CResult_PongDecodeErrorZ_get_ok(LDKCResult_PongDecodeErrorZ *NONNULL_PTR owner);
1281         public static native long CResult_PongDecodeErrorZ_get_ok(long owner);
1282         // struct LDKDecodeError CResult_PongDecodeErrorZ_get_err(LDKCResult_PongDecodeErrorZ *NONNULL_PTR owner);
1283         public static native long CResult_PongDecodeErrorZ_get_err(long owner);
1284         // struct LDKUnsignedChannelAnnouncement CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
1285         public static native long CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long owner);
1286         // struct LDKDecodeError CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
1287         public static native long CResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long owner);
1288         // struct LDKChannelAnnouncement CResult_ChannelAnnouncementDecodeErrorZ_get_ok(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
1289         public static native long CResult_ChannelAnnouncementDecodeErrorZ_get_ok(long owner);
1290         // struct LDKDecodeError CResult_ChannelAnnouncementDecodeErrorZ_get_err(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR owner);
1291         public static native long CResult_ChannelAnnouncementDecodeErrorZ_get_err(long owner);
1292         // struct LDKUnsignedChannelUpdate CResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
1293         public static native long CResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long owner);
1294         // struct LDKDecodeError CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
1295         public static native long CResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long owner);
1296         // struct LDKChannelUpdate CResult_ChannelUpdateDecodeErrorZ_get_ok(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
1297         public static native long CResult_ChannelUpdateDecodeErrorZ_get_ok(long owner);
1298         // struct LDKDecodeError CResult_ChannelUpdateDecodeErrorZ_get_err(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR owner);
1299         public static native long CResult_ChannelUpdateDecodeErrorZ_get_err(long owner);
1300         // struct LDKErrorMessage CResult_ErrorMessageDecodeErrorZ_get_ok(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR owner);
1301         public static native long CResult_ErrorMessageDecodeErrorZ_get_ok(long owner);
1302         // struct LDKDecodeError CResult_ErrorMessageDecodeErrorZ_get_err(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR owner);
1303         public static native long CResult_ErrorMessageDecodeErrorZ_get_err(long owner);
1304         // struct LDKUnsignedNodeAnnouncement CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
1305         public static native long CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long owner);
1306         // struct LDKDecodeError CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
1307         public static native long CResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long owner);
1308         // struct LDKNodeAnnouncement CResult_NodeAnnouncementDecodeErrorZ_get_ok(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
1309         public static native long CResult_NodeAnnouncementDecodeErrorZ_get_ok(long owner);
1310         // struct LDKDecodeError CResult_NodeAnnouncementDecodeErrorZ_get_err(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR owner);
1311         public static native long CResult_NodeAnnouncementDecodeErrorZ_get_err(long owner);
1312         // struct LDKQueryShortChannelIds CResult_QueryShortChannelIdsDecodeErrorZ_get_ok(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR owner);
1313         public static native long CResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long owner);
1314         // struct LDKDecodeError CResult_QueryShortChannelIdsDecodeErrorZ_get_err(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR owner);
1315         public static native long CResult_QueryShortChannelIdsDecodeErrorZ_get_err(long owner);
1316         // struct LDKReplyShortChannelIdsEnd CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR owner);
1317         public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long owner);
1318         // struct LDKDecodeError CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR owner);
1319         public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long owner);
1320         // struct LDKQueryChannelRange CResult_QueryChannelRangeDecodeErrorZ_get_ok(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR owner);
1321         public static native long CResult_QueryChannelRangeDecodeErrorZ_get_ok(long owner);
1322         // struct LDKDecodeError CResult_QueryChannelRangeDecodeErrorZ_get_err(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR owner);
1323         public static native long CResult_QueryChannelRangeDecodeErrorZ_get_err(long owner);
1324         // struct LDKReplyChannelRange CResult_ReplyChannelRangeDecodeErrorZ_get_ok(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR owner);
1325         public static native long CResult_ReplyChannelRangeDecodeErrorZ_get_ok(long owner);
1326         // struct LDKDecodeError CResult_ReplyChannelRangeDecodeErrorZ_get_err(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR owner);
1327         public static native long CResult_ReplyChannelRangeDecodeErrorZ_get_err(long owner);
1328         // struct LDKGossipTimestampFilter CResult_GossipTimestampFilterDecodeErrorZ_get_ok(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR owner);
1329         public static native long CResult_GossipTimestampFilterDecodeErrorZ_get_ok(long owner);
1330         // struct LDKDecodeError CResult_GossipTimestampFilterDecodeErrorZ_get_err(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR owner);
1331         public static native long CResult_GossipTimestampFilterDecodeErrorZ_get_err(long owner);
1332         public static class LDKSignOrCreationError {
1333                 private LDKSignOrCreationError() {}
1334                 public final static class SignError extends LDKSignOrCreationError {
1335                         SignError() { }
1336                 }
1337                 public final static class CreationError extends LDKSignOrCreationError {
1338                         public org.ldk.enums.CreationError creation_error;
1339                         CreationError(org.ldk.enums.CreationError creation_error) { this.creation_error = creation_error; }
1340                 }
1341                 static native void init();
1342         }
1343         static { LDKSignOrCreationError.init(); }
1344         public static native LDKSignOrCreationError LDKSignOrCreationError_ref_from_ptr(long ptr);
1345         // struct LDKInvoice CResult_InvoiceSignOrCreationErrorZ_get_ok(LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR owner);
1346         public static native long CResult_InvoiceSignOrCreationErrorZ_get_ok(long owner);
1347         // struct LDKSignOrCreationError CResult_InvoiceSignOrCreationErrorZ_get_err(LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR owner);
1348         public static native long CResult_InvoiceSignOrCreationErrorZ_get_err(long owner);
1349         public interface LDKFilter {
1350                  void register_tx(byte[] txid, byte[] script_pubkey);
1351                  long register_output(long output);
1352         }
1353         public static native long LDKFilter_new(LDKFilter impl);
1354         // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1355         public static native void Filter_register_tx(long this_arg, byte[] txid, byte[] script_pubkey);
1356         // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
1357         public static native long Filter_register_output(long this_arg, long output);
1358         public static class LDKCOption_FilterZ {
1359                 private LDKCOption_FilterZ() {}
1360                 public final static class Some extends LDKCOption_FilterZ {
1361                         public long some;
1362                         Some(long some) { this.some = some; }
1363                 }
1364                 public final static class None extends LDKCOption_FilterZ {
1365                         None() { }
1366                 }
1367                 static native void init();
1368         }
1369         static { LDKCOption_FilterZ.init(); }
1370         public static native LDKCOption_FilterZ LDKCOption_FilterZ_ref_from_ptr(long ptr);
1371         // struct LDKLockedChannelMonitor *CResult_LockedChannelMonitorNoneZ_get_ok(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
1372         public static native long CResult_LockedChannelMonitorNoneZ_get_ok(long owner);
1373         // void CResult_LockedChannelMonitorNoneZ_get_err(LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR owner);
1374         public static native void CResult_LockedChannelMonitorNoneZ_get_err(long owner);
1375         public interface LDKMessageSendEventsProvider {
1376                  long[] get_and_clear_pending_msg_events();
1377         }
1378         public static native long LDKMessageSendEventsProvider_new(LDKMessageSendEventsProvider impl);
1379         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1380         public static native long[] MessageSendEventsProvider_get_and_clear_pending_msg_events(long this_arg);
1381         public interface LDKEventHandler {
1382                  void handle_event(long event);
1383         }
1384         public static native long LDKEventHandler_new(LDKEventHandler impl);
1385         // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, const struct LDKEvent *NONNULL_PTR event
1386         public static native void EventHandler_handle_event(long this_arg, long event);
1387         public interface LDKEventsProvider {
1388                  void process_pending_events(long handler);
1389         }
1390         public static native long LDKEventsProvider_new(LDKEventsProvider impl);
1391         // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
1392         public static native void EventsProvider_process_pending_events(long this_arg, long handler);
1393         public interface LDKListen {
1394                  void block_connected(byte[] block, int height);
1395                  void block_disconnected(byte[] header, int height);
1396         }
1397         public static native long LDKListen_new(LDKListen impl);
1398         // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1399         public static native void Listen_block_connected(long this_arg, byte[] block, int height);
1400         // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1401         public static native void Listen_block_disconnected(long this_arg, byte[] header, int height);
1402         public interface LDKConfirm {
1403                  void transactions_confirmed(byte[] header, long[] txdata, int height);
1404                  void transaction_unconfirmed(byte[] txid);
1405                  void best_block_updated(byte[] header, int height);
1406                  byte[][] get_relevant_txids();
1407         }
1408         public static native long LDKConfirm_new(LDKConfirm impl);
1409         // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
1410         public static native void Confirm_transactions_confirmed(long this_arg, byte[] header, long[] txdata, int height);
1411         // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
1412         public static native void Confirm_transaction_unconfirmed(long this_arg, byte[] txid);
1413         // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1414         public static native void Confirm_best_block_updated(long this_arg, byte[] header, int height);
1415         // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
1416         public static native byte[][] Confirm_get_relevant_txids(long this_arg);
1417         public interface LDKPersist {
1418                  long persist_new_channel(long channel_id, long data, long update_id);
1419                  long update_persisted_channel(long channel_id, long update, long data, long update_id);
1420         }
1421         public static native long LDKPersist_new(LDKPersist impl);
1422         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
1423         public static native long Persist_persist_new_channel(long this_arg, long channel_id, long data, long update_id);
1424         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint channel_id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data, struct LDKMonitorUpdateId update_id
1425         public static native long Persist_update_persisted_channel(long this_arg, long channel_id, long update, long data, long update_id);
1426         public interface LDKChannelMessageHandler {
1427                  void handle_open_channel(byte[] their_node_id, long their_features, long msg);
1428                  void handle_accept_channel(byte[] their_node_id, long their_features, long msg);
1429                  void handle_funding_created(byte[] their_node_id, long msg);
1430                  void handle_funding_signed(byte[] their_node_id, long msg);
1431                  void handle_funding_locked(byte[] their_node_id, long msg);
1432                  void handle_shutdown(byte[] their_node_id, long their_features, long msg);
1433                  void handle_closing_signed(byte[] their_node_id, long msg);
1434                  void handle_update_add_htlc(byte[] their_node_id, long msg);
1435                  void handle_update_fulfill_htlc(byte[] their_node_id, long msg);
1436                  void handle_update_fail_htlc(byte[] their_node_id, long msg);
1437                  void handle_update_fail_malformed_htlc(byte[] their_node_id, long msg);
1438                  void handle_commitment_signed(byte[] their_node_id, long msg);
1439                  void handle_revoke_and_ack(byte[] their_node_id, long msg);
1440                  void handle_update_fee(byte[] their_node_id, long msg);
1441                  void handle_announcement_signatures(byte[] their_node_id, long msg);
1442                  void peer_disconnected(byte[] their_node_id, boolean no_connection_possible);
1443                  void peer_connected(byte[] their_node_id, long msg);
1444                  void handle_channel_reestablish(byte[] their_node_id, long msg);
1445                  void handle_channel_update(byte[] their_node_id, long msg);
1446                  void handle_error(byte[] their_node_id, long msg);
1447         }
1448         public static native long LDKChannelMessageHandler_new(LDKChannelMessageHandler impl, LDKMessageSendEventsProvider MessageSendEventsProvider);
1449         public static native long LDKChannelMessageHandler_get_MessageSendEventsProvider(long arg);
1450         // 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
1451         public static native void ChannelMessageHandler_handle_open_channel(long this_arg, byte[] their_node_id, long their_features, long msg);
1452         // 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
1453         public static native void ChannelMessageHandler_handle_accept_channel(long this_arg, byte[] their_node_id, long their_features, long msg);
1454         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1455         public static native void ChannelMessageHandler_handle_funding_created(long this_arg, byte[] their_node_id, long msg);
1456         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1457         public static native void ChannelMessageHandler_handle_funding_signed(long this_arg, byte[] their_node_id, long msg);
1458         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1459         public static native void ChannelMessageHandler_handle_funding_locked(long this_arg, byte[] their_node_id, long msg);
1460         // 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
1461         public static native void ChannelMessageHandler_handle_shutdown(long this_arg, byte[] their_node_id, long their_features, long msg);
1462         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1463         public static native void ChannelMessageHandler_handle_closing_signed(long this_arg, byte[] their_node_id, long msg);
1464         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1465         public static native void ChannelMessageHandler_handle_update_add_htlc(long this_arg, byte[] their_node_id, long msg);
1466         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1467         public static native void ChannelMessageHandler_handle_update_fulfill_htlc(long this_arg, byte[] their_node_id, long msg);
1468         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1469         public static native void ChannelMessageHandler_handle_update_fail_htlc(long this_arg, byte[] their_node_id, long msg);
1470         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1471         public static native void ChannelMessageHandler_handle_update_fail_malformed_htlc(long this_arg, byte[] their_node_id, long msg);
1472         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1473         public static native void ChannelMessageHandler_handle_commitment_signed(long this_arg, byte[] their_node_id, long msg);
1474         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1475         public static native void ChannelMessageHandler_handle_revoke_and_ack(long this_arg, byte[] their_node_id, long msg);
1476         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1477         public static native void ChannelMessageHandler_handle_update_fee(long this_arg, byte[] their_node_id, long msg);
1478         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1479         public static native void ChannelMessageHandler_handle_announcement_signatures(long this_arg, byte[] their_node_id, long msg);
1480         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1481         public static native void ChannelMessageHandler_peer_disconnected(long this_arg, byte[] their_node_id, boolean no_connection_possible);
1482         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1483         public static native void ChannelMessageHandler_peer_connected(long this_arg, byte[] their_node_id, long msg);
1484         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1485         public static native void ChannelMessageHandler_handle_channel_reestablish(long this_arg, byte[] their_node_id, long msg);
1486         // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
1487         public static native void ChannelMessageHandler_handle_channel_update(long this_arg, byte[] their_node_id, long msg);
1488         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1489         public static native void ChannelMessageHandler_handle_error(long this_arg, byte[] their_node_id, long msg);
1490         public interface LDKRoutingMessageHandler {
1491                  long handle_node_announcement(long msg);
1492                  long handle_channel_announcement(long msg);
1493                  long handle_channel_update(long msg);
1494                  long[] get_next_channel_announcements(long starting_point, byte batch_amount);
1495                  long[] get_next_node_announcements(byte[] starting_point, byte batch_amount);
1496                  void sync_routing_table(byte[] their_node_id, long init);
1497                  long handle_reply_channel_range(byte[] their_node_id, long msg);
1498                  long handle_reply_short_channel_ids_end(byte[] their_node_id, long msg);
1499                  long handle_query_channel_range(byte[] their_node_id, long msg);
1500                  long handle_query_short_channel_ids(byte[] their_node_id, long msg);
1501         }
1502         public static native long LDKRoutingMessageHandler_new(LDKRoutingMessageHandler impl, LDKMessageSendEventsProvider MessageSendEventsProvider);
1503         public static native long LDKRoutingMessageHandler_get_MessageSendEventsProvider(long arg);
1504         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1505         public static native long RoutingMessageHandler_handle_node_announcement(long this_arg, long msg);
1506         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1507         public static native long RoutingMessageHandler_handle_channel_announcement(long this_arg, long msg);
1508         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1509         public static native long RoutingMessageHandler_handle_channel_update(long this_arg, long msg);
1510         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
1511         public static native long[] RoutingMessageHandler_get_next_channel_announcements(long this_arg, long starting_point, byte batch_amount);
1512         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1513         public static native long[] RoutingMessageHandler_get_next_node_announcements(long this_arg, byte[] starting_point, byte batch_amount);
1514         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1515         public static native void RoutingMessageHandler_sync_routing_table(long this_arg, byte[] their_node_id, long init);
1516         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1517         public static native long RoutingMessageHandler_handle_reply_channel_range(long this_arg, byte[] their_node_id, long msg);
1518         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1519         public static native long RoutingMessageHandler_handle_reply_short_channel_ids_end(long this_arg, byte[] their_node_id, long msg);
1520         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1521         public static native long RoutingMessageHandler_handle_query_channel_range(long this_arg, byte[] their_node_id, long msg);
1522         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1523         public static native long RoutingMessageHandler_handle_query_short_channel_ids(long this_arg, byte[] their_node_id, long msg);
1524         public interface LDKCustomMessageReader {
1525                  long read(short message_type, byte[] buffer);
1526         }
1527         public static native long LDKCustomMessageReader_new(LDKCustomMessageReader impl);
1528         // LDKCResult_COption_TypeZDecodeErrorZ CustomMessageReader_read LDKCustomMessageReader *NONNULL_PTR this_arg, uint16_t message_type, struct LDKu8slice buffer
1529         public static native long CustomMessageReader_read(long this_arg, short message_type, byte[] buffer);
1530         public interface LDKCustomMessageHandler {
1531                  long handle_custom_message(long msg, byte[] sender_node_id);
1532                  long[] get_and_clear_pending_msg();
1533         }
1534         public static native long LDKCustomMessageHandler_new(LDKCustomMessageHandler impl, LDKCustomMessageReader CustomMessageReader);
1535         public static native long LDKCustomMessageHandler_get_CustomMessageReader(long arg);
1536         // LDKCResult_NoneLightningErrorZ CustomMessageHandler_handle_custom_message LDKCustomMessageHandler *NONNULL_PTR this_arg, struct LDKType msg, struct LDKPublicKey sender_node_id
1537         public static native long CustomMessageHandler_handle_custom_message(long this_arg, long msg, byte[] sender_node_id);
1538         // LDKCVec_C2Tuple_PublicKeyTypeZZ CustomMessageHandler_get_and_clear_pending_msg LDKCustomMessageHandler *NONNULL_PTR this_arg
1539         public static native long[] CustomMessageHandler_get_and_clear_pending_msg(long this_arg);
1540         public interface LDKSocketDescriptor {
1541                  long send_data(byte[] data, boolean resume_read);
1542                  void disconnect_socket();
1543                  boolean eq(long other_arg);
1544                  long hash();
1545         }
1546         public static native long LDKSocketDescriptor_new(LDKSocketDescriptor impl);
1547         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
1548         public static native long SocketDescriptor_send_data(long this_arg, byte[] data, boolean resume_read);
1549         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
1550         public static native void SocketDescriptor_disconnect_socket(long this_arg);
1551         // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
1552         public static native long SocketDescriptor_hash(long this_arg);
1553         public interface LDKScore {
1554                  long channel_penalty_msat(long short_channel_id, long send_amt_msat, long channel_capacity_msat, long source, long target);
1555                  void payment_path_failed(long[] path, long short_channel_id);
1556                  void payment_path_successful(long[] path);
1557                  byte[] write();
1558         }
1559         public static native long LDKScore_new(LDKScore impl);
1560         // uint64_t Score_channel_penalty_msat LDKScore *NONNULL_PTR this_arg, uint64_t short_channel_id, uint64_t send_amt_msat, struct LDKCOption_u64Z channel_capacity_msat, const struct LDKNodeId *NONNULL_PTR source, const struct LDKNodeId *NONNULL_PTR target
1561         public static native long Score_channel_penalty_msat(long this_arg, long short_channel_id, long send_amt_msat, long channel_capacity_msat, long source, long target);
1562         // void Score_payment_path_failed LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path, uint64_t short_channel_id
1563         public static native void Score_payment_path_failed(long this_arg, long[] path, long short_channel_id);
1564         // void Score_payment_path_successful LDKScore *NONNULL_PTR this_arg, struct LDKCVec_RouteHopZ path
1565         public static native void Score_payment_path_successful(long this_arg, long[] path);
1566         // LDKCVec_u8Z Score_write LDKScore *NONNULL_PTR this_arg
1567         public static native byte[] Score_write(long this_arg);
1568         public interface LDKLockableScore {
1569                  long lock();
1570         }
1571         public static native long LDKLockableScore_new(LDKLockableScore impl);
1572         // LDKScore LockableScore_lock LDKLockableScore *NONNULL_PTR this_arg
1573         public static native long LockableScore_lock(long this_arg);
1574         public interface LDKChannelManagerPersister {
1575                  long persist_manager(long channel_manager);
1576         }
1577         public static native long LDKChannelManagerPersister_new(LDKChannelManagerPersister impl);
1578         // LDKCResult_NoneErrorZ ChannelManagerPersister_persist_manager LDKChannelManagerPersister *NONNULL_PTR this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager
1579         public static native long ChannelManagerPersister_persist_manager(long this_arg, long channel_manager);
1580         public static class LDKFallback {
1581                 private LDKFallback() {}
1582                 public final static class SegWitProgram extends LDKFallback {
1583                         public byte version;
1584                         public byte[] program;
1585                         SegWitProgram(byte version, byte[] program) { this.version = version; this.program = program; }
1586                 }
1587                 public final static class PubKeyHash extends LDKFallback {
1588                         public byte[] pub_key_hash;
1589                         PubKeyHash(byte[] pub_key_hash) { this.pub_key_hash = pub_key_hash; }
1590                 }
1591                 public final static class ScriptHash extends LDKFallback {
1592                         public byte[] script_hash;
1593                         ScriptHash(byte[] script_hash) { this.script_hash = script_hash; }
1594                 }
1595                 static native void init();
1596         }
1597         static { LDKFallback.init(); }
1598         public static native LDKFallback LDKFallback_ref_from_ptr(long ptr);
1599         public interface LDKPayer {
1600                  byte[] node_id();
1601                  long[] first_hops();
1602                  long send_payment(long route, byte[] payment_hash, byte[] payment_secret);
1603                  long send_spontaneous_payment(long route, byte[] payment_preimage);
1604                  long retry_payment(long route, byte[] payment_id);
1605                  void abandon_payment(byte[] payment_id);
1606         }
1607         public static native long LDKPayer_new(LDKPayer impl);
1608         // LDKPublicKey Payer_node_id LDKPayer *NONNULL_PTR this_arg
1609         public static native byte[] Payer_node_id(long this_arg);
1610         // LDKCVec_ChannelDetailsZ Payer_first_hops LDKPayer *NONNULL_PTR this_arg
1611         public static native long[] Payer_first_hops(long this_arg);
1612         // LDKCResult_PaymentIdPaymentSendFailureZ Payer_send_payment LDKPayer *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret
1613         public static native long Payer_send_payment(long this_arg, long route, byte[] payment_hash, byte[] payment_secret);
1614         // LDKCResult_PaymentIdPaymentSendFailureZ Payer_send_spontaneous_payment LDKPayer *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_preimage
1615         public static native long Payer_send_spontaneous_payment(long this_arg, long route, byte[] payment_preimage);
1616         // LDKCResult_NonePaymentSendFailureZ Payer_retry_payment LDKPayer *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_id
1617         public static native long Payer_retry_payment(long this_arg, long route, byte[] payment_id);
1618         // void Payer_abandon_payment LDKPayer *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_id
1619         public static native void Payer_abandon_payment(long this_arg, byte[] payment_id);
1620         public interface LDKRouter {
1621                  long find_route(byte[] payer, long params, byte[] payment_hash, long[] first_hops, long scorer);
1622         }
1623         public static native long LDKRouter_new(LDKRouter impl);
1624         // LDKCResult_RouteLightningErrorZ Router_find_route LDKRouter *NONNULL_PTR this_arg, struct LDKPublicKey payer, const struct LDKRouteParameters *NONNULL_PTR params, const uint8_t (*payment_hash)[32], struct LDKCVec_ChannelDetailsZ *first_hops, const struct LDKScore *NONNULL_PTR scorer
1625         public static native long Router_find_route(long this_arg, byte[] payer, long params, byte[] payment_hash, long[] first_hops, long scorer);
1626         // struct LDKStr _ldk_get_compiled_version(void);
1627         public static native String _ldk_get_compiled_version();
1628         // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
1629         public static native String _ldk_c_bindings_get_compiled_version();
1630         // void Transaction_free(struct LDKTransaction _res);
1631         public static native void Transaction_free(byte[] _res);
1632         // struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
1633         public static native long TxOut_new(byte[] script_pubkey, long value);
1634         // void TxOut_free(struct LDKTxOut _res);
1635         public static native void TxOut_free(long _res);
1636         // uintptr_t TxOut_clone_ptr(LDKTxOut *NONNULL_PTR arg);
1637         public static native long TxOut_clone_ptr(long arg);
1638         // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
1639         public static native long TxOut_clone(long orig);
1640         // void Str_free(struct LDKStr _res);
1641         public static native void Str_free(String _res);
1642         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
1643         public static native long CResult_SecretKeyErrorZ_ok(byte[] o);
1644         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
1645         public static native long CResult_SecretKeyErrorZ_err(Secp256k1Error e);
1646         // bool CResult_SecretKeyErrorZ_is_ok(const struct LDKCResult_SecretKeyErrorZ *NONNULL_PTR o);
1647         public static native boolean CResult_SecretKeyErrorZ_is_ok(long o);
1648         // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
1649         public static native void CResult_SecretKeyErrorZ_free(long _res);
1650         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
1651         public static native long CResult_PublicKeyErrorZ_ok(byte[] o);
1652         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
1653         public static native long CResult_PublicKeyErrorZ_err(Secp256k1Error e);
1654         // bool CResult_PublicKeyErrorZ_is_ok(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR o);
1655         public static native boolean CResult_PublicKeyErrorZ_is_ok(long o);
1656         // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
1657         public static native void CResult_PublicKeyErrorZ_free(long _res);
1658         // uintptr_t CResult_PublicKeyErrorZ_clone_ptr(LDKCResult_PublicKeyErrorZ *NONNULL_PTR arg);
1659         public static native long CResult_PublicKeyErrorZ_clone_ptr(long arg);
1660         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
1661         public static native long CResult_PublicKeyErrorZ_clone(long orig);
1662         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
1663         public static native long CResult_TxCreationKeysDecodeErrorZ_ok(long o);
1664         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
1665         public static native long CResult_TxCreationKeysDecodeErrorZ_err(long e);
1666         // bool CResult_TxCreationKeysDecodeErrorZ_is_ok(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR o);
1667         public static native boolean CResult_TxCreationKeysDecodeErrorZ_is_ok(long o);
1668         // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
1669         public static native void CResult_TxCreationKeysDecodeErrorZ_free(long _res);
1670         // uintptr_t CResult_TxCreationKeysDecodeErrorZ_clone_ptr(LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR arg);
1671         public static native long CResult_TxCreationKeysDecodeErrorZ_clone_ptr(long arg);
1672         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
1673         public static native long CResult_TxCreationKeysDecodeErrorZ_clone(long orig);
1674         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
1675         public static native long CResult_ChannelPublicKeysDecodeErrorZ_ok(long o);
1676         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
1677         public static native long CResult_ChannelPublicKeysDecodeErrorZ_err(long e);
1678         // bool CResult_ChannelPublicKeysDecodeErrorZ_is_ok(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR o);
1679         public static native boolean CResult_ChannelPublicKeysDecodeErrorZ_is_ok(long o);
1680         // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
1681         public static native void CResult_ChannelPublicKeysDecodeErrorZ_free(long _res);
1682         // uintptr_t CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR arg);
1683         public static native long CResult_ChannelPublicKeysDecodeErrorZ_clone_ptr(long arg);
1684         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
1685         public static native long CResult_ChannelPublicKeysDecodeErrorZ_clone(long orig);
1686         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
1687         public static native long CResult_TxCreationKeysErrorZ_ok(long o);
1688         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
1689         public static native long CResult_TxCreationKeysErrorZ_err(Secp256k1Error e);
1690         // bool CResult_TxCreationKeysErrorZ_is_ok(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR o);
1691         public static native boolean CResult_TxCreationKeysErrorZ_is_ok(long o);
1692         // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
1693         public static native void CResult_TxCreationKeysErrorZ_free(long _res);
1694         // uintptr_t CResult_TxCreationKeysErrorZ_clone_ptr(LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR arg);
1695         public static native long CResult_TxCreationKeysErrorZ_clone_ptr(long arg);
1696         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
1697         public static native long CResult_TxCreationKeysErrorZ_clone(long orig);
1698         // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
1699         public static native long COption_u32Z_some(int o);
1700         // struct LDKCOption_u32Z COption_u32Z_none(void);
1701         public static native long COption_u32Z_none();
1702         // void COption_u32Z_free(struct LDKCOption_u32Z _res);
1703         public static native void COption_u32Z_free(long _res);
1704         // uintptr_t COption_u32Z_clone_ptr(LDKCOption_u32Z *NONNULL_PTR arg);
1705         public static native long COption_u32Z_clone_ptr(long arg);
1706         // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
1707         public static native long COption_u32Z_clone(long orig);
1708         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
1709         public static native long CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(long o);
1710         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
1711         public static native long CResult_HTLCOutputInCommitmentDecodeErrorZ_err(long e);
1712         // bool CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR o);
1713         public static native boolean CResult_HTLCOutputInCommitmentDecodeErrorZ_is_ok(long o);
1714         // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
1715         public static native void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(long _res);
1716         // uintptr_t CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR arg);
1717         public static native long CResult_HTLCOutputInCommitmentDecodeErrorZ_clone_ptr(long arg);
1718         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
1719         public static native long CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(long orig);
1720         // enum LDKCOption_NoneZ COption_NoneZ_some(void);
1721         public static native COption_NoneZ COption_NoneZ_some();
1722         // enum LDKCOption_NoneZ COption_NoneZ_none(void);
1723         public static native COption_NoneZ COption_NoneZ_none();
1724         // void COption_NoneZ_free(enum LDKCOption_NoneZ _res);
1725         public static native void COption_NoneZ_free(COption_NoneZ _res);
1726         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
1727         public static native long CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(long o);
1728         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1729         public static native long CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(long e);
1730         // bool CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR o);
1731         public static native boolean CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_is_ok(long o);
1732         // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
1733         public static native void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(long _res);
1734         // uintptr_t CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR arg);
1735         public static native long CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone_ptr(long arg);
1736         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1737         public static native long CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(long orig);
1738         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
1739         public static native long CResult_ChannelTransactionParametersDecodeErrorZ_ok(long o);
1740         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1741         public static native long CResult_ChannelTransactionParametersDecodeErrorZ_err(long e);
1742         // bool CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR o);
1743         public static native boolean CResult_ChannelTransactionParametersDecodeErrorZ_is_ok(long o);
1744         // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
1745         public static native void CResult_ChannelTransactionParametersDecodeErrorZ_free(long _res);
1746         // uintptr_t CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR arg);
1747         public static native long CResult_ChannelTransactionParametersDecodeErrorZ_clone_ptr(long arg);
1748         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1749         public static native long CResult_ChannelTransactionParametersDecodeErrorZ_clone(long orig);
1750         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
1751         public static native void CVec_SignatureZ_free(byte[][] _res);
1752         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
1753         public static native long CResult_HolderCommitmentTransactionDecodeErrorZ_ok(long o);
1754         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1755         public static native long CResult_HolderCommitmentTransactionDecodeErrorZ_err(long e);
1756         // bool CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
1757         public static native boolean CResult_HolderCommitmentTransactionDecodeErrorZ_is_ok(long o);
1758         // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
1759         public static native void CResult_HolderCommitmentTransactionDecodeErrorZ_free(long _res);
1760         // uintptr_t CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
1761         public static native long CResult_HolderCommitmentTransactionDecodeErrorZ_clone_ptr(long arg);
1762         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1763         public static native long CResult_HolderCommitmentTransactionDecodeErrorZ_clone(long orig);
1764         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
1765         public static native long CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(long o);
1766         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1767         public static native long CResult_BuiltCommitmentTransactionDecodeErrorZ_err(long e);
1768         // bool CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
1769         public static native boolean CResult_BuiltCommitmentTransactionDecodeErrorZ_is_ok(long o);
1770         // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
1771         public static native void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(long _res);
1772         // uintptr_t CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
1773         public static native long CResult_BuiltCommitmentTransactionDecodeErrorZ_clone_ptr(long arg);
1774         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1775         public static native long CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(long orig);
1776         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_ok(struct LDKTrustedClosingTransaction o);
1777         public static native long CResult_TrustedClosingTransactionNoneZ_ok(long o);
1778         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_err(void);
1779         public static native long CResult_TrustedClosingTransactionNoneZ_err();
1780         // bool CResult_TrustedClosingTransactionNoneZ_is_ok(const struct LDKCResult_TrustedClosingTransactionNoneZ *NONNULL_PTR o);
1781         public static native boolean CResult_TrustedClosingTransactionNoneZ_is_ok(long o);
1782         // void CResult_TrustedClosingTransactionNoneZ_free(struct LDKCResult_TrustedClosingTransactionNoneZ _res);
1783         public static native void CResult_TrustedClosingTransactionNoneZ_free(long _res);
1784         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
1785         public static native long CResult_CommitmentTransactionDecodeErrorZ_ok(long o);
1786         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1787         public static native long CResult_CommitmentTransactionDecodeErrorZ_err(long e);
1788         // bool CResult_CommitmentTransactionDecodeErrorZ_is_ok(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR o);
1789         public static native boolean CResult_CommitmentTransactionDecodeErrorZ_is_ok(long o);
1790         // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
1791         public static native void CResult_CommitmentTransactionDecodeErrorZ_free(long _res);
1792         // uintptr_t CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR arg);
1793         public static native long CResult_CommitmentTransactionDecodeErrorZ_clone_ptr(long arg);
1794         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1795         public static native long CResult_CommitmentTransactionDecodeErrorZ_clone(long orig);
1796         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
1797         public static native long CResult_TrustedCommitmentTransactionNoneZ_ok(long o);
1798         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
1799         public static native long CResult_TrustedCommitmentTransactionNoneZ_err();
1800         // bool CResult_TrustedCommitmentTransactionNoneZ_is_ok(const struct LDKCResult_TrustedCommitmentTransactionNoneZ *NONNULL_PTR o);
1801         public static native boolean CResult_TrustedCommitmentTransactionNoneZ_is_ok(long o);
1802         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
1803         public static native void CResult_TrustedCommitmentTransactionNoneZ_free(long _res);
1804         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
1805         public static native long CResult_CVec_SignatureZNoneZ_ok(byte[][] o);
1806         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
1807         public static native long CResult_CVec_SignatureZNoneZ_err();
1808         // bool CResult_CVec_SignatureZNoneZ_is_ok(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR o);
1809         public static native boolean CResult_CVec_SignatureZNoneZ_is_ok(long o);
1810         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
1811         public static native void CResult_CVec_SignatureZNoneZ_free(long _res);
1812         // uintptr_t CResult_CVec_SignatureZNoneZ_clone_ptr(LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR arg);
1813         public static native long CResult_CVec_SignatureZNoneZ_clone_ptr(long arg);
1814         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
1815         public static native long CResult_CVec_SignatureZNoneZ_clone(long orig);
1816         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_ok(struct LDKShutdownScript o);
1817         public static native long CResult_ShutdownScriptDecodeErrorZ_ok(long o);
1818         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_err(struct LDKDecodeError e);
1819         public static native long CResult_ShutdownScriptDecodeErrorZ_err(long e);
1820         // bool CResult_ShutdownScriptDecodeErrorZ_is_ok(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR o);
1821         public static native boolean CResult_ShutdownScriptDecodeErrorZ_is_ok(long o);
1822         // void CResult_ShutdownScriptDecodeErrorZ_free(struct LDKCResult_ShutdownScriptDecodeErrorZ _res);
1823         public static native void CResult_ShutdownScriptDecodeErrorZ_free(long _res);
1824         // uintptr_t CResult_ShutdownScriptDecodeErrorZ_clone_ptr(LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR arg);
1825         public static native long CResult_ShutdownScriptDecodeErrorZ_clone_ptr(long arg);
1826         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_clone(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR orig);
1827         public static native long CResult_ShutdownScriptDecodeErrorZ_clone(long orig);
1828         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_ok(struct LDKShutdownScript o);
1829         public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_ok(long o);
1830         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_err(struct LDKInvalidShutdownScript e);
1831         public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_err(long e);
1832         // bool CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR o);
1833         public static native boolean CResult_ShutdownScriptInvalidShutdownScriptZ_is_ok(long o);
1834         // void CResult_ShutdownScriptInvalidShutdownScriptZ_free(struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ _res);
1835         public static native void CResult_ShutdownScriptInvalidShutdownScriptZ_free(long _res);
1836         // uintptr_t CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR arg);
1837         public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_clone_ptr(long arg);
1838         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_clone(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR orig);
1839         public static native long CResult_ShutdownScriptInvalidShutdownScriptZ_clone(long orig);
1840         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
1841         public static native long CResult_NoneErrorZ_ok();
1842         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
1843         public static native long CResult_NoneErrorZ_err(IOError e);
1844         // bool CResult_NoneErrorZ_is_ok(const struct LDKCResult_NoneErrorZ *NONNULL_PTR o);
1845         public static native boolean CResult_NoneErrorZ_is_ok(long o);
1846         // void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
1847         public static native void CResult_NoneErrorZ_free(long _res);
1848         // uintptr_t CResult_NoneErrorZ_clone_ptr(LDKCResult_NoneErrorZ *NONNULL_PTR arg);
1849         public static native long CResult_NoneErrorZ_clone_ptr(long arg);
1850         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig);
1851         public static native long CResult_NoneErrorZ_clone(long orig);
1852         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
1853         public static native long CResult_RouteHopDecodeErrorZ_ok(long o);
1854         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
1855         public static native long CResult_RouteHopDecodeErrorZ_err(long e);
1856         // bool CResult_RouteHopDecodeErrorZ_is_ok(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR o);
1857         public static native boolean CResult_RouteHopDecodeErrorZ_is_ok(long o);
1858         // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
1859         public static native void CResult_RouteHopDecodeErrorZ_free(long _res);
1860         // uintptr_t CResult_RouteHopDecodeErrorZ_clone_ptr(LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR arg);
1861         public static native long CResult_RouteHopDecodeErrorZ_clone_ptr(long arg);
1862         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
1863         public static native long CResult_RouteHopDecodeErrorZ_clone(long orig);
1864         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
1865         public static native void CVec_RouteHopZ_free(long[] _res);
1866         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
1867         public static native void CVec_CVec_RouteHopZZ_free(long[][] _res);
1868         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
1869         public static native long CResult_RouteDecodeErrorZ_ok(long o);
1870         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
1871         public static native long CResult_RouteDecodeErrorZ_err(long e);
1872         // bool CResult_RouteDecodeErrorZ_is_ok(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR o);
1873         public static native boolean CResult_RouteDecodeErrorZ_is_ok(long o);
1874         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
1875         public static native void CResult_RouteDecodeErrorZ_free(long _res);
1876         // uintptr_t CResult_RouteDecodeErrorZ_clone_ptr(LDKCResult_RouteDecodeErrorZ *NONNULL_PTR arg);
1877         public static native long CResult_RouteDecodeErrorZ_clone_ptr(long arg);
1878         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
1879         public static native long CResult_RouteDecodeErrorZ_clone(long orig);
1880         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_ok(struct LDKRouteParameters o);
1881         public static native long CResult_RouteParametersDecodeErrorZ_ok(long o);
1882         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_err(struct LDKDecodeError e);
1883         public static native long CResult_RouteParametersDecodeErrorZ_err(long e);
1884         // bool CResult_RouteParametersDecodeErrorZ_is_ok(const struct LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR o);
1885         public static native boolean CResult_RouteParametersDecodeErrorZ_is_ok(long o);
1886         // void CResult_RouteParametersDecodeErrorZ_free(struct LDKCResult_RouteParametersDecodeErrorZ _res);
1887         public static native void CResult_RouteParametersDecodeErrorZ_free(long _res);
1888         // uintptr_t CResult_RouteParametersDecodeErrorZ_clone_ptr(LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR arg);
1889         public static native long CResult_RouteParametersDecodeErrorZ_clone_ptr(long arg);
1890         // struct LDKCResult_RouteParametersDecodeErrorZ CResult_RouteParametersDecodeErrorZ_clone(const struct LDKCResult_RouteParametersDecodeErrorZ *NONNULL_PTR orig);
1891         public static native long CResult_RouteParametersDecodeErrorZ_clone(long orig);
1892         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
1893         public static native void CVec_RouteHintZ_free(long[] _res);
1894         // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
1895         public static native long COption_u64Z_some(long o);
1896         // struct LDKCOption_u64Z COption_u64Z_none(void);
1897         public static native long COption_u64Z_none();
1898         // void COption_u64Z_free(struct LDKCOption_u64Z _res);
1899         public static native void COption_u64Z_free(long _res);
1900         // uintptr_t COption_u64Z_clone_ptr(LDKCOption_u64Z *NONNULL_PTR arg);
1901         public static native long COption_u64Z_clone_ptr(long arg);
1902         // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
1903         public static native long COption_u64Z_clone(long orig);
1904         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_ok(struct LDKPayee o);
1905         public static native long CResult_PayeeDecodeErrorZ_ok(long o);
1906         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_err(struct LDKDecodeError e);
1907         public static native long CResult_PayeeDecodeErrorZ_err(long e);
1908         // bool CResult_PayeeDecodeErrorZ_is_ok(const struct LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR o);
1909         public static native boolean CResult_PayeeDecodeErrorZ_is_ok(long o);
1910         // void CResult_PayeeDecodeErrorZ_free(struct LDKCResult_PayeeDecodeErrorZ _res);
1911         public static native void CResult_PayeeDecodeErrorZ_free(long _res);
1912         // uintptr_t CResult_PayeeDecodeErrorZ_clone_ptr(LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR arg);
1913         public static native long CResult_PayeeDecodeErrorZ_clone_ptr(long arg);
1914         // struct LDKCResult_PayeeDecodeErrorZ CResult_PayeeDecodeErrorZ_clone(const struct LDKCResult_PayeeDecodeErrorZ *NONNULL_PTR orig);
1915         public static native long CResult_PayeeDecodeErrorZ_clone(long orig);
1916         // void CVec_RouteHintHopZ_free(struct LDKCVec_RouteHintHopZ _res);
1917         public static native void CVec_RouteHintHopZ_free(long[] _res);
1918         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_ok(struct LDKRouteHint o);
1919         public static native long CResult_RouteHintDecodeErrorZ_ok(long o);
1920         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_err(struct LDKDecodeError e);
1921         public static native long CResult_RouteHintDecodeErrorZ_err(long e);
1922         // bool CResult_RouteHintDecodeErrorZ_is_ok(const struct LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR o);
1923         public static native boolean CResult_RouteHintDecodeErrorZ_is_ok(long o);
1924         // void CResult_RouteHintDecodeErrorZ_free(struct LDKCResult_RouteHintDecodeErrorZ _res);
1925         public static native void CResult_RouteHintDecodeErrorZ_free(long _res);
1926         // uintptr_t CResult_RouteHintDecodeErrorZ_clone_ptr(LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR arg);
1927         public static native long CResult_RouteHintDecodeErrorZ_clone_ptr(long arg);
1928         // struct LDKCResult_RouteHintDecodeErrorZ CResult_RouteHintDecodeErrorZ_clone(const struct LDKCResult_RouteHintDecodeErrorZ *NONNULL_PTR orig);
1929         public static native long CResult_RouteHintDecodeErrorZ_clone(long orig);
1930         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_ok(struct LDKRouteHintHop o);
1931         public static native long CResult_RouteHintHopDecodeErrorZ_ok(long o);
1932         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_err(struct LDKDecodeError e);
1933         public static native long CResult_RouteHintHopDecodeErrorZ_err(long e);
1934         // bool CResult_RouteHintHopDecodeErrorZ_is_ok(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR o);
1935         public static native boolean CResult_RouteHintHopDecodeErrorZ_is_ok(long o);
1936         // void CResult_RouteHintHopDecodeErrorZ_free(struct LDKCResult_RouteHintHopDecodeErrorZ _res);
1937         public static native void CResult_RouteHintHopDecodeErrorZ_free(long _res);
1938         // uintptr_t CResult_RouteHintHopDecodeErrorZ_clone_ptr(LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR arg);
1939         public static native long CResult_RouteHintHopDecodeErrorZ_clone_ptr(long arg);
1940         // struct LDKCResult_RouteHintHopDecodeErrorZ CResult_RouteHintHopDecodeErrorZ_clone(const struct LDKCResult_RouteHintHopDecodeErrorZ *NONNULL_PTR orig);
1941         public static native long CResult_RouteHintHopDecodeErrorZ_clone(long orig);
1942         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
1943         public static native void CVec_ChannelDetailsZ_free(long[] _res);
1944         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
1945         public static native long CResult_RouteLightningErrorZ_ok(long o);
1946         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
1947         public static native long CResult_RouteLightningErrorZ_err(long e);
1948         // bool CResult_RouteLightningErrorZ_is_ok(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR o);
1949         public static native boolean CResult_RouteLightningErrorZ_is_ok(long o);
1950         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
1951         public static native void CResult_RouteLightningErrorZ_free(long _res);
1952         // uintptr_t CResult_RouteLightningErrorZ_clone_ptr(LDKCResult_RouteLightningErrorZ *NONNULL_PTR arg);
1953         public static native long CResult_RouteLightningErrorZ_clone_ptr(long arg);
1954         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
1955         public static native long CResult_RouteLightningErrorZ_clone(long orig);
1956         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
1957         public static native long CResult_TxOutAccessErrorZ_ok(long o);
1958         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
1959         public static native long CResult_TxOutAccessErrorZ_err(AccessError e);
1960         // bool CResult_TxOutAccessErrorZ_is_ok(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR o);
1961         public static native boolean CResult_TxOutAccessErrorZ_is_ok(long o);
1962         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
1963         public static native void CResult_TxOutAccessErrorZ_free(long _res);
1964         // uintptr_t CResult_TxOutAccessErrorZ_clone_ptr(LDKCResult_TxOutAccessErrorZ *NONNULL_PTR arg);
1965         public static native long CResult_TxOutAccessErrorZ_clone_ptr(long arg);
1966         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
1967         public static native long CResult_TxOutAccessErrorZ_clone(long orig);
1968         // uintptr_t C2Tuple_usizeTransactionZ_clone_ptr(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR arg);
1969         public static native long C2Tuple_usizeTransactionZ_clone_ptr(long arg);
1970         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
1971         public static native long C2Tuple_usizeTransactionZ_clone(long orig);
1972         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
1973         public static native long C2Tuple_usizeTransactionZ_new(long a, byte[] b);
1974         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
1975         public static native void C2Tuple_usizeTransactionZ_free(long _res);
1976         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
1977         public static native void CVec_C2Tuple_usizeTransactionZZ_free(long[] _res);
1978         // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
1979         public static native void CVec_TxidZ_free(byte[][] _res);
1980         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
1981         public static native long CResult_NoneChannelMonitorUpdateErrZ_ok();
1982         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
1983         public static native long CResult_NoneChannelMonitorUpdateErrZ_err(ChannelMonitorUpdateErr e);
1984         // bool CResult_NoneChannelMonitorUpdateErrZ_is_ok(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR o);
1985         public static native boolean CResult_NoneChannelMonitorUpdateErrZ_is_ok(long o);
1986         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
1987         public static native void CResult_NoneChannelMonitorUpdateErrZ_free(long _res);
1988         // uintptr_t CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR arg);
1989         public static native long CResult_NoneChannelMonitorUpdateErrZ_clone_ptr(long arg);
1990         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
1991         public static native long CResult_NoneChannelMonitorUpdateErrZ_clone(long orig);
1992         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
1993         public static native void CVec_MonitorEventZ_free(long[] _res);
1994         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
1995         public static native long COption_C2Tuple_usizeTransactionZZ_some(long o);
1996         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
1997         public static native long COption_C2Tuple_usizeTransactionZZ_none();
1998         // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
1999         public static native void COption_C2Tuple_usizeTransactionZZ_free(long _res);
2000         // uintptr_t COption_C2Tuple_usizeTransactionZZ_clone_ptr(LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR arg);
2001         public static native long COption_C2Tuple_usizeTransactionZZ_clone_ptr(long arg);
2002         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
2003         public static native long COption_C2Tuple_usizeTransactionZZ_clone(long orig);
2004         // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_some(struct LDKClosureReason o);
2005         public static native long COption_ClosureReasonZ_some(long o);
2006         // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_none(void);
2007         public static native long COption_ClosureReasonZ_none();
2008         // void COption_ClosureReasonZ_free(struct LDKCOption_ClosureReasonZ _res);
2009         public static native void COption_ClosureReasonZ_free(long _res);
2010         // uintptr_t COption_ClosureReasonZ_clone_ptr(LDKCOption_ClosureReasonZ *NONNULL_PTR arg);
2011         public static native long COption_ClosureReasonZ_clone_ptr(long arg);
2012         // struct LDKCOption_ClosureReasonZ COption_ClosureReasonZ_clone(const struct LDKCOption_ClosureReasonZ *NONNULL_PTR orig);
2013         public static native long COption_ClosureReasonZ_clone(long orig);
2014         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_ok(struct LDKCOption_ClosureReasonZ o);
2015         public static native long CResult_COption_ClosureReasonZDecodeErrorZ_ok(long o);
2016         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_err(struct LDKDecodeError e);
2017         public static native long CResult_COption_ClosureReasonZDecodeErrorZ_err(long e);
2018         // bool CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(const struct LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR o);
2019         public static native boolean CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(long o);
2020         // void CResult_COption_ClosureReasonZDecodeErrorZ_free(struct LDKCResult_COption_ClosureReasonZDecodeErrorZ _res);
2021         public static native void CResult_COption_ClosureReasonZDecodeErrorZ_free(long _res);
2022         // uintptr_t CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR arg);
2023         public static native long CResult_COption_ClosureReasonZDecodeErrorZ_clone_ptr(long arg);
2024         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ CResult_COption_ClosureReasonZDecodeErrorZ_clone(const struct LDKCResult_COption_ClosureReasonZDecodeErrorZ *NONNULL_PTR orig);
2025         public static native long CResult_COption_ClosureReasonZDecodeErrorZ_clone(long orig);
2026         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o);
2027         public static native long COption_NetworkUpdateZ_some(long o);
2028         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void);
2029         public static native long COption_NetworkUpdateZ_none();
2030         // void COption_NetworkUpdateZ_free(struct LDKCOption_NetworkUpdateZ _res);
2031         public static native void COption_NetworkUpdateZ_free(long _res);
2032         // uintptr_t COption_NetworkUpdateZ_clone_ptr(LDKCOption_NetworkUpdateZ *NONNULL_PTR arg);
2033         public static native long COption_NetworkUpdateZ_clone_ptr(long arg);
2034         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_clone(const struct LDKCOption_NetworkUpdateZ *NONNULL_PTR orig);
2035         public static native long COption_NetworkUpdateZ_clone(long orig);
2036         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
2037         public static native void CVec_SpendableOutputDescriptorZ_free(long[] _res);
2038         // struct LDKCOption_EventZ COption_EventZ_some(struct LDKEvent o);
2039         public static native long COption_EventZ_some(long o);
2040         // struct LDKCOption_EventZ COption_EventZ_none(void);
2041         public static native long COption_EventZ_none();
2042         // void COption_EventZ_free(struct LDKCOption_EventZ _res);
2043         public static native void COption_EventZ_free(long _res);
2044         // uintptr_t COption_EventZ_clone_ptr(LDKCOption_EventZ *NONNULL_PTR arg);
2045         public static native long COption_EventZ_clone_ptr(long arg);
2046         // struct LDKCOption_EventZ COption_EventZ_clone(const struct LDKCOption_EventZ *NONNULL_PTR orig);
2047         public static native long COption_EventZ_clone(long orig);
2048         // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_ok(struct LDKCOption_EventZ o);
2049         public static native long CResult_COption_EventZDecodeErrorZ_ok(long o);
2050         // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_err(struct LDKDecodeError e);
2051         public static native long CResult_COption_EventZDecodeErrorZ_err(long e);
2052         // bool CResult_COption_EventZDecodeErrorZ_is_ok(const struct LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR o);
2053         public static native boolean CResult_COption_EventZDecodeErrorZ_is_ok(long o);
2054         // void CResult_COption_EventZDecodeErrorZ_free(struct LDKCResult_COption_EventZDecodeErrorZ _res);
2055         public static native void CResult_COption_EventZDecodeErrorZ_free(long _res);
2056         // uintptr_t CResult_COption_EventZDecodeErrorZ_clone_ptr(LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR arg);
2057         public static native long CResult_COption_EventZDecodeErrorZ_clone_ptr(long arg);
2058         // struct LDKCResult_COption_EventZDecodeErrorZ CResult_COption_EventZDecodeErrorZ_clone(const struct LDKCResult_COption_EventZDecodeErrorZ *NONNULL_PTR orig);
2059         public static native long CResult_COption_EventZDecodeErrorZ_clone(long orig);
2060         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
2061         public static native void CVec_MessageSendEventZ_free(long[] _res);
2062         // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_ok(struct LDKScoringParameters o);
2063         public static native long CResult_ScoringParametersDecodeErrorZ_ok(long o);
2064         // struct LDKCResult_ScoringParametersDecodeErrorZ CResult_ScoringParametersDecodeErrorZ_err(struct LDKDecodeError e);
2065         public static native long CResult_ScoringParametersDecodeErrorZ_err(long e);
2066         // bool CResult_ScoringParametersDecodeErrorZ_is_ok(const struct LDKCResult_ScoringParametersDecodeErrorZ *NONNULL_PTR o);
2067         public static native boolean CResult_ScoringParametersDecodeErrorZ_is_ok(long o);
2068         // void CResult_ScoringParametersDecodeErrorZ_free(struct LDKCResult_ScoringParametersDecodeErrorZ _res);
2069         public static native void CResult_ScoringParametersDecodeErrorZ_free(long _res);
2070         // struct LDKCResult_ScorerDecodeErrorZ CResult_ScorerDecodeErrorZ_ok(struct LDKScorer o);
2071         public static native long CResult_ScorerDecodeErrorZ_ok(long o);
2072         // struct LDKCResult_ScorerDecodeErrorZ CResult_ScorerDecodeErrorZ_err(struct LDKDecodeError e);
2073         public static native long CResult_ScorerDecodeErrorZ_err(long e);
2074         // bool CResult_ScorerDecodeErrorZ_is_ok(const struct LDKCResult_ScorerDecodeErrorZ *NONNULL_PTR o);
2075         public static native boolean CResult_ScorerDecodeErrorZ_is_ok(long o);
2076         // void CResult_ScorerDecodeErrorZ_free(struct LDKCResult_ScorerDecodeErrorZ _res);
2077         public static native void CResult_ScorerDecodeErrorZ_free(long _res);
2078         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
2079         public static native long CResult_InitFeaturesDecodeErrorZ_ok(long o);
2080         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2081         public static native long CResult_InitFeaturesDecodeErrorZ_err(long e);
2082         // bool CResult_InitFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_InitFeaturesDecodeErrorZ *NONNULL_PTR o);
2083         public static native boolean CResult_InitFeaturesDecodeErrorZ_is_ok(long o);
2084         // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
2085         public static native void CResult_InitFeaturesDecodeErrorZ_free(long _res);
2086         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
2087         public static native long CResult_ChannelFeaturesDecodeErrorZ_ok(long o);
2088         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2089         public static native long CResult_ChannelFeaturesDecodeErrorZ_err(long e);
2090         // bool CResult_ChannelFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelFeaturesDecodeErrorZ *NONNULL_PTR o);
2091         public static native boolean CResult_ChannelFeaturesDecodeErrorZ_is_ok(long o);
2092         // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
2093         public static native void CResult_ChannelFeaturesDecodeErrorZ_free(long _res);
2094         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
2095         public static native long CResult_NodeFeaturesDecodeErrorZ_ok(long o);
2096         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2097         public static native long CResult_NodeFeaturesDecodeErrorZ_err(long e);
2098         // bool CResult_NodeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_NodeFeaturesDecodeErrorZ *NONNULL_PTR o);
2099         public static native boolean CResult_NodeFeaturesDecodeErrorZ_is_ok(long o);
2100         // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
2101         public static native void CResult_NodeFeaturesDecodeErrorZ_free(long _res);
2102         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
2103         public static native long CResult_InvoiceFeaturesDecodeErrorZ_ok(long o);
2104         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2105         public static native long CResult_InvoiceFeaturesDecodeErrorZ_err(long e);
2106         // bool CResult_InvoiceFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_InvoiceFeaturesDecodeErrorZ *NONNULL_PTR o);
2107         public static native boolean CResult_InvoiceFeaturesDecodeErrorZ_is_ok(long o);
2108         // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
2109         public static native void CResult_InvoiceFeaturesDecodeErrorZ_free(long _res);
2110         // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_ok(struct LDKChannelTypeFeatures o);
2111         public static native long CResult_ChannelTypeFeaturesDecodeErrorZ_ok(long o);
2112         // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ CResult_ChannelTypeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2113         public static native long CResult_ChannelTypeFeaturesDecodeErrorZ_err(long e);
2114         // bool CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(const struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ *NONNULL_PTR o);
2115         public static native boolean CResult_ChannelTypeFeaturesDecodeErrorZ_is_ok(long o);
2116         // void CResult_ChannelTypeFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ _res);
2117         public static native void CResult_ChannelTypeFeaturesDecodeErrorZ_free(long _res);
2118         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
2119         public static native long CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(long o);
2120         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2121         public static native long CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(long e);
2122         // bool CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
2123         public static native boolean CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_is_ok(long o);
2124         // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
2125         public static native void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(long _res);
2126         // uintptr_t CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
2127         public static native long CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone_ptr(long arg);
2128         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2129         public static native long CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(long orig);
2130         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
2131         public static native long CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(long o);
2132         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2133         public static native long CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(long e);
2134         // bool CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
2135         public static native boolean CResult_StaticPaymentOutputDescriptorDecodeErrorZ_is_ok(long o);
2136         // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
2137         public static native void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(long _res);
2138         // uintptr_t CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
2139         public static native long CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone_ptr(long arg);
2140         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2141         public static native long CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(long orig);
2142         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
2143         public static native long CResult_SpendableOutputDescriptorDecodeErrorZ_ok(long o);
2144         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
2145         public static native long CResult_SpendableOutputDescriptorDecodeErrorZ_err(long e);
2146         // bool CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR o);
2147         public static native boolean CResult_SpendableOutputDescriptorDecodeErrorZ_is_ok(long o);
2148         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
2149         public static native void CResult_SpendableOutputDescriptorDecodeErrorZ_free(long _res);
2150         // uintptr_t CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR arg);
2151         public static native long CResult_SpendableOutputDescriptorDecodeErrorZ_clone_ptr(long arg);
2152         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
2153         public static native long CResult_SpendableOutputDescriptorDecodeErrorZ_clone(long orig);
2154         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_ok(void);
2155         public static native long CResult_NoneNoneZ_ok();
2156         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_err(void);
2157         public static native long CResult_NoneNoneZ_err();
2158         // bool CResult_NoneNoneZ_is_ok(const struct LDKCResult_NoneNoneZ *NONNULL_PTR o);
2159         public static native boolean CResult_NoneNoneZ_is_ok(long o);
2160         // void CResult_NoneNoneZ_free(struct LDKCResult_NoneNoneZ _res);
2161         public static native void CResult_NoneNoneZ_free(long _res);
2162         // uintptr_t CResult_NoneNoneZ_clone_ptr(LDKCResult_NoneNoneZ *NONNULL_PTR arg);
2163         public static native long CResult_NoneNoneZ_clone_ptr(long arg);
2164         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_clone(const struct LDKCResult_NoneNoneZ *NONNULL_PTR orig);
2165         public static native long CResult_NoneNoneZ_clone(long orig);
2166         // uintptr_t C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR arg);
2167         public static native long C2Tuple_SignatureCVec_SignatureZZ_clone_ptr(long arg);
2168         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
2169         public static native long C2Tuple_SignatureCVec_SignatureZZ_clone(long orig);
2170         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
2171         public static native long C2Tuple_SignatureCVec_SignatureZZ_new(byte[] a, byte[][] b);
2172         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
2173         public static native void C2Tuple_SignatureCVec_SignatureZZ_free(long _res);
2174         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
2175         public static native long CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(long o);
2176         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
2177         public static native long CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
2178         // bool CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR o);
2179         public static native boolean CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_is_ok(long o);
2180         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
2181         public static native void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(long _res);
2182         // uintptr_t CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR arg);
2183         public static native long CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone_ptr(long arg);
2184         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
2185         public static native long CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(long orig);
2186         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
2187         public static native long CResult_SignatureNoneZ_ok(byte[] o);
2188         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
2189         public static native long CResult_SignatureNoneZ_err();
2190         // bool CResult_SignatureNoneZ_is_ok(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR o);
2191         public static native boolean CResult_SignatureNoneZ_is_ok(long o);
2192         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
2193         public static native void CResult_SignatureNoneZ_free(long _res);
2194         // uintptr_t CResult_SignatureNoneZ_clone_ptr(LDKCResult_SignatureNoneZ *NONNULL_PTR arg);
2195         public static native long CResult_SignatureNoneZ_clone_ptr(long arg);
2196         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
2197         public static native long CResult_SignatureNoneZ_clone(long orig);
2198         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
2199         public static native long CResult_SignDecodeErrorZ_ok(long o);
2200         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
2201         public static native long CResult_SignDecodeErrorZ_err(long e);
2202         // bool CResult_SignDecodeErrorZ_is_ok(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR o);
2203         public static native boolean CResult_SignDecodeErrorZ_is_ok(long o);
2204         // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
2205         public static native void CResult_SignDecodeErrorZ_free(long _res);
2206         // uintptr_t CResult_SignDecodeErrorZ_clone_ptr(LDKCResult_SignDecodeErrorZ *NONNULL_PTR arg);
2207         public static native long CResult_SignDecodeErrorZ_clone_ptr(long arg);
2208         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
2209         public static native long CResult_SignDecodeErrorZ_clone(long orig);
2210         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
2211         public static native void CVec_u8Z_free(byte[] _res);
2212         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
2213         public static native long CResult_RecoverableSignatureNoneZ_ok(byte[] o);
2214         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
2215         public static native long CResult_RecoverableSignatureNoneZ_err();
2216         // bool CResult_RecoverableSignatureNoneZ_is_ok(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR o);
2217         public static native boolean CResult_RecoverableSignatureNoneZ_is_ok(long o);
2218         // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
2219         public static native void CResult_RecoverableSignatureNoneZ_free(long _res);
2220         // uintptr_t CResult_RecoverableSignatureNoneZ_clone_ptr(LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR arg);
2221         public static native long CResult_RecoverableSignatureNoneZ_clone_ptr(long arg);
2222         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
2223         public static native long CResult_RecoverableSignatureNoneZ_clone(long orig);
2224         // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
2225         public static native void CVec_CVec_u8ZZ_free(byte[][] _res);
2226         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
2227         public static native long CResult_CVec_CVec_u8ZZNoneZ_ok(byte[][] o);
2228         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
2229         public static native long CResult_CVec_CVec_u8ZZNoneZ_err();
2230         // bool CResult_CVec_CVec_u8ZZNoneZ_is_ok(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR o);
2231         public static native boolean CResult_CVec_CVec_u8ZZNoneZ_is_ok(long o);
2232         // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
2233         public static native void CResult_CVec_CVec_u8ZZNoneZ_free(long _res);
2234         // uintptr_t CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR arg);
2235         public static native long CResult_CVec_CVec_u8ZZNoneZ_clone_ptr(long arg);
2236         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
2237         public static native long CResult_CVec_CVec_u8ZZNoneZ_clone(long orig);
2238         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
2239         public static native long CResult_InMemorySignerDecodeErrorZ_ok(long o);
2240         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
2241         public static native long CResult_InMemorySignerDecodeErrorZ_err(long e);
2242         // bool CResult_InMemorySignerDecodeErrorZ_is_ok(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR o);
2243         public static native boolean CResult_InMemorySignerDecodeErrorZ_is_ok(long o);
2244         // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
2245         public static native void CResult_InMemorySignerDecodeErrorZ_free(long _res);
2246         // uintptr_t CResult_InMemorySignerDecodeErrorZ_clone_ptr(LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR arg);
2247         public static native long CResult_InMemorySignerDecodeErrorZ_clone_ptr(long arg);
2248         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
2249         public static native long CResult_InMemorySignerDecodeErrorZ_clone(long orig);
2250         // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
2251         public static native void CVec_TxOutZ_free(long[] _res);
2252         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
2253         public static native long CResult_TransactionNoneZ_ok(byte[] o);
2254         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
2255         public static native long CResult_TransactionNoneZ_err();
2256         // bool CResult_TransactionNoneZ_is_ok(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR o);
2257         public static native boolean CResult_TransactionNoneZ_is_ok(long o);
2258         // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
2259         public static native void CResult_TransactionNoneZ_free(long _res);
2260         // uintptr_t CResult_TransactionNoneZ_clone_ptr(LDKCResult_TransactionNoneZ *NONNULL_PTR arg);
2261         public static native long CResult_TransactionNoneZ_clone_ptr(long arg);
2262         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
2263         public static native long CResult_TransactionNoneZ_clone(long orig);
2264         // uintptr_t C2Tuple_BlockHashChannelMonitorZ_clone_ptr(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR arg);
2265         public static native long C2Tuple_BlockHashChannelMonitorZ_clone_ptr(long arg);
2266         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_clone(const struct LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR orig);
2267         public static native long C2Tuple_BlockHashChannelMonitorZ_clone(long orig);
2268         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
2269         public static native long C2Tuple_BlockHashChannelMonitorZ_new(byte[] a, long b);
2270         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
2271         public static native void C2Tuple_BlockHashChannelMonitorZ_free(long _res);
2272         // void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res);
2273         public static native void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(long[] _res);
2274         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o);
2275         public static native long CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(long[] o);
2276         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e);
2277         public static native long CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(IOError e);
2278         // bool CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_is_ok(const struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR o);
2279         public static native boolean CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_is_ok(long o);
2280         // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
2281         public static native void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(long _res);
2282         // uintptr_t CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone_ptr(LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR arg);
2283         public static native long CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone_ptr(long arg);
2284         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(const struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR orig);
2285         public static native long CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(long orig);
2286         // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
2287         public static native long COption_u16Z_some(short o);
2288         // struct LDKCOption_u16Z COption_u16Z_none(void);
2289         public static native long COption_u16Z_none();
2290         // void COption_u16Z_free(struct LDKCOption_u16Z _res);
2291         public static native void COption_u16Z_free(long _res);
2292         // uintptr_t COption_u16Z_clone_ptr(LDKCOption_u16Z *NONNULL_PTR arg);
2293         public static native long COption_u16Z_clone_ptr(long arg);
2294         // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
2295         public static native long COption_u16Z_clone(long orig);
2296         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
2297         public static native long CResult_NoneAPIErrorZ_ok();
2298         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
2299         public static native long CResult_NoneAPIErrorZ_err(long e);
2300         // bool CResult_NoneAPIErrorZ_is_ok(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR o);
2301         public static native boolean CResult_NoneAPIErrorZ_is_ok(long o);
2302         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
2303         public static native void CResult_NoneAPIErrorZ_free(long _res);
2304         // uintptr_t CResult_NoneAPIErrorZ_clone_ptr(LDKCResult_NoneAPIErrorZ *NONNULL_PTR arg);
2305         public static native long CResult_NoneAPIErrorZ_clone_ptr(long arg);
2306         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
2307         public static native long CResult_NoneAPIErrorZ_clone(long orig);
2308         // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
2309         public static native void CVec_CResult_NoneAPIErrorZZ_free(long[] _res);
2310         // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
2311         public static native void CVec_APIErrorZ_free(long[] _res);
2312         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_ok(struct LDKThirtyTwoBytes o);
2313         public static native long CResult__u832APIErrorZ_ok(byte[] o);
2314         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_err(struct LDKAPIError e);
2315         public static native long CResult__u832APIErrorZ_err(long e);
2316         // bool CResult__u832APIErrorZ_is_ok(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR o);
2317         public static native boolean CResult__u832APIErrorZ_is_ok(long o);
2318         // void CResult__u832APIErrorZ_free(struct LDKCResult__u832APIErrorZ _res);
2319         public static native void CResult__u832APIErrorZ_free(long _res);
2320         // uintptr_t CResult__u832APIErrorZ_clone_ptr(LDKCResult__u832APIErrorZ *NONNULL_PTR arg);
2321         public static native long CResult__u832APIErrorZ_clone_ptr(long arg);
2322         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_clone(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR orig);
2323         public static native long CResult__u832APIErrorZ_clone(long orig);
2324         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_ok(struct LDKThirtyTwoBytes o);
2325         public static native long CResult_PaymentIdPaymentSendFailureZ_ok(byte[] o);
2326         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
2327         public static native long CResult_PaymentIdPaymentSendFailureZ_err(long e);
2328         // bool CResult_PaymentIdPaymentSendFailureZ_is_ok(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR o);
2329         public static native boolean CResult_PaymentIdPaymentSendFailureZ_is_ok(long o);
2330         // void CResult_PaymentIdPaymentSendFailureZ_free(struct LDKCResult_PaymentIdPaymentSendFailureZ _res);
2331         public static native void CResult_PaymentIdPaymentSendFailureZ_free(long _res);
2332         // uintptr_t CResult_PaymentIdPaymentSendFailureZ_clone_ptr(LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR arg);
2333         public static native long CResult_PaymentIdPaymentSendFailureZ_clone_ptr(long arg);
2334         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_clone(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR orig);
2335         public static native long CResult_PaymentIdPaymentSendFailureZ_clone(long orig);
2336         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
2337         public static native long CResult_NonePaymentSendFailureZ_ok();
2338         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
2339         public static native long CResult_NonePaymentSendFailureZ_err(long e);
2340         // bool CResult_NonePaymentSendFailureZ_is_ok(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR o);
2341         public static native boolean CResult_NonePaymentSendFailureZ_is_ok(long o);
2342         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
2343         public static native void CResult_NonePaymentSendFailureZ_free(long _res);
2344         // uintptr_t CResult_NonePaymentSendFailureZ_clone_ptr(LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR arg);
2345         public static native long CResult_NonePaymentSendFailureZ_clone_ptr(long arg);
2346         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
2347         public static native long CResult_NonePaymentSendFailureZ_clone(long orig);
2348         // uintptr_t C2Tuple_PaymentHashPaymentIdZ_clone_ptr(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR arg);
2349         public static native long C2Tuple_PaymentHashPaymentIdZ_clone_ptr(long arg);
2350         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_clone(const struct LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR orig);
2351         public static native long C2Tuple_PaymentHashPaymentIdZ_clone(long orig);
2352         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
2353         public static native long C2Tuple_PaymentHashPaymentIdZ_new(byte[] a, byte[] b);
2354         // void C2Tuple_PaymentHashPaymentIdZ_free(struct LDKC2Tuple_PaymentHashPaymentIdZ _res);
2355         public static native void C2Tuple_PaymentHashPaymentIdZ_free(long _res);
2356         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(struct LDKC2Tuple_PaymentHashPaymentIdZ o);
2357         public static native long CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(long o);
2358         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
2359         public static native long CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(long e);
2360         // bool CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR o);
2361         public static native boolean CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_is_ok(long o);
2362         // void CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ _res);
2363         public static native void CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(long _res);
2364         // uintptr_t CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR arg);
2365         public static native long CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone_ptr(long arg);
2366         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR orig);
2367         public static native long CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(long orig);
2368         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
2369         public static native void CVec_NetAddressZ_free(long[] _res);
2370         // uintptr_t C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR arg);
2371         public static native long C2Tuple_PaymentHashPaymentSecretZ_clone_ptr(long arg);
2372         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
2373         public static native long C2Tuple_PaymentHashPaymentSecretZ_clone(long orig);
2374         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
2375         public static native long C2Tuple_PaymentHashPaymentSecretZ_new(byte[] a, byte[] b);
2376         // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
2377         public static native void C2Tuple_PaymentHashPaymentSecretZ_free(long _res);
2378         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_ok(struct LDKC2Tuple_PaymentHashPaymentSecretZ o);
2379         public static native long CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_ok(long o);
2380         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_err(void);
2381         public static native long CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_err();
2382         // bool CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR o);
2383         public static native boolean CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_is_ok(long o);
2384         // void CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ _res);
2385         public static native void CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_free(long _res);
2386         // uintptr_t CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR arg);
2387         public static native long CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone_ptr(long arg);
2388         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ *NONNULL_PTR orig);
2389         public static native long CResult_C2Tuple_PaymentHashPaymentSecretZNoneZ_clone(long orig);
2390         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_ok(struct LDKC2Tuple_PaymentHashPaymentSecretZ o);
2391         public static native long CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_ok(long o);
2392         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_err(struct LDKAPIError e);
2393         public static native long CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_err(long e);
2394         // bool CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_is_ok(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR o);
2395         public static native boolean CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_is_ok(long o);
2396         // void CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ _res);
2397         public static native void CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_free(long _res);
2398         // uintptr_t CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone_ptr(LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR arg);
2399         public static native long CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone_ptr(long arg);
2400         // struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ *NONNULL_PTR orig);
2401         public static native long CResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ_clone(long orig);
2402         // struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_ok(struct LDKThirtyTwoBytes o);
2403         public static native long CResult_PaymentSecretNoneZ_ok(byte[] o);
2404         // struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_err(void);
2405         public static native long CResult_PaymentSecretNoneZ_err();
2406         // bool CResult_PaymentSecretNoneZ_is_ok(const struct LDKCResult_PaymentSecretNoneZ *NONNULL_PTR o);
2407         public static native boolean CResult_PaymentSecretNoneZ_is_ok(long o);
2408         // void CResult_PaymentSecretNoneZ_free(struct LDKCResult_PaymentSecretNoneZ _res);
2409         public static native void CResult_PaymentSecretNoneZ_free(long _res);
2410         // uintptr_t CResult_PaymentSecretNoneZ_clone_ptr(LDKCResult_PaymentSecretNoneZ *NONNULL_PTR arg);
2411         public static native long CResult_PaymentSecretNoneZ_clone_ptr(long arg);
2412         // struct LDKCResult_PaymentSecretNoneZ CResult_PaymentSecretNoneZ_clone(const struct LDKCResult_PaymentSecretNoneZ *NONNULL_PTR orig);
2413         public static native long CResult_PaymentSecretNoneZ_clone(long orig);
2414         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
2415         public static native long CResult_PaymentSecretAPIErrorZ_ok(byte[] o);
2416         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
2417         public static native long CResult_PaymentSecretAPIErrorZ_err(long e);
2418         // bool CResult_PaymentSecretAPIErrorZ_is_ok(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR o);
2419         public static native boolean CResult_PaymentSecretAPIErrorZ_is_ok(long o);
2420         // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
2421         public static native void CResult_PaymentSecretAPIErrorZ_free(long _res);
2422         // uintptr_t CResult_PaymentSecretAPIErrorZ_clone_ptr(LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR arg);
2423         public static native long CResult_PaymentSecretAPIErrorZ_clone_ptr(long arg);
2424         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
2425         public static native long CResult_PaymentSecretAPIErrorZ_clone(long orig);
2426         // struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
2427         public static native long CResult_PaymentPreimageAPIErrorZ_ok(byte[] o);
2428         // struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_err(struct LDKAPIError e);
2429         public static native long CResult_PaymentPreimageAPIErrorZ_err(long e);
2430         // bool CResult_PaymentPreimageAPIErrorZ_is_ok(const struct LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR o);
2431         public static native boolean CResult_PaymentPreimageAPIErrorZ_is_ok(long o);
2432         // void CResult_PaymentPreimageAPIErrorZ_free(struct LDKCResult_PaymentPreimageAPIErrorZ _res);
2433         public static native void CResult_PaymentPreimageAPIErrorZ_free(long _res);
2434         // uintptr_t CResult_PaymentPreimageAPIErrorZ_clone_ptr(LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR arg);
2435         public static native long CResult_PaymentPreimageAPIErrorZ_clone_ptr(long arg);
2436         // struct LDKCResult_PaymentPreimageAPIErrorZ CResult_PaymentPreimageAPIErrorZ_clone(const struct LDKCResult_PaymentPreimageAPIErrorZ *NONNULL_PTR orig);
2437         public static native long CResult_PaymentPreimageAPIErrorZ_clone(long orig);
2438         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
2439         public static native void CVec_ChannelMonitorZ_free(long[] _res);
2440         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
2441         public static native long C2Tuple_BlockHashChannelManagerZ_new(byte[] a, long b);
2442         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
2443         public static native void C2Tuple_BlockHashChannelManagerZ_free(long _res);
2444         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
2445         public static native long CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(long o);
2446         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
2447         public static native long CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(long e);
2448         // bool CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *NONNULL_PTR o);
2449         public static native boolean CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_is_ok(long o);
2450         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
2451         public static native void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(long _res);
2452         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
2453         public static native long CResult_ChannelConfigDecodeErrorZ_ok(long o);
2454         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
2455         public static native long CResult_ChannelConfigDecodeErrorZ_err(long e);
2456         // bool CResult_ChannelConfigDecodeErrorZ_is_ok(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR o);
2457         public static native boolean CResult_ChannelConfigDecodeErrorZ_is_ok(long o);
2458         // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
2459         public static native void CResult_ChannelConfigDecodeErrorZ_free(long _res);
2460         // uintptr_t CResult_ChannelConfigDecodeErrorZ_clone_ptr(LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR arg);
2461         public static native long CResult_ChannelConfigDecodeErrorZ_clone_ptr(long arg);
2462         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
2463         public static native long CResult_ChannelConfigDecodeErrorZ_clone(long orig);
2464         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
2465         public static native long CResult_OutPointDecodeErrorZ_ok(long o);
2466         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
2467         public static native long CResult_OutPointDecodeErrorZ_err(long e);
2468         // bool CResult_OutPointDecodeErrorZ_is_ok(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR o);
2469         public static native boolean CResult_OutPointDecodeErrorZ_is_ok(long o);
2470         // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
2471         public static native void CResult_OutPointDecodeErrorZ_free(long _res);
2472         // uintptr_t CResult_OutPointDecodeErrorZ_clone_ptr(LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR arg);
2473         public static native long CResult_OutPointDecodeErrorZ_clone_ptr(long arg);
2474         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
2475         public static native long CResult_OutPointDecodeErrorZ_clone(long orig);
2476         // struct LDKCOption_TypeZ COption_TypeZ_some(struct LDKType o);
2477         public static native long COption_TypeZ_some(long o);
2478         // struct LDKCOption_TypeZ COption_TypeZ_none(void);
2479         public static native long COption_TypeZ_none();
2480         // void COption_TypeZ_free(struct LDKCOption_TypeZ _res);
2481         public static native void COption_TypeZ_free(long _res);
2482         // uintptr_t COption_TypeZ_clone_ptr(LDKCOption_TypeZ *NONNULL_PTR arg);
2483         public static native long COption_TypeZ_clone_ptr(long arg);
2484         // struct LDKCOption_TypeZ COption_TypeZ_clone(const struct LDKCOption_TypeZ *NONNULL_PTR orig);
2485         public static native long COption_TypeZ_clone(long orig);
2486         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_ok(struct LDKCOption_TypeZ o);
2487         public static native long CResult_COption_TypeZDecodeErrorZ_ok(long o);
2488         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_err(struct LDKDecodeError e);
2489         public static native long CResult_COption_TypeZDecodeErrorZ_err(long e);
2490         // bool CResult_COption_TypeZDecodeErrorZ_is_ok(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR o);
2491         public static native boolean CResult_COption_TypeZDecodeErrorZ_is_ok(long o);
2492         // void CResult_COption_TypeZDecodeErrorZ_free(struct LDKCResult_COption_TypeZDecodeErrorZ _res);
2493         public static native void CResult_COption_TypeZDecodeErrorZ_free(long _res);
2494         // uintptr_t CResult_COption_TypeZDecodeErrorZ_clone_ptr(LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR arg);
2495         public static native long CResult_COption_TypeZDecodeErrorZ_clone_ptr(long arg);
2496         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_clone(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR orig);
2497         public static native long CResult_COption_TypeZDecodeErrorZ_clone(long orig);
2498         // struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_ok(struct LDKThirtyTwoBytes o);
2499         public static native long CResult_PaymentIdPaymentErrorZ_ok(byte[] o);
2500         // struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_err(struct LDKPaymentError e);
2501         public static native long CResult_PaymentIdPaymentErrorZ_err(long e);
2502         // bool CResult_PaymentIdPaymentErrorZ_is_ok(const struct LDKCResult_PaymentIdPaymentErrorZ *NONNULL_PTR o);
2503         public static native boolean CResult_PaymentIdPaymentErrorZ_is_ok(long o);
2504         // void CResult_PaymentIdPaymentErrorZ_free(struct LDKCResult_PaymentIdPaymentErrorZ _res);
2505         public static native void CResult_PaymentIdPaymentErrorZ_free(long _res);
2506         // uintptr_t CResult_PaymentIdPaymentErrorZ_clone_ptr(LDKCResult_PaymentIdPaymentErrorZ *NONNULL_PTR arg);
2507         public static native long CResult_PaymentIdPaymentErrorZ_clone_ptr(long arg);
2508         // struct LDKCResult_PaymentIdPaymentErrorZ CResult_PaymentIdPaymentErrorZ_clone(const struct LDKCResult_PaymentIdPaymentErrorZ *NONNULL_PTR orig);
2509         public static native long CResult_PaymentIdPaymentErrorZ_clone(long orig);
2510         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o);
2511         public static native long CResult_SiPrefixNoneZ_ok(SiPrefix o);
2512         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void);
2513         public static native long CResult_SiPrefixNoneZ_err();
2514         // bool CResult_SiPrefixNoneZ_is_ok(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR o);
2515         public static native boolean CResult_SiPrefixNoneZ_is_ok(long o);
2516         // void CResult_SiPrefixNoneZ_free(struct LDKCResult_SiPrefixNoneZ _res);
2517         public static native void CResult_SiPrefixNoneZ_free(long _res);
2518         // uintptr_t CResult_SiPrefixNoneZ_clone_ptr(LDKCResult_SiPrefixNoneZ *NONNULL_PTR arg);
2519         public static native long CResult_SiPrefixNoneZ_clone_ptr(long arg);
2520         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_clone(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR orig);
2521         public static native long CResult_SiPrefixNoneZ_clone(long orig);
2522         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_ok(struct LDKInvoice o);
2523         public static native long CResult_InvoiceNoneZ_ok(long o);
2524         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_err(void);
2525         public static native long CResult_InvoiceNoneZ_err();
2526         // bool CResult_InvoiceNoneZ_is_ok(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR o);
2527         public static native boolean CResult_InvoiceNoneZ_is_ok(long o);
2528         // void CResult_InvoiceNoneZ_free(struct LDKCResult_InvoiceNoneZ _res);
2529         public static native void CResult_InvoiceNoneZ_free(long _res);
2530         // uintptr_t CResult_InvoiceNoneZ_clone_ptr(LDKCResult_InvoiceNoneZ *NONNULL_PTR arg);
2531         public static native long CResult_InvoiceNoneZ_clone_ptr(long arg);
2532         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_clone(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR orig);
2533         public static native long CResult_InvoiceNoneZ_clone(long orig);
2534         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_ok(struct LDKSignedRawInvoice o);
2535         public static native long CResult_SignedRawInvoiceNoneZ_ok(long o);
2536         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_err(void);
2537         public static native long CResult_SignedRawInvoiceNoneZ_err();
2538         // bool CResult_SignedRawInvoiceNoneZ_is_ok(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR o);
2539         public static native boolean CResult_SignedRawInvoiceNoneZ_is_ok(long o);
2540         // void CResult_SignedRawInvoiceNoneZ_free(struct LDKCResult_SignedRawInvoiceNoneZ _res);
2541         public static native void CResult_SignedRawInvoiceNoneZ_free(long _res);
2542         // uintptr_t CResult_SignedRawInvoiceNoneZ_clone_ptr(LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR arg);
2543         public static native long CResult_SignedRawInvoiceNoneZ_clone_ptr(long arg);
2544         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_clone(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR orig);
2545         public static native long CResult_SignedRawInvoiceNoneZ_clone(long orig);
2546         // uintptr_t C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone_ptr(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR arg);
2547         public static native long C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone_ptr(long arg);
2548         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(const struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR orig);
2549         public static native long C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(long orig);
2550         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(struct LDKRawInvoice a, struct LDKThirtyTwoBytes b, struct LDKInvoiceSignature c);
2551         public static native long C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(long a, byte[] b, long c);
2552         // void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ _res);
2553         public static native void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(long _res);
2554         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o);
2555         public static native long CResult_PayeePubKeyErrorZ_ok(long o);
2556         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e);
2557         public static native long CResult_PayeePubKeyErrorZ_err(Secp256k1Error e);
2558         // bool CResult_PayeePubKeyErrorZ_is_ok(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR o);
2559         public static native boolean CResult_PayeePubKeyErrorZ_is_ok(long o);
2560         // void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res);
2561         public static native void CResult_PayeePubKeyErrorZ_free(long _res);
2562         // uintptr_t CResult_PayeePubKeyErrorZ_clone_ptr(LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR arg);
2563         public static native long CResult_PayeePubKeyErrorZ_clone_ptr(long arg);
2564         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_clone(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR orig);
2565         public static native long CResult_PayeePubKeyErrorZ_clone(long orig);
2566         // void CVec_PrivateRouteZ_free(struct LDKCVec_PrivateRouteZ _res);
2567         public static native void CVec_PrivateRouteZ_free(long[] _res);
2568         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_ok(struct LDKPositiveTimestamp o);
2569         public static native long CResult_PositiveTimestampCreationErrorZ_ok(long o);
2570         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_err(enum LDKCreationError e);
2571         public static native long CResult_PositiveTimestampCreationErrorZ_err(CreationError e);
2572         // bool CResult_PositiveTimestampCreationErrorZ_is_ok(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR o);
2573         public static native boolean CResult_PositiveTimestampCreationErrorZ_is_ok(long o);
2574         // void CResult_PositiveTimestampCreationErrorZ_free(struct LDKCResult_PositiveTimestampCreationErrorZ _res);
2575         public static native void CResult_PositiveTimestampCreationErrorZ_free(long _res);
2576         // uintptr_t CResult_PositiveTimestampCreationErrorZ_clone_ptr(LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR arg);
2577         public static native long CResult_PositiveTimestampCreationErrorZ_clone_ptr(long arg);
2578         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_clone(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR orig);
2579         public static native long CResult_PositiveTimestampCreationErrorZ_clone(long orig);
2580         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_ok(void);
2581         public static native long CResult_NoneSemanticErrorZ_ok();
2582         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_err(enum LDKSemanticError e);
2583         public static native long CResult_NoneSemanticErrorZ_err(SemanticError e);
2584         // bool CResult_NoneSemanticErrorZ_is_ok(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR o);
2585         public static native boolean CResult_NoneSemanticErrorZ_is_ok(long o);
2586         // void CResult_NoneSemanticErrorZ_free(struct LDKCResult_NoneSemanticErrorZ _res);
2587         public static native void CResult_NoneSemanticErrorZ_free(long _res);
2588         // uintptr_t CResult_NoneSemanticErrorZ_clone_ptr(LDKCResult_NoneSemanticErrorZ *NONNULL_PTR arg);
2589         public static native long CResult_NoneSemanticErrorZ_clone_ptr(long arg);
2590         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_clone(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR orig);
2591         public static native long CResult_NoneSemanticErrorZ_clone(long orig);
2592         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_ok(struct LDKInvoice o);
2593         public static native long CResult_InvoiceSemanticErrorZ_ok(long o);
2594         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_err(enum LDKSemanticError e);
2595         public static native long CResult_InvoiceSemanticErrorZ_err(SemanticError e);
2596         // bool CResult_InvoiceSemanticErrorZ_is_ok(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR o);
2597         public static native boolean CResult_InvoiceSemanticErrorZ_is_ok(long o);
2598         // void CResult_InvoiceSemanticErrorZ_free(struct LDKCResult_InvoiceSemanticErrorZ _res);
2599         public static native void CResult_InvoiceSemanticErrorZ_free(long _res);
2600         // uintptr_t CResult_InvoiceSemanticErrorZ_clone_ptr(LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR arg);
2601         public static native long CResult_InvoiceSemanticErrorZ_clone_ptr(long arg);
2602         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_clone(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR orig);
2603         public static native long CResult_InvoiceSemanticErrorZ_clone(long orig);
2604         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_ok(struct LDKDescription o);
2605         public static native long CResult_DescriptionCreationErrorZ_ok(long o);
2606         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_err(enum LDKCreationError e);
2607         public static native long CResult_DescriptionCreationErrorZ_err(CreationError e);
2608         // bool CResult_DescriptionCreationErrorZ_is_ok(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR o);
2609         public static native boolean CResult_DescriptionCreationErrorZ_is_ok(long o);
2610         // void CResult_DescriptionCreationErrorZ_free(struct LDKCResult_DescriptionCreationErrorZ _res);
2611         public static native void CResult_DescriptionCreationErrorZ_free(long _res);
2612         // uintptr_t CResult_DescriptionCreationErrorZ_clone_ptr(LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR arg);
2613         public static native long CResult_DescriptionCreationErrorZ_clone_ptr(long arg);
2614         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_clone(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR orig);
2615         public static native long CResult_DescriptionCreationErrorZ_clone(long orig);
2616         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_ok(struct LDKExpiryTime o);
2617         public static native long CResult_ExpiryTimeCreationErrorZ_ok(long o);
2618         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_err(enum LDKCreationError e);
2619         public static native long CResult_ExpiryTimeCreationErrorZ_err(CreationError e);
2620         // bool CResult_ExpiryTimeCreationErrorZ_is_ok(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR o);
2621         public static native boolean CResult_ExpiryTimeCreationErrorZ_is_ok(long o);
2622         // void CResult_ExpiryTimeCreationErrorZ_free(struct LDKCResult_ExpiryTimeCreationErrorZ _res);
2623         public static native void CResult_ExpiryTimeCreationErrorZ_free(long _res);
2624         // uintptr_t CResult_ExpiryTimeCreationErrorZ_clone_ptr(LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR arg);
2625         public static native long CResult_ExpiryTimeCreationErrorZ_clone_ptr(long arg);
2626         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_clone(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR orig);
2627         public static native long CResult_ExpiryTimeCreationErrorZ_clone(long orig);
2628         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_ok(struct LDKPrivateRoute o);
2629         public static native long CResult_PrivateRouteCreationErrorZ_ok(long o);
2630         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_err(enum LDKCreationError e);
2631         public static native long CResult_PrivateRouteCreationErrorZ_err(CreationError e);
2632         // bool CResult_PrivateRouteCreationErrorZ_is_ok(const struct LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR o);
2633         public static native boolean CResult_PrivateRouteCreationErrorZ_is_ok(long o);
2634         // void CResult_PrivateRouteCreationErrorZ_free(struct LDKCResult_PrivateRouteCreationErrorZ _res);
2635         public static native void CResult_PrivateRouteCreationErrorZ_free(long _res);
2636         // uintptr_t CResult_PrivateRouteCreationErrorZ_clone_ptr(LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR arg);
2637         public static native long CResult_PrivateRouteCreationErrorZ_clone_ptr(long arg);
2638         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_clone(const struct LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR orig);
2639         public static native long CResult_PrivateRouteCreationErrorZ_clone(long orig);
2640         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
2641         public static native long CResult_StringErrorZ_ok(String o);
2642         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
2643         public static native long CResult_StringErrorZ_err(Secp256k1Error e);
2644         // bool CResult_StringErrorZ_is_ok(const struct LDKCResult_StringErrorZ *NONNULL_PTR o);
2645         public static native boolean CResult_StringErrorZ_is_ok(long o);
2646         // void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
2647         public static native void CResult_StringErrorZ_free(long _res);
2648         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
2649         public static native long CResult_ChannelMonitorUpdateDecodeErrorZ_ok(long o);
2650         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2651         public static native long CResult_ChannelMonitorUpdateDecodeErrorZ_err(long e);
2652         // bool CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR o);
2653         public static native boolean CResult_ChannelMonitorUpdateDecodeErrorZ_is_ok(long o);
2654         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
2655         public static native void CResult_ChannelMonitorUpdateDecodeErrorZ_free(long _res);
2656         // uintptr_t CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR arg);
2657         public static native long CResult_ChannelMonitorUpdateDecodeErrorZ_clone_ptr(long arg);
2658         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
2659         public static native long CResult_ChannelMonitorUpdateDecodeErrorZ_clone(long orig);
2660         // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_some(struct LDKMonitorEvent o);
2661         public static native long COption_MonitorEventZ_some(long o);
2662         // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_none(void);
2663         public static native long COption_MonitorEventZ_none();
2664         // void COption_MonitorEventZ_free(struct LDKCOption_MonitorEventZ _res);
2665         public static native void COption_MonitorEventZ_free(long _res);
2666         // uintptr_t COption_MonitorEventZ_clone_ptr(LDKCOption_MonitorEventZ *NONNULL_PTR arg);
2667         public static native long COption_MonitorEventZ_clone_ptr(long arg);
2668         // struct LDKCOption_MonitorEventZ COption_MonitorEventZ_clone(const struct LDKCOption_MonitorEventZ *NONNULL_PTR orig);
2669         public static native long COption_MonitorEventZ_clone(long orig);
2670         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_ok(struct LDKCOption_MonitorEventZ o);
2671         public static native long CResult_COption_MonitorEventZDecodeErrorZ_ok(long o);
2672         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_err(struct LDKDecodeError e);
2673         public static native long CResult_COption_MonitorEventZDecodeErrorZ_err(long e);
2674         // bool CResult_COption_MonitorEventZDecodeErrorZ_is_ok(const struct LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR o);
2675         public static native boolean CResult_COption_MonitorEventZDecodeErrorZ_is_ok(long o);
2676         // void CResult_COption_MonitorEventZDecodeErrorZ_free(struct LDKCResult_COption_MonitorEventZDecodeErrorZ _res);
2677         public static native void CResult_COption_MonitorEventZDecodeErrorZ_free(long _res);
2678         // uintptr_t CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR arg);
2679         public static native long CResult_COption_MonitorEventZDecodeErrorZ_clone_ptr(long arg);
2680         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ CResult_COption_MonitorEventZDecodeErrorZ_clone(const struct LDKCResult_COption_MonitorEventZDecodeErrorZ *NONNULL_PTR orig);
2681         public static native long CResult_COption_MonitorEventZDecodeErrorZ_clone(long orig);
2682         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
2683         public static native long CResult_HTLCUpdateDecodeErrorZ_ok(long o);
2684         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2685         public static native long CResult_HTLCUpdateDecodeErrorZ_err(long e);
2686         // bool CResult_HTLCUpdateDecodeErrorZ_is_ok(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR o);
2687         public static native boolean CResult_HTLCUpdateDecodeErrorZ_is_ok(long o);
2688         // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
2689         public static native void CResult_HTLCUpdateDecodeErrorZ_free(long _res);
2690         // uintptr_t CResult_HTLCUpdateDecodeErrorZ_clone_ptr(LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR arg);
2691         public static native long CResult_HTLCUpdateDecodeErrorZ_clone_ptr(long arg);
2692         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
2693         public static native long CResult_HTLCUpdateDecodeErrorZ_clone(long orig);
2694         // uintptr_t C2Tuple_OutPointScriptZ_clone_ptr(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR arg);
2695         public static native long C2Tuple_OutPointScriptZ_clone_ptr(long arg);
2696         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
2697         public static native long C2Tuple_OutPointScriptZ_clone(long orig);
2698         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
2699         public static native long C2Tuple_OutPointScriptZ_new(long a, byte[] b);
2700         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
2701         public static native void C2Tuple_OutPointScriptZ_free(long _res);
2702         // uintptr_t C2Tuple_u32ScriptZ_clone_ptr(LDKC2Tuple_u32ScriptZ *NONNULL_PTR arg);
2703         public static native long C2Tuple_u32ScriptZ_clone_ptr(long arg);
2704         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
2705         public static native long C2Tuple_u32ScriptZ_clone(long orig);
2706         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
2707         public static native long C2Tuple_u32ScriptZ_new(int a, byte[] b);
2708         // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
2709         public static native void C2Tuple_u32ScriptZ_free(long _res);
2710         // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
2711         public static native void CVec_C2Tuple_u32ScriptZZ_free(long[] _res);
2712         // uintptr_t C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone_ptr(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR arg);
2713         public static native long C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone_ptr(long arg);
2714         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR orig);
2715         public static native long C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(long orig);
2716         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
2717         public static native long C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(byte[] a, long[] b);
2718         // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
2719         public static native void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(long _res);
2720         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
2721         public static native void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(long[] _res);
2722         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
2723         public static native void CVec_EventZ_free(long[] _res);
2724         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
2725         public static native void CVec_TransactionZ_free(byte[][] _res);
2726         // uintptr_t C2Tuple_u32TxOutZ_clone_ptr(LDKC2Tuple_u32TxOutZ *NONNULL_PTR arg);
2727         public static native long C2Tuple_u32TxOutZ_clone_ptr(long arg);
2728         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
2729         public static native long C2Tuple_u32TxOutZ_clone(long orig);
2730         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
2731         public static native long C2Tuple_u32TxOutZ_new(int a, long b);
2732         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
2733         public static native void C2Tuple_u32TxOutZ_free(long _res);
2734         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
2735         public static native void CVec_C2Tuple_u32TxOutZZ_free(long[] _res);
2736         // uintptr_t C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR arg);
2737         public static native long C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone_ptr(long arg);
2738         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
2739         public static native long C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(long orig);
2740         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
2741         public static native long C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(byte[] a, long[] b);
2742         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
2743         public static native void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(long _res);
2744         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
2745         public static native void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(long[] _res);
2746         // void CVec_BalanceZ_free(struct LDKCVec_BalanceZ _res);
2747         public static native void CVec_BalanceZ_free(long[] _res);
2748         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
2749         public static native long CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(long o);
2750         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
2751         public static native long CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(long e);
2752         // bool CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR o);
2753         public static native boolean CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_is_ok(long o);
2754         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
2755         public static native void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(long _res);
2756         // uintptr_t CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR arg);
2757         public static native long CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone_ptr(long arg);
2758         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR orig);
2759         public static native long CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(long orig);
2760         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
2761         public static native long CResult_NoneLightningErrorZ_ok();
2762         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
2763         public static native long CResult_NoneLightningErrorZ_err(long e);
2764         // bool CResult_NoneLightningErrorZ_is_ok(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR o);
2765         public static native boolean CResult_NoneLightningErrorZ_is_ok(long o);
2766         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
2767         public static native void CResult_NoneLightningErrorZ_free(long _res);
2768         // uintptr_t CResult_NoneLightningErrorZ_clone_ptr(LDKCResult_NoneLightningErrorZ *NONNULL_PTR arg);
2769         public static native long CResult_NoneLightningErrorZ_clone_ptr(long arg);
2770         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
2771         public static native long CResult_NoneLightningErrorZ_clone(long orig);
2772         // uintptr_t C2Tuple_PublicKeyTypeZ_clone_ptr(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR arg);
2773         public static native long C2Tuple_PublicKeyTypeZ_clone_ptr(long arg);
2774         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_clone(const struct LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR orig);
2775         public static native long C2Tuple_PublicKeyTypeZ_clone(long orig);
2776         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_new(struct LDKPublicKey a, struct LDKType b);
2777         public static native long C2Tuple_PublicKeyTypeZ_new(byte[] a, long b);
2778         // void C2Tuple_PublicKeyTypeZ_free(struct LDKC2Tuple_PublicKeyTypeZ _res);
2779         public static native void C2Tuple_PublicKeyTypeZ_free(long _res);
2780         // void CVec_C2Tuple_PublicKeyTypeZZ_free(struct LDKCVec_C2Tuple_PublicKeyTypeZZ _res);
2781         public static native void CVec_C2Tuple_PublicKeyTypeZZ_free(long[] _res);
2782         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
2783         public static native long CResult_boolLightningErrorZ_ok(boolean o);
2784         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
2785         public static native long CResult_boolLightningErrorZ_err(long e);
2786         // bool CResult_boolLightningErrorZ_is_ok(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR o);
2787         public static native boolean CResult_boolLightningErrorZ_is_ok(long o);
2788         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
2789         public static native void CResult_boolLightningErrorZ_free(long _res);
2790         // uintptr_t CResult_boolLightningErrorZ_clone_ptr(LDKCResult_boolLightningErrorZ *NONNULL_PTR arg);
2791         public static native long CResult_boolLightningErrorZ_clone_ptr(long arg);
2792         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
2793         public static native long CResult_boolLightningErrorZ_clone(long orig);
2794         // uintptr_t C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR arg);
2795         public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone_ptr(long arg);
2796         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
2797         public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(long orig);
2798         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
2799         public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(long a, long b, long c);
2800         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
2801         public static native void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(long _res);
2802         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
2803         public static native void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(long[] _res);
2804         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
2805         public static native void CVec_NodeAnnouncementZ_free(long[] _res);
2806         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
2807         public static native void CVec_PublicKeyZ_free(byte[][] _res);
2808         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
2809         public static native long CResult_CVec_u8ZPeerHandleErrorZ_ok(byte[] o);
2810         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2811         public static native long CResult_CVec_u8ZPeerHandleErrorZ_err(long e);
2812         // bool CResult_CVec_u8ZPeerHandleErrorZ_is_ok(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR o);
2813         public static native boolean CResult_CVec_u8ZPeerHandleErrorZ_is_ok(long o);
2814         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
2815         public static native void CResult_CVec_u8ZPeerHandleErrorZ_free(long _res);
2816         // uintptr_t CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR arg);
2817         public static native long CResult_CVec_u8ZPeerHandleErrorZ_clone_ptr(long arg);
2818         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
2819         public static native long CResult_CVec_u8ZPeerHandleErrorZ_clone(long orig);
2820         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
2821         public static native long CResult_NonePeerHandleErrorZ_ok();
2822         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
2823         public static native long CResult_NonePeerHandleErrorZ_err(long e);
2824         // bool CResult_NonePeerHandleErrorZ_is_ok(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR o);
2825         public static native boolean CResult_NonePeerHandleErrorZ_is_ok(long o);
2826         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
2827         public static native void CResult_NonePeerHandleErrorZ_free(long _res);
2828         // uintptr_t CResult_NonePeerHandleErrorZ_clone_ptr(LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR arg);
2829         public static native long CResult_NonePeerHandleErrorZ_clone_ptr(long arg);
2830         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
2831         public static native long CResult_NonePeerHandleErrorZ_clone(long orig);
2832         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
2833         public static native long CResult_boolPeerHandleErrorZ_ok(boolean o);
2834         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2835         public static native long CResult_boolPeerHandleErrorZ_err(long e);
2836         // bool CResult_boolPeerHandleErrorZ_is_ok(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR o);
2837         public static native boolean CResult_boolPeerHandleErrorZ_is_ok(long o);
2838         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
2839         public static native void CResult_boolPeerHandleErrorZ_free(long _res);
2840         // uintptr_t CResult_boolPeerHandleErrorZ_clone_ptr(LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR arg);
2841         public static native long CResult_boolPeerHandleErrorZ_clone_ptr(long arg);
2842         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
2843         public static native long CResult_boolPeerHandleErrorZ_clone(long orig);
2844         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_ok(struct LDKNodeId o);
2845         public static native long CResult_NodeIdDecodeErrorZ_ok(long o);
2846         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_err(struct LDKDecodeError e);
2847         public static native long CResult_NodeIdDecodeErrorZ_err(long e);
2848         // bool CResult_NodeIdDecodeErrorZ_is_ok(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR o);
2849         public static native boolean CResult_NodeIdDecodeErrorZ_is_ok(long o);
2850         // void CResult_NodeIdDecodeErrorZ_free(struct LDKCResult_NodeIdDecodeErrorZ _res);
2851         public static native void CResult_NodeIdDecodeErrorZ_free(long _res);
2852         // uintptr_t CResult_NodeIdDecodeErrorZ_clone_ptr(LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR arg);
2853         public static native long CResult_NodeIdDecodeErrorZ_clone_ptr(long arg);
2854         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_clone(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR orig);
2855         public static native long CResult_NodeIdDecodeErrorZ_clone(long orig);
2856         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_ok(struct LDKCOption_NetworkUpdateZ o);
2857         public static native long CResult_COption_NetworkUpdateZDecodeErrorZ_ok(long o);
2858         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_err(struct LDKDecodeError e);
2859         public static native long CResult_COption_NetworkUpdateZDecodeErrorZ_err(long e);
2860         // bool CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(const struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR o);
2861         public static native boolean CResult_COption_NetworkUpdateZDecodeErrorZ_is_ok(long o);
2862         // void CResult_COption_NetworkUpdateZDecodeErrorZ_free(struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ _res);
2863         public static native void CResult_COption_NetworkUpdateZDecodeErrorZ_free(long _res);
2864         // uintptr_t CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR arg);
2865         public static native long CResult_COption_NetworkUpdateZDecodeErrorZ_clone_ptr(long arg);
2866         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ CResult_COption_NetworkUpdateZDecodeErrorZ_clone(const struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ *NONNULL_PTR orig);
2867         public static native long CResult_COption_NetworkUpdateZDecodeErrorZ_clone(long orig);
2868         // struct LDKCOption_AccessZ COption_AccessZ_some(struct LDKAccess o);
2869         public static native long COption_AccessZ_some(long o);
2870         // struct LDKCOption_AccessZ COption_AccessZ_none(void);
2871         public static native long COption_AccessZ_none();
2872         // void COption_AccessZ_free(struct LDKCOption_AccessZ _res);
2873         public static native void COption_AccessZ_free(long _res);
2874         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
2875         public static native long CResult_DirectionalChannelInfoDecodeErrorZ_ok(long o);
2876         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2877         public static native long CResult_DirectionalChannelInfoDecodeErrorZ_err(long e);
2878         // bool CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR o);
2879         public static native boolean CResult_DirectionalChannelInfoDecodeErrorZ_is_ok(long o);
2880         // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
2881         public static native void CResult_DirectionalChannelInfoDecodeErrorZ_free(long _res);
2882         // uintptr_t CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR arg);
2883         public static native long CResult_DirectionalChannelInfoDecodeErrorZ_clone_ptr(long arg);
2884         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2885         public static native long CResult_DirectionalChannelInfoDecodeErrorZ_clone(long orig);
2886         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
2887         public static native long CResult_ChannelInfoDecodeErrorZ_ok(long o);
2888         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2889         public static native long CResult_ChannelInfoDecodeErrorZ_err(long e);
2890         // bool CResult_ChannelInfoDecodeErrorZ_is_ok(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR o);
2891         public static native boolean CResult_ChannelInfoDecodeErrorZ_is_ok(long o);
2892         // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
2893         public static native void CResult_ChannelInfoDecodeErrorZ_free(long _res);
2894         // uintptr_t CResult_ChannelInfoDecodeErrorZ_clone_ptr(LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR arg);
2895         public static native long CResult_ChannelInfoDecodeErrorZ_clone_ptr(long arg);
2896         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2897         public static native long CResult_ChannelInfoDecodeErrorZ_clone(long orig);
2898         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
2899         public static native long CResult_RoutingFeesDecodeErrorZ_ok(long o);
2900         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
2901         public static native long CResult_RoutingFeesDecodeErrorZ_err(long e);
2902         // bool CResult_RoutingFeesDecodeErrorZ_is_ok(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR o);
2903         public static native boolean CResult_RoutingFeesDecodeErrorZ_is_ok(long o);
2904         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
2905         public static native void CResult_RoutingFeesDecodeErrorZ_free(long _res);
2906         // uintptr_t CResult_RoutingFeesDecodeErrorZ_clone_ptr(LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR arg);
2907         public static native long CResult_RoutingFeesDecodeErrorZ_clone_ptr(long arg);
2908         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
2909         public static native long CResult_RoutingFeesDecodeErrorZ_clone(long orig);
2910         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
2911         public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_ok(long o);
2912         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
2913         public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_err(long e);
2914         // bool CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR o);
2915         public static native boolean CResult_NodeAnnouncementInfoDecodeErrorZ_is_ok(long o);
2916         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
2917         public static native void CResult_NodeAnnouncementInfoDecodeErrorZ_free(long _res);
2918         // uintptr_t CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR arg);
2919         public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_clone_ptr(long arg);
2920         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
2921         public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_clone(long orig);
2922         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
2923         public static native void CVec_u64Z_free(long[] _res);
2924         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
2925         public static native long CResult_NodeInfoDecodeErrorZ_ok(long o);
2926         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
2927         public static native long CResult_NodeInfoDecodeErrorZ_err(long e);
2928         // bool CResult_NodeInfoDecodeErrorZ_is_ok(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR o);
2929         public static native boolean CResult_NodeInfoDecodeErrorZ_is_ok(long o);
2930         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
2931         public static native void CResult_NodeInfoDecodeErrorZ_free(long _res);
2932         // uintptr_t CResult_NodeInfoDecodeErrorZ_clone_ptr(LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR arg);
2933         public static native long CResult_NodeInfoDecodeErrorZ_clone_ptr(long arg);
2934         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
2935         public static native long CResult_NodeInfoDecodeErrorZ_clone(long orig);
2936         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
2937         public static native long CResult_NetworkGraphDecodeErrorZ_ok(long o);
2938         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
2939         public static native long CResult_NetworkGraphDecodeErrorZ_err(long e);
2940         // bool CResult_NetworkGraphDecodeErrorZ_is_ok(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR o);
2941         public static native boolean CResult_NetworkGraphDecodeErrorZ_is_ok(long o);
2942         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
2943         public static native void CResult_NetworkGraphDecodeErrorZ_free(long _res);
2944         // uintptr_t CResult_NetworkGraphDecodeErrorZ_clone_ptr(LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR arg);
2945         public static native long CResult_NetworkGraphDecodeErrorZ_clone_ptr(long arg);
2946         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
2947         public static native long CResult_NetworkGraphDecodeErrorZ_clone(long orig);
2948         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_some(struct LDKCVec_NetAddressZ o);
2949         public static native long COption_CVec_NetAddressZZ_some(long[] o);
2950         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_none(void);
2951         public static native long COption_CVec_NetAddressZZ_none();
2952         // void COption_CVec_NetAddressZZ_free(struct LDKCOption_CVec_NetAddressZZ _res);
2953         public static native void COption_CVec_NetAddressZZ_free(long _res);
2954         // uintptr_t COption_CVec_NetAddressZZ_clone_ptr(LDKCOption_CVec_NetAddressZZ *NONNULL_PTR arg);
2955         public static native long COption_CVec_NetAddressZZ_clone_ptr(long arg);
2956         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_clone(const struct LDKCOption_CVec_NetAddressZZ *NONNULL_PTR orig);
2957         public static native long COption_CVec_NetAddressZZ_clone(long orig);
2958         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
2959         public static native long CResult_NetAddressDecodeErrorZ_ok(long o);
2960         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
2961         public static native long CResult_NetAddressDecodeErrorZ_err(long e);
2962         // bool CResult_NetAddressDecodeErrorZ_is_ok(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR o);
2963         public static native boolean CResult_NetAddressDecodeErrorZ_is_ok(long o);
2964         // void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
2965         public static native void CResult_NetAddressDecodeErrorZ_free(long _res);
2966         // uintptr_t CResult_NetAddressDecodeErrorZ_clone_ptr(LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR arg);
2967         public static native long CResult_NetAddressDecodeErrorZ_clone_ptr(long arg);
2968         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
2969         public static native long CResult_NetAddressDecodeErrorZ_clone(long orig);
2970         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
2971         public static native void CVec_UpdateAddHTLCZ_free(long[] _res);
2972         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
2973         public static native void CVec_UpdateFulfillHTLCZ_free(long[] _res);
2974         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
2975         public static native void CVec_UpdateFailHTLCZ_free(long[] _res);
2976         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
2977         public static native void CVec_UpdateFailMalformedHTLCZ_free(long[] _res);
2978         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
2979         public static native long CResult_AcceptChannelDecodeErrorZ_ok(long o);
2980         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
2981         public static native long CResult_AcceptChannelDecodeErrorZ_err(long e);
2982         // bool CResult_AcceptChannelDecodeErrorZ_is_ok(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR o);
2983         public static native boolean CResult_AcceptChannelDecodeErrorZ_is_ok(long o);
2984         // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
2985         public static native void CResult_AcceptChannelDecodeErrorZ_free(long _res);
2986         // uintptr_t CResult_AcceptChannelDecodeErrorZ_clone_ptr(LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR arg);
2987         public static native long CResult_AcceptChannelDecodeErrorZ_clone_ptr(long arg);
2988         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
2989         public static native long CResult_AcceptChannelDecodeErrorZ_clone(long orig);
2990         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
2991         public static native long CResult_AnnouncementSignaturesDecodeErrorZ_ok(long o);
2992         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
2993         public static native long CResult_AnnouncementSignaturesDecodeErrorZ_err(long e);
2994         // bool CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR o);
2995         public static native boolean CResult_AnnouncementSignaturesDecodeErrorZ_is_ok(long o);
2996         // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
2997         public static native void CResult_AnnouncementSignaturesDecodeErrorZ_free(long _res);
2998         // uintptr_t CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR arg);
2999         public static native long CResult_AnnouncementSignaturesDecodeErrorZ_clone_ptr(long arg);
3000         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
3001         public static native long CResult_AnnouncementSignaturesDecodeErrorZ_clone(long orig);
3002         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
3003         public static native long CResult_ChannelReestablishDecodeErrorZ_ok(long o);
3004         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
3005         public static native long CResult_ChannelReestablishDecodeErrorZ_err(long e);
3006         // bool CResult_ChannelReestablishDecodeErrorZ_is_ok(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR o);
3007         public static native boolean CResult_ChannelReestablishDecodeErrorZ_is_ok(long o);
3008         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
3009         public static native void CResult_ChannelReestablishDecodeErrorZ_free(long _res);
3010         // uintptr_t CResult_ChannelReestablishDecodeErrorZ_clone_ptr(LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR arg);
3011         public static native long CResult_ChannelReestablishDecodeErrorZ_clone_ptr(long arg);
3012         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
3013         public static native long CResult_ChannelReestablishDecodeErrorZ_clone(long orig);
3014         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
3015         public static native long CResult_ClosingSignedDecodeErrorZ_ok(long o);
3016         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3017         public static native long CResult_ClosingSignedDecodeErrorZ_err(long e);
3018         // bool CResult_ClosingSignedDecodeErrorZ_is_ok(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR o);
3019         public static native boolean CResult_ClosingSignedDecodeErrorZ_is_ok(long o);
3020         // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
3021         public static native void CResult_ClosingSignedDecodeErrorZ_free(long _res);
3022         // uintptr_t CResult_ClosingSignedDecodeErrorZ_clone_ptr(LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR arg);
3023         public static native long CResult_ClosingSignedDecodeErrorZ_clone_ptr(long arg);
3024         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
3025         public static native long CResult_ClosingSignedDecodeErrorZ_clone(long orig);
3026         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(struct LDKClosingSignedFeeRange o);
3027         public static native long CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(long o);
3028         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_err(struct LDKDecodeError e);
3029         public static native long CResult_ClosingSignedFeeRangeDecodeErrorZ_err(long e);
3030         // bool CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR o);
3031         public static native boolean CResult_ClosingSignedFeeRangeDecodeErrorZ_is_ok(long o);
3032         // void CResult_ClosingSignedFeeRangeDecodeErrorZ_free(struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ _res);
3033         public static native void CResult_ClosingSignedFeeRangeDecodeErrorZ_free(long _res);
3034         // uintptr_t CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR arg);
3035         public static native long CResult_ClosingSignedFeeRangeDecodeErrorZ_clone_ptr(long arg);
3036         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR orig);
3037         public static native long CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(long orig);
3038         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
3039         public static native long CResult_CommitmentSignedDecodeErrorZ_ok(long o);
3040         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
3041         public static native long CResult_CommitmentSignedDecodeErrorZ_err(long e);
3042         // bool CResult_CommitmentSignedDecodeErrorZ_is_ok(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR o);
3043         public static native boolean CResult_CommitmentSignedDecodeErrorZ_is_ok(long o);
3044         // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
3045         public static native void CResult_CommitmentSignedDecodeErrorZ_free(long _res);
3046         // uintptr_t CResult_CommitmentSignedDecodeErrorZ_clone_ptr(LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR arg);
3047         public static native long CResult_CommitmentSignedDecodeErrorZ_clone_ptr(long arg);
3048         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
3049         public static native long CResult_CommitmentSignedDecodeErrorZ_clone(long orig);
3050         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
3051         public static native long CResult_FundingCreatedDecodeErrorZ_ok(long o);
3052         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
3053         public static native long CResult_FundingCreatedDecodeErrorZ_err(long e);
3054         // bool CResult_FundingCreatedDecodeErrorZ_is_ok(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR o);
3055         public static native boolean CResult_FundingCreatedDecodeErrorZ_is_ok(long o);
3056         // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
3057         public static native void CResult_FundingCreatedDecodeErrorZ_free(long _res);
3058         // uintptr_t CResult_FundingCreatedDecodeErrorZ_clone_ptr(LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR arg);
3059         public static native long CResult_FundingCreatedDecodeErrorZ_clone_ptr(long arg);
3060         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
3061         public static native long CResult_FundingCreatedDecodeErrorZ_clone(long orig);
3062         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
3063         public static native long CResult_FundingSignedDecodeErrorZ_ok(long o);
3064         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3065         public static native long CResult_FundingSignedDecodeErrorZ_err(long e);
3066         // bool CResult_FundingSignedDecodeErrorZ_is_ok(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR o);
3067         public static native boolean CResult_FundingSignedDecodeErrorZ_is_ok(long o);
3068         // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
3069         public static native void CResult_FundingSignedDecodeErrorZ_free(long _res);
3070         // uintptr_t CResult_FundingSignedDecodeErrorZ_clone_ptr(LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR arg);
3071         public static native long CResult_FundingSignedDecodeErrorZ_clone_ptr(long arg);
3072         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
3073         public static native long CResult_FundingSignedDecodeErrorZ_clone(long orig);
3074         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
3075         public static native long CResult_FundingLockedDecodeErrorZ_ok(long o);
3076         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
3077         public static native long CResult_FundingLockedDecodeErrorZ_err(long e);
3078         // bool CResult_FundingLockedDecodeErrorZ_is_ok(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR o);
3079         public static native boolean CResult_FundingLockedDecodeErrorZ_is_ok(long o);
3080         // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
3081         public static native void CResult_FundingLockedDecodeErrorZ_free(long _res);
3082         // uintptr_t CResult_FundingLockedDecodeErrorZ_clone_ptr(LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR arg);
3083         public static native long CResult_FundingLockedDecodeErrorZ_clone_ptr(long arg);
3084         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
3085         public static native long CResult_FundingLockedDecodeErrorZ_clone(long orig);
3086         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
3087         public static native long CResult_InitDecodeErrorZ_ok(long o);
3088         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
3089         public static native long CResult_InitDecodeErrorZ_err(long e);
3090         // bool CResult_InitDecodeErrorZ_is_ok(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR o);
3091         public static native boolean CResult_InitDecodeErrorZ_is_ok(long o);
3092         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
3093         public static native void CResult_InitDecodeErrorZ_free(long _res);
3094         // uintptr_t CResult_InitDecodeErrorZ_clone_ptr(LDKCResult_InitDecodeErrorZ *NONNULL_PTR arg);
3095         public static native long CResult_InitDecodeErrorZ_clone_ptr(long arg);
3096         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
3097         public static native long CResult_InitDecodeErrorZ_clone(long orig);
3098         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
3099         public static native long CResult_OpenChannelDecodeErrorZ_ok(long o);
3100         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
3101         public static native long CResult_OpenChannelDecodeErrorZ_err(long e);
3102         // bool CResult_OpenChannelDecodeErrorZ_is_ok(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR o);
3103         public static native boolean CResult_OpenChannelDecodeErrorZ_is_ok(long o);
3104         // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
3105         public static native void CResult_OpenChannelDecodeErrorZ_free(long _res);
3106         // uintptr_t CResult_OpenChannelDecodeErrorZ_clone_ptr(LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR arg);
3107         public static native long CResult_OpenChannelDecodeErrorZ_clone_ptr(long arg);
3108         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
3109         public static native long CResult_OpenChannelDecodeErrorZ_clone(long orig);
3110         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
3111         public static native long CResult_RevokeAndACKDecodeErrorZ_ok(long o);
3112         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
3113         public static native long CResult_RevokeAndACKDecodeErrorZ_err(long e);
3114         // bool CResult_RevokeAndACKDecodeErrorZ_is_ok(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR o);
3115         public static native boolean CResult_RevokeAndACKDecodeErrorZ_is_ok(long o);
3116         // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
3117         public static native void CResult_RevokeAndACKDecodeErrorZ_free(long _res);
3118         // uintptr_t CResult_RevokeAndACKDecodeErrorZ_clone_ptr(LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR arg);
3119         public static native long CResult_RevokeAndACKDecodeErrorZ_clone_ptr(long arg);
3120         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
3121         public static native long CResult_RevokeAndACKDecodeErrorZ_clone(long orig);
3122         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
3123         public static native long CResult_ShutdownDecodeErrorZ_ok(long o);
3124         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
3125         public static native long CResult_ShutdownDecodeErrorZ_err(long e);
3126         // bool CResult_ShutdownDecodeErrorZ_is_ok(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR o);
3127         public static native boolean CResult_ShutdownDecodeErrorZ_is_ok(long o);
3128         // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
3129         public static native void CResult_ShutdownDecodeErrorZ_free(long _res);
3130         // uintptr_t CResult_ShutdownDecodeErrorZ_clone_ptr(LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR arg);
3131         public static native long CResult_ShutdownDecodeErrorZ_clone_ptr(long arg);
3132         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
3133         public static native long CResult_ShutdownDecodeErrorZ_clone(long orig);
3134         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
3135         public static native long CResult_UpdateFailHTLCDecodeErrorZ_ok(long o);
3136         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3137         public static native long CResult_UpdateFailHTLCDecodeErrorZ_err(long e);
3138         // bool CResult_UpdateFailHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR o);
3139         public static native boolean CResult_UpdateFailHTLCDecodeErrorZ_is_ok(long o);
3140         // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
3141         public static native void CResult_UpdateFailHTLCDecodeErrorZ_free(long _res);
3142         // uintptr_t CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR arg);
3143         public static native long CResult_UpdateFailHTLCDecodeErrorZ_clone_ptr(long arg);
3144         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
3145         public static native long CResult_UpdateFailHTLCDecodeErrorZ_clone(long orig);
3146         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
3147         public static native long CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(long o);
3148         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3149         public static native long CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(long e);
3150         // bool CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR o);
3151         public static native boolean CResult_UpdateFailMalformedHTLCDecodeErrorZ_is_ok(long o);
3152         // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
3153         public static native void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(long _res);
3154         // uintptr_t CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR arg);
3155         public static native long CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone_ptr(long arg);
3156         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
3157         public static native long CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(long orig);
3158         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
3159         public static native long CResult_UpdateFeeDecodeErrorZ_ok(long o);
3160         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
3161         public static native long CResult_UpdateFeeDecodeErrorZ_err(long e);
3162         // bool CResult_UpdateFeeDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR o);
3163         public static native boolean CResult_UpdateFeeDecodeErrorZ_is_ok(long o);
3164         // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
3165         public static native void CResult_UpdateFeeDecodeErrorZ_free(long _res);
3166         // uintptr_t CResult_UpdateFeeDecodeErrorZ_clone_ptr(LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR arg);
3167         public static native long CResult_UpdateFeeDecodeErrorZ_clone_ptr(long arg);
3168         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
3169         public static native long CResult_UpdateFeeDecodeErrorZ_clone(long orig);
3170         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
3171         public static native long CResult_UpdateFulfillHTLCDecodeErrorZ_ok(long o);
3172         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3173         public static native long CResult_UpdateFulfillHTLCDecodeErrorZ_err(long e);
3174         // bool CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR o);
3175         public static native boolean CResult_UpdateFulfillHTLCDecodeErrorZ_is_ok(long o);
3176         // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
3177         public static native void CResult_UpdateFulfillHTLCDecodeErrorZ_free(long _res);
3178         // uintptr_t CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR arg);
3179         public static native long CResult_UpdateFulfillHTLCDecodeErrorZ_clone_ptr(long arg);
3180         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
3181         public static native long CResult_UpdateFulfillHTLCDecodeErrorZ_clone(long orig);
3182         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
3183         public static native long CResult_UpdateAddHTLCDecodeErrorZ_ok(long o);
3184         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
3185         public static native long CResult_UpdateAddHTLCDecodeErrorZ_err(long e);
3186         // bool CResult_UpdateAddHTLCDecodeErrorZ_is_ok(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR o);
3187         public static native boolean CResult_UpdateAddHTLCDecodeErrorZ_is_ok(long o);
3188         // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
3189         public static native void CResult_UpdateAddHTLCDecodeErrorZ_free(long _res);
3190         // uintptr_t CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR arg);
3191         public static native long CResult_UpdateAddHTLCDecodeErrorZ_clone_ptr(long arg);
3192         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
3193         public static native long CResult_UpdateAddHTLCDecodeErrorZ_clone(long orig);
3194         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
3195         public static native long CResult_PingDecodeErrorZ_ok(long o);
3196         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
3197         public static native long CResult_PingDecodeErrorZ_err(long e);
3198         // bool CResult_PingDecodeErrorZ_is_ok(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR o);
3199         public static native boolean CResult_PingDecodeErrorZ_is_ok(long o);
3200         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
3201         public static native void CResult_PingDecodeErrorZ_free(long _res);
3202         // uintptr_t CResult_PingDecodeErrorZ_clone_ptr(LDKCResult_PingDecodeErrorZ *NONNULL_PTR arg);
3203         public static native long CResult_PingDecodeErrorZ_clone_ptr(long arg);
3204         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
3205         public static native long CResult_PingDecodeErrorZ_clone(long orig);
3206         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
3207         public static native long CResult_PongDecodeErrorZ_ok(long o);
3208         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
3209         public static native long CResult_PongDecodeErrorZ_err(long e);
3210         // bool CResult_PongDecodeErrorZ_is_ok(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR o);
3211         public static native boolean CResult_PongDecodeErrorZ_is_ok(long o);
3212         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
3213         public static native void CResult_PongDecodeErrorZ_free(long _res);
3214         // uintptr_t CResult_PongDecodeErrorZ_clone_ptr(LDKCResult_PongDecodeErrorZ *NONNULL_PTR arg);
3215         public static native long CResult_PongDecodeErrorZ_clone_ptr(long arg);
3216         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
3217         public static native long CResult_PongDecodeErrorZ_clone(long orig);
3218         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
3219         public static native long CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(long o);
3220         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
3221         public static native long CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(long e);
3222         // bool CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR o);
3223         public static native boolean CResult_UnsignedChannelAnnouncementDecodeErrorZ_is_ok(long o);
3224         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
3225         public static native void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(long _res);
3226         // uintptr_t CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR arg);
3227         public static native long CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone_ptr(long arg);
3228         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
3229         public static native long CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(long orig);
3230         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
3231         public static native long CResult_ChannelAnnouncementDecodeErrorZ_ok(long o);
3232         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
3233         public static native long CResult_ChannelAnnouncementDecodeErrorZ_err(long e);
3234         // bool CResult_ChannelAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR o);
3235         public static native boolean CResult_ChannelAnnouncementDecodeErrorZ_is_ok(long o);
3236         // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
3237         public static native void CResult_ChannelAnnouncementDecodeErrorZ_free(long _res);
3238         // uintptr_t CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR arg);
3239         public static native long CResult_ChannelAnnouncementDecodeErrorZ_clone_ptr(long arg);
3240         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
3241         public static native long CResult_ChannelAnnouncementDecodeErrorZ_clone(long orig);
3242         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
3243         public static native long CResult_UnsignedChannelUpdateDecodeErrorZ_ok(long o);
3244         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
3245         public static native long CResult_UnsignedChannelUpdateDecodeErrorZ_err(long e);
3246         // bool CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR o);
3247         public static native boolean CResult_UnsignedChannelUpdateDecodeErrorZ_is_ok(long o);
3248         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
3249         public static native void CResult_UnsignedChannelUpdateDecodeErrorZ_free(long _res);
3250         // uintptr_t CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR arg);
3251         public static native long CResult_UnsignedChannelUpdateDecodeErrorZ_clone_ptr(long arg);
3252         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
3253         public static native long CResult_UnsignedChannelUpdateDecodeErrorZ_clone(long orig);
3254         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
3255         public static native long CResult_ChannelUpdateDecodeErrorZ_ok(long o);
3256         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
3257         public static native long CResult_ChannelUpdateDecodeErrorZ_err(long e);
3258         // bool CResult_ChannelUpdateDecodeErrorZ_is_ok(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR o);
3259         public static native boolean CResult_ChannelUpdateDecodeErrorZ_is_ok(long o);
3260         // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
3261         public static native void CResult_ChannelUpdateDecodeErrorZ_free(long _res);
3262         // uintptr_t CResult_ChannelUpdateDecodeErrorZ_clone_ptr(LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR arg);
3263         public static native long CResult_ChannelUpdateDecodeErrorZ_clone_ptr(long arg);
3264         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
3265         public static native long CResult_ChannelUpdateDecodeErrorZ_clone(long orig);
3266         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
3267         public static native long CResult_ErrorMessageDecodeErrorZ_ok(long o);
3268         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
3269         public static native long CResult_ErrorMessageDecodeErrorZ_err(long e);
3270         // bool CResult_ErrorMessageDecodeErrorZ_is_ok(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR o);
3271         public static native boolean CResult_ErrorMessageDecodeErrorZ_is_ok(long o);
3272         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
3273         public static native void CResult_ErrorMessageDecodeErrorZ_free(long _res);
3274         // uintptr_t CResult_ErrorMessageDecodeErrorZ_clone_ptr(LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR arg);
3275         public static native long CResult_ErrorMessageDecodeErrorZ_clone_ptr(long arg);
3276         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
3277         public static native long CResult_ErrorMessageDecodeErrorZ_clone(long orig);
3278         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
3279         public static native long CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(long o);
3280         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
3281         public static native long CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(long e);
3282         // bool CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR o);
3283         public static native boolean CResult_UnsignedNodeAnnouncementDecodeErrorZ_is_ok(long o);
3284         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
3285         public static native void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(long _res);
3286         // uintptr_t CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR arg);
3287         public static native long CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone_ptr(long arg);
3288         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
3289         public static native long CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(long orig);
3290         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
3291         public static native long CResult_NodeAnnouncementDecodeErrorZ_ok(long o);
3292         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
3293         public static native long CResult_NodeAnnouncementDecodeErrorZ_err(long e);
3294         // bool CResult_NodeAnnouncementDecodeErrorZ_is_ok(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR o);
3295         public static native boolean CResult_NodeAnnouncementDecodeErrorZ_is_ok(long o);
3296         // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
3297         public static native void CResult_NodeAnnouncementDecodeErrorZ_free(long _res);
3298         // uintptr_t CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR arg);
3299         public static native long CResult_NodeAnnouncementDecodeErrorZ_clone_ptr(long arg);
3300         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
3301         public static native long CResult_NodeAnnouncementDecodeErrorZ_clone(long orig);
3302         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
3303         public static native long CResult_QueryShortChannelIdsDecodeErrorZ_ok(long o);
3304         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
3305         public static native long CResult_QueryShortChannelIdsDecodeErrorZ_err(long e);
3306         // bool CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR o);
3307         public static native boolean CResult_QueryShortChannelIdsDecodeErrorZ_is_ok(long o);
3308         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
3309         public static native void CResult_QueryShortChannelIdsDecodeErrorZ_free(long _res);
3310         // uintptr_t CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR arg);
3311         public static native long CResult_QueryShortChannelIdsDecodeErrorZ_clone_ptr(long arg);
3312         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
3313         public static native long CResult_QueryShortChannelIdsDecodeErrorZ_clone(long orig);
3314         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
3315         public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(long o);
3316         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
3317         public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(long e);
3318         // bool CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR o);
3319         public static native boolean CResult_ReplyShortChannelIdsEndDecodeErrorZ_is_ok(long o);
3320         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
3321         public static native void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(long _res);
3322         // uintptr_t CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR arg);
3323         public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone_ptr(long arg);
3324         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
3325         public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(long orig);
3326         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
3327         public static native long CResult_QueryChannelRangeDecodeErrorZ_ok(long o);
3328         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
3329         public static native long CResult_QueryChannelRangeDecodeErrorZ_err(long e);
3330         // bool CResult_QueryChannelRangeDecodeErrorZ_is_ok(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR o);
3331         public static native boolean CResult_QueryChannelRangeDecodeErrorZ_is_ok(long o);
3332         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
3333         public static native void CResult_QueryChannelRangeDecodeErrorZ_free(long _res);
3334         // uintptr_t CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR arg);
3335         public static native long CResult_QueryChannelRangeDecodeErrorZ_clone_ptr(long arg);
3336         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
3337         public static native long CResult_QueryChannelRangeDecodeErrorZ_clone(long orig);
3338         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
3339         public static native long CResult_ReplyChannelRangeDecodeErrorZ_ok(long o);
3340         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
3341         public static native long CResult_ReplyChannelRangeDecodeErrorZ_err(long e);
3342         // bool CResult_ReplyChannelRangeDecodeErrorZ_is_ok(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR o);
3343         public static native boolean CResult_ReplyChannelRangeDecodeErrorZ_is_ok(long o);
3344         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
3345         public static native void CResult_ReplyChannelRangeDecodeErrorZ_free(long _res);
3346         // uintptr_t CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR arg);
3347         public static native long CResult_ReplyChannelRangeDecodeErrorZ_clone_ptr(long arg);
3348         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
3349         public static native long CResult_ReplyChannelRangeDecodeErrorZ_clone(long orig);
3350         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
3351         public static native long CResult_GossipTimestampFilterDecodeErrorZ_ok(long o);
3352         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
3353         public static native long CResult_GossipTimestampFilterDecodeErrorZ_err(long e);
3354         // bool CResult_GossipTimestampFilterDecodeErrorZ_is_ok(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR o);
3355         public static native boolean CResult_GossipTimestampFilterDecodeErrorZ_is_ok(long o);
3356         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
3357         public static native void CResult_GossipTimestampFilterDecodeErrorZ_free(long _res);
3358         // uintptr_t CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR arg);
3359         public static native long CResult_GossipTimestampFilterDecodeErrorZ_clone_ptr(long arg);
3360         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
3361         public static native long CResult_GossipTimestampFilterDecodeErrorZ_clone(long orig);
3362         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_ok(struct LDKInvoice o);
3363         public static native long CResult_InvoiceSignOrCreationErrorZ_ok(long o);
3364         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e);
3365         public static native long CResult_InvoiceSignOrCreationErrorZ_err(long e);
3366         // bool CResult_InvoiceSignOrCreationErrorZ_is_ok(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR o);
3367         public static native boolean CResult_InvoiceSignOrCreationErrorZ_is_ok(long o);
3368         // void CResult_InvoiceSignOrCreationErrorZ_free(struct LDKCResult_InvoiceSignOrCreationErrorZ _res);
3369         public static native void CResult_InvoiceSignOrCreationErrorZ_free(long _res);
3370         // uintptr_t CResult_InvoiceSignOrCreationErrorZ_clone_ptr(LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR arg);
3371         public static native long CResult_InvoiceSignOrCreationErrorZ_clone_ptr(long arg);
3372         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig);
3373         public static native long CResult_InvoiceSignOrCreationErrorZ_clone(long orig);
3374         // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o);
3375         public static native long COption_FilterZ_some(long o);
3376         // struct LDKCOption_FilterZ COption_FilterZ_none(void);
3377         public static native long COption_FilterZ_none();
3378         // void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
3379         public static native void COption_FilterZ_free(long _res);
3380         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_ok(struct LDKLockedChannelMonitor o);
3381         public static native long CResult_LockedChannelMonitorNoneZ_ok(long o);
3382         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_err(void);
3383         public static native long CResult_LockedChannelMonitorNoneZ_err();
3384         // bool CResult_LockedChannelMonitorNoneZ_is_ok(const struct LDKCResult_LockedChannelMonitorNoneZ *NONNULL_PTR o);
3385         public static native boolean CResult_LockedChannelMonitorNoneZ_is_ok(long o);
3386         // void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res);
3387         public static native void CResult_LockedChannelMonitorNoneZ_free(long _res);
3388         // void CVec_OutPointZ_free(struct LDKCVec_OutPointZ _res);
3389         public static native void CVec_OutPointZ_free(long[] _res);
3390         // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
3391         public static native void PaymentPurpose_free(long this_ptr);
3392         // uintptr_t PaymentPurpose_clone_ptr(LDKPaymentPurpose *NONNULL_PTR arg);
3393         public static native long PaymentPurpose_clone_ptr(long arg);
3394         // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
3395         public static native long PaymentPurpose_clone(long orig);
3396         // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret);
3397         public static native long PaymentPurpose_invoice_payment(byte[] payment_preimage, byte[] payment_secret);
3398         // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
3399         public static native long PaymentPurpose_spontaneous_payment(byte[] a);
3400         // void ClosureReason_free(struct LDKClosureReason this_ptr);
3401         public static native void ClosureReason_free(long this_ptr);
3402         // uintptr_t ClosureReason_clone_ptr(LDKClosureReason *NONNULL_PTR arg);
3403         public static native long ClosureReason_clone_ptr(long arg);
3404         // struct LDKClosureReason ClosureReason_clone(const struct LDKClosureReason *NONNULL_PTR orig);
3405         public static native long ClosureReason_clone(long orig);
3406         // struct LDKClosureReason ClosureReason_counterparty_force_closed(struct LDKStr peer_msg);
3407         public static native long ClosureReason_counterparty_force_closed(String peer_msg);
3408         // struct LDKClosureReason ClosureReason_holder_force_closed(void);
3409         public static native long ClosureReason_holder_force_closed();
3410         // struct LDKClosureReason ClosureReason_cooperative_closure(void);
3411         public static native long ClosureReason_cooperative_closure();
3412         // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void);
3413         public static native long ClosureReason_commitment_tx_confirmed();
3414         // struct LDKClosureReason ClosureReason_funding_timed_out(void);
3415         public static native long ClosureReason_funding_timed_out();
3416         // struct LDKClosureReason ClosureReason_processing_error(struct LDKStr err);
3417         public static native long ClosureReason_processing_error(String err);
3418         // struct LDKClosureReason ClosureReason_disconnected_peer(void);
3419         public static native long ClosureReason_disconnected_peer();
3420         // struct LDKClosureReason ClosureReason_outdated_channel_manager(void);
3421         public static native long ClosureReason_outdated_channel_manager();
3422         // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
3423         public static native byte[] ClosureReason_write(long obj);
3424         // struct LDKCResult_COption_ClosureReasonZDecodeErrorZ ClosureReason_read(struct LDKu8slice ser);
3425         public static native long ClosureReason_read(byte[] ser);
3426         // void Event_free(struct LDKEvent this_ptr);
3427         public static native void Event_free(long this_ptr);
3428         // uintptr_t Event_clone_ptr(LDKEvent *NONNULL_PTR arg);
3429         public static native long Event_clone_ptr(long arg);
3430         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
3431         public static native long Event_clone(long orig);
3432         // 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);
3433         public static native long Event_funding_generation_ready(byte[] temporary_channel_id, long channel_value_satoshis, byte[] output_script, long user_channel_id);
3434         // struct LDKEvent Event_payment_received(struct LDKThirtyTwoBytes payment_hash, uint64_t amt, struct LDKPaymentPurpose purpose);
3435         public static native long Event_payment_received(byte[] payment_hash, long amt, long purpose);
3436         // struct LDKEvent Event_payment_sent(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z fee_paid_msat);
3437         public static native long Event_payment_sent(byte[] payment_id, byte[] payment_preimage, byte[] payment_hash, long fee_paid_msat);
3438         // struct LDKEvent Event_payment_path_failed(struct LDKThirtyTwoBytes payment_id, 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, struct LDKRouteParameters retry);
3439         public static native long Event_payment_path_failed(byte[] payment_id, byte[] payment_hash, boolean rejected_by_dest, long network_update, boolean all_paths_failed, long[] path, long short_channel_id, long retry);
3440         // struct LDKEvent Event_payment_failed(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash);
3441         public static native long Event_payment_failed(byte[] payment_id, byte[] payment_hash);
3442         // struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
3443         public static native long Event_pending_htlcs_forwardable(long time_forwardable);
3444         // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs);
3445         public static native long Event_spendable_outputs(long[] outputs);
3446         // struct LDKEvent Event_payment_forwarded(struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx);
3447         public static native long Event_payment_forwarded(long fee_earned_msat, boolean claim_from_onchain_tx);
3448         // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, uint64_t user_channel_id, struct LDKClosureReason reason);
3449         public static native long Event_channel_closed(byte[] channel_id, long user_channel_id, long reason);
3450         // struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction);
3451         public static native long Event_discard_funding(byte[] channel_id, byte[] transaction);
3452         // struct LDKEvent Event_payment_path_successful(struct LDKThirtyTwoBytes payment_id, struct LDKThirtyTwoBytes payment_hash, struct LDKCVec_RouteHopZ path);
3453         public static native long Event_payment_path_successful(byte[] payment_id, byte[] payment_hash, long[] path);
3454         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
3455         public static native byte[] Event_write(long obj);
3456         // struct LDKCResult_COption_EventZDecodeErrorZ Event_read(struct LDKu8slice ser);
3457         public static native long Event_read(byte[] ser);
3458         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
3459         public static native void MessageSendEvent_free(long this_ptr);
3460         // uintptr_t MessageSendEvent_clone_ptr(LDKMessageSendEvent *NONNULL_PTR arg);
3461         public static native long MessageSendEvent_clone_ptr(long arg);
3462         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
3463         public static native long MessageSendEvent_clone(long orig);
3464         // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel(struct LDKPublicKey node_id, struct LDKAcceptChannel msg);
3465         public static native long MessageSendEvent_send_accept_channel(byte[] node_id, long msg);
3466         // struct LDKMessageSendEvent MessageSendEvent_send_open_channel(struct LDKPublicKey node_id, struct LDKOpenChannel msg);
3467         public static native long MessageSendEvent_send_open_channel(byte[] node_id, long msg);
3468         // struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPublicKey node_id, struct LDKFundingCreated msg);
3469         public static native long MessageSendEvent_send_funding_created(byte[] node_id, long msg);
3470         // struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
3471         public static native long MessageSendEvent_send_funding_signed(byte[] node_id, long msg);
3472         // struct LDKMessageSendEvent MessageSendEvent_send_funding_locked(struct LDKPublicKey node_id, struct LDKFundingLocked msg);
3473         public static native long MessageSendEvent_send_funding_locked(byte[] node_id, long msg);
3474         // struct LDKMessageSendEvent MessageSendEvent_send_announcement_signatures(struct LDKPublicKey node_id, struct LDKAnnouncementSignatures msg);
3475         public static native long MessageSendEvent_send_announcement_signatures(byte[] node_id, long msg);
3476         // struct LDKMessageSendEvent MessageSendEvent_update_htlcs(struct LDKPublicKey node_id, struct LDKCommitmentUpdate updates);
3477         public static native long MessageSendEvent_update_htlcs(byte[] node_id, long updates);
3478         // struct LDKMessageSendEvent MessageSendEvent_send_revoke_and_ack(struct LDKPublicKey node_id, struct LDKRevokeAndACK msg);
3479         public static native long MessageSendEvent_send_revoke_and_ack(byte[] node_id, long msg);
3480         // struct LDKMessageSendEvent MessageSendEvent_send_closing_signed(struct LDKPublicKey node_id, struct LDKClosingSigned msg);
3481         public static native long MessageSendEvent_send_closing_signed(byte[] node_id, long msg);
3482         // struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey node_id, struct LDKShutdown msg);
3483         public static native long MessageSendEvent_send_shutdown(byte[] node_id, long msg);
3484         // struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
3485         public static native long MessageSendEvent_send_channel_reestablish(byte[] node_id, long msg);
3486         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
3487         public static native long MessageSendEvent_broadcast_channel_announcement(long msg, long update_msg);
3488         // struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
3489         public static native long MessageSendEvent_broadcast_node_announcement(long msg);
3490         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_update(struct LDKChannelUpdate msg);
3491         public static native long MessageSendEvent_broadcast_channel_update(long msg);
3492         // struct LDKMessageSendEvent MessageSendEvent_send_channel_update(struct LDKPublicKey node_id, struct LDKChannelUpdate msg);
3493         public static native long MessageSendEvent_send_channel_update(byte[] node_id, long msg);
3494         // struct LDKMessageSendEvent MessageSendEvent_handle_error(struct LDKPublicKey node_id, struct LDKErrorAction action);
3495         public static native long MessageSendEvent_handle_error(byte[] node_id, long action);
3496         // struct LDKMessageSendEvent MessageSendEvent_send_channel_range_query(struct LDKPublicKey node_id, struct LDKQueryChannelRange msg);
3497         public static native long MessageSendEvent_send_channel_range_query(byte[] node_id, long msg);
3498         // struct LDKMessageSendEvent MessageSendEvent_send_short_ids_query(struct LDKPublicKey node_id, struct LDKQueryShortChannelIds msg);
3499         public static native long MessageSendEvent_send_short_ids_query(byte[] node_id, long msg);
3500         // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
3501         public static native long MessageSendEvent_send_reply_channel_range(byte[] node_id, long msg);
3502         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
3503         public static native void MessageSendEventsProvider_free(long this_ptr);
3504         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
3505         public static native void EventsProvider_free(long this_ptr);
3506         // void EventHandler_free(struct LDKEventHandler this_ptr);
3507         public static native void EventHandler_free(long this_ptr);
3508         // void APIError_free(struct LDKAPIError this_ptr);
3509         public static native void APIError_free(long this_ptr);
3510         // uintptr_t APIError_clone_ptr(LDKAPIError *NONNULL_PTR arg);
3511         public static native long APIError_clone_ptr(long arg);
3512         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
3513         public static native long APIError_clone(long orig);
3514         // struct LDKAPIError APIError_apimisuse_error(struct LDKStr err);
3515         public static native long APIError_apimisuse_error(String err);
3516         // struct LDKAPIError APIError_fee_rate_too_high(struct LDKStr err, uint32_t feerate);
3517         public static native long APIError_fee_rate_too_high(String err, int feerate);
3518         // struct LDKAPIError APIError_route_error(struct LDKStr err);
3519         public static native long APIError_route_error(String err);
3520         // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
3521         public static native long APIError_channel_unavailable(String err);
3522         // struct LDKAPIError APIError_monitor_update_failed(void);
3523         public static native long APIError_monitor_update_failed();
3524         // struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
3525         public static native long APIError_incompatible_shutdown_script(long script);
3526         // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
3527         public static native long sign(byte[] msg, byte[] sk);
3528         // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
3529         public static native long recover_pk(byte[] msg, String sig);
3530         // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
3531         public static native boolean verify(byte[] msg, String sig, byte[] pk);
3532         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
3533         public static native Level Level_clone(long orig);
3534         // enum LDKLevel Level_gossip(void);
3535         public static native Level Level_gossip();
3536         // enum LDKLevel Level_trace(void);
3537         public static native Level Level_trace();
3538         // enum LDKLevel Level_debug(void);
3539         public static native Level Level_debug();
3540         // enum LDKLevel Level_info(void);
3541         public static native Level Level_info();
3542         // enum LDKLevel Level_warn(void);
3543         public static native Level Level_warn();
3544         // enum LDKLevel Level_error(void);
3545         public static native Level Level_error();
3546         // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
3547         public static native boolean Level_eq(long a, long b);
3548         // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
3549         public static native long Level_hash(long o);
3550         // MUST_USE_RES enum LDKLevel Level_max(void);
3551         public static native Level Level_max();
3552         // void Record_free(struct LDKRecord this_obj);
3553         public static native void Record_free(long this_obj);
3554         // enum LDKLevel Record_get_level(const struct LDKRecord *NONNULL_PTR this_ptr);
3555         public static native Level Record_get_level(long this_ptr);
3556         // void Record_set_level(struct LDKRecord *NONNULL_PTR this_ptr, enum LDKLevel val);
3557         public static native void Record_set_level(long this_ptr, Level val);
3558         // struct LDKStr Record_get_args(const struct LDKRecord *NONNULL_PTR this_ptr);
3559         public static native String Record_get_args(long this_ptr);
3560         // void Record_set_args(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
3561         public static native void Record_set_args(long this_ptr, String val);
3562         // struct LDKStr Record_get_module_path(const struct LDKRecord *NONNULL_PTR this_ptr);
3563         public static native String Record_get_module_path(long this_ptr);
3564         // void Record_set_module_path(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
3565         public static native void Record_set_module_path(long this_ptr, String val);
3566         // struct LDKStr Record_get_file(const struct LDKRecord *NONNULL_PTR this_ptr);
3567         public static native String Record_get_file(long this_ptr);
3568         // void Record_set_file(struct LDKRecord *NONNULL_PTR this_ptr, struct LDKStr val);
3569         public static native void Record_set_file(long this_ptr, String val);
3570         // uint32_t Record_get_line(const struct LDKRecord *NONNULL_PTR this_ptr);
3571         public static native int Record_get_line(long this_ptr);
3572         // void Record_set_line(struct LDKRecord *NONNULL_PTR this_ptr, uint32_t val);
3573         public static native void Record_set_line(long this_ptr, int val);
3574         // uintptr_t Record_clone_ptr(LDKRecord *NONNULL_PTR arg);
3575         public static native long Record_clone_ptr(long arg);
3576         // struct LDKRecord Record_clone(const struct LDKRecord *NONNULL_PTR orig);
3577         public static native long Record_clone(long orig);
3578         // void Logger_free(struct LDKLogger this_ptr);
3579         public static native void Logger_free(long this_ptr);
3580         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
3581         public static native void ChannelHandshakeConfig_free(long this_obj);
3582         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
3583         public static native int ChannelHandshakeConfig_get_minimum_depth(long this_ptr);
3584         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
3585         public static native void ChannelHandshakeConfig_set_minimum_depth(long this_ptr, int val);
3586         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
3587         public static native short ChannelHandshakeConfig_get_our_to_self_delay(long this_ptr);
3588         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
3589         public static native void ChannelHandshakeConfig_set_our_to_self_delay(long this_ptr, short val);
3590         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
3591         public static native long ChannelHandshakeConfig_get_our_htlc_minimum_msat(long this_ptr);
3592         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
3593         public static native void ChannelHandshakeConfig_set_our_htlc_minimum_msat(long this_ptr, long val);
3594         // 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);
3595         public static native long ChannelHandshakeConfig_new(int minimum_depth_arg, short our_to_self_delay_arg, long our_htlc_minimum_msat_arg);
3596         // uintptr_t ChannelHandshakeConfig_clone_ptr(LDKChannelHandshakeConfig *NONNULL_PTR arg);
3597         public static native long ChannelHandshakeConfig_clone_ptr(long arg);
3598         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
3599         public static native long ChannelHandshakeConfig_clone(long orig);
3600         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
3601         public static native long ChannelHandshakeConfig_default();
3602         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
3603         public static native void ChannelHandshakeLimits_free(long this_obj);
3604         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3605         public static native long ChannelHandshakeLimits_get_min_funding_satoshis(long this_ptr);
3606         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
3607         public static native void ChannelHandshakeLimits_set_min_funding_satoshis(long this_ptr, long val);
3608         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3609         public static native long ChannelHandshakeLimits_get_max_htlc_minimum_msat(long this_ptr);
3610         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
3611         public static native void ChannelHandshakeLimits_set_max_htlc_minimum_msat(long this_ptr, long val);
3612         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3613         public static native long ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(long this_ptr);
3614         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
3615         public static native void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(long this_ptr, long val);
3616         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3617         public static native long ChannelHandshakeLimits_get_max_channel_reserve_satoshis(long this_ptr);
3618         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
3619         public static native void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(long this_ptr, long val);
3620         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3621         public static native short ChannelHandshakeLimits_get_min_max_accepted_htlcs(long this_ptr);
3622         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
3623         public static native void ChannelHandshakeLimits_set_min_max_accepted_htlcs(long this_ptr, short val);
3624         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3625         public static native int ChannelHandshakeLimits_get_max_minimum_depth(long this_ptr);
3626         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
3627         public static native void ChannelHandshakeLimits_set_max_minimum_depth(long this_ptr, int val);
3628         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3629         public static native boolean ChannelHandshakeLimits_get_force_announced_channel_preference(long this_ptr);
3630         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
3631         public static native void ChannelHandshakeLimits_set_force_announced_channel_preference(long this_ptr, boolean val);
3632         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
3633         public static native short ChannelHandshakeLimits_get_their_to_self_delay(long this_ptr);
3634         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
3635         public static native void ChannelHandshakeLimits_set_their_to_self_delay(long this_ptr, short val);
3636         // 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);
3637         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);
3638         // uintptr_t ChannelHandshakeLimits_clone_ptr(LDKChannelHandshakeLimits *NONNULL_PTR arg);
3639         public static native long ChannelHandshakeLimits_clone_ptr(long arg);
3640         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
3641         public static native long ChannelHandshakeLimits_clone(long orig);
3642         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
3643         public static native long ChannelHandshakeLimits_default();
3644         // void ChannelConfig_free(struct LDKChannelConfig this_obj);
3645         public static native void ChannelConfig_free(long this_obj);
3646         // uint32_t ChannelConfig_get_forwarding_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
3647         public static native int ChannelConfig_get_forwarding_fee_proportional_millionths(long this_ptr);
3648         // void ChannelConfig_set_forwarding_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
3649         public static native void ChannelConfig_set_forwarding_fee_proportional_millionths(long this_ptr, int val);
3650         // uint32_t ChannelConfig_get_forwarding_fee_base_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
3651         public static native int ChannelConfig_get_forwarding_fee_base_msat(long this_ptr);
3652         // void ChannelConfig_set_forwarding_fee_base_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
3653         public static native void ChannelConfig_set_forwarding_fee_base_msat(long this_ptr, int val);
3654         // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
3655         public static native short ChannelConfig_get_cltv_expiry_delta(long this_ptr);
3656         // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
3657         public static native void ChannelConfig_set_cltv_expiry_delta(long this_ptr, short val);
3658         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
3659         public static native boolean ChannelConfig_get_announced_channel(long this_ptr);
3660         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
3661         public static native void ChannelConfig_set_announced_channel(long this_ptr, boolean val);
3662         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
3663         public static native boolean ChannelConfig_get_commit_upfront_shutdown_pubkey(long this_ptr);
3664         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
3665         public static native void ChannelConfig_set_commit_upfront_shutdown_pubkey(long this_ptr, boolean val);
3666         // uint64_t ChannelConfig_get_max_dust_htlc_exposure_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
3667         public static native long ChannelConfig_get_max_dust_htlc_exposure_msat(long this_ptr);
3668         // void ChannelConfig_set_max_dust_htlc_exposure_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
3669         public static native void ChannelConfig_set_max_dust_htlc_exposure_msat(long this_ptr, long val);
3670         // uint64_t ChannelConfig_get_force_close_avoidance_max_fee_satoshis(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
3671         public static native long ChannelConfig_get_force_close_avoidance_max_fee_satoshis(long this_ptr);
3672         // void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
3673         public static native void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(long this_ptr, long val);
3674         // 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);
3675         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);
3676         // uintptr_t ChannelConfig_clone_ptr(LDKChannelConfig *NONNULL_PTR arg);
3677         public static native long ChannelConfig_clone_ptr(long arg);
3678         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
3679         public static native long ChannelConfig_clone(long orig);
3680         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
3681         public static native long ChannelConfig_default();
3682         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
3683         public static native byte[] ChannelConfig_write(long obj);
3684         // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
3685         public static native long ChannelConfig_read(byte[] ser);
3686         // void UserConfig_free(struct LDKUserConfig this_obj);
3687         public static native void UserConfig_free(long this_obj);
3688         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
3689         public static native long UserConfig_get_own_channel_config(long this_ptr);
3690         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
3691         public static native void UserConfig_set_own_channel_config(long this_ptr, long val);
3692         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
3693         public static native long UserConfig_get_peer_channel_config_limits(long this_ptr);
3694         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
3695         public static native void UserConfig_set_peer_channel_config_limits(long this_ptr, long val);
3696         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
3697         public static native long UserConfig_get_channel_options(long this_ptr);
3698         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
3699         public static native void UserConfig_set_channel_options(long this_ptr, long val);
3700         // bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
3701         public static native boolean UserConfig_get_accept_forwards_to_priv_channels(long this_ptr);
3702         // void UserConfig_set_accept_forwards_to_priv_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
3703         public static native void UserConfig_set_accept_forwards_to_priv_channels(long this_ptr, boolean val);
3704         // bool UserConfig_get_accept_inbound_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
3705         public static native boolean UserConfig_get_accept_inbound_channels(long this_ptr);
3706         // void UserConfig_set_accept_inbound_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
3707         public static native void UserConfig_set_accept_inbound_channels(long this_ptr, boolean val);
3708         // 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, bool accept_inbound_channels_arg);
3709         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, boolean accept_inbound_channels_arg);
3710         // uintptr_t UserConfig_clone_ptr(LDKUserConfig *NONNULL_PTR arg);
3711         public static native long UserConfig_clone_ptr(long arg);
3712         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
3713         public static native long UserConfig_clone(long orig);
3714         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
3715         public static native long UserConfig_default();
3716         // void BestBlock_free(struct LDKBestBlock this_obj);
3717         public static native void BestBlock_free(long this_obj);
3718         // uintptr_t BestBlock_clone_ptr(LDKBestBlock *NONNULL_PTR arg);
3719         public static native long BestBlock_clone_ptr(long arg);
3720         // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
3721         public static native long BestBlock_clone(long orig);
3722         // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
3723         public static native long BestBlock_from_genesis(Network network);
3724         // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
3725         public static native long BestBlock_new(byte[] block_hash, int height);
3726         // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
3727         public static native byte[] BestBlock_block_hash(long this_arg);
3728         // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
3729         public static native int BestBlock_height(long this_arg);
3730         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
3731         public static native AccessError AccessError_clone(long orig);
3732         // enum LDKAccessError AccessError_unknown_chain(void);
3733         public static native AccessError AccessError_unknown_chain();
3734         // enum LDKAccessError AccessError_unknown_tx(void);
3735         public static native AccessError AccessError_unknown_tx();
3736         // void Access_free(struct LDKAccess this_ptr);
3737         public static native void Access_free(long this_ptr);
3738         // void Listen_free(struct LDKListen this_ptr);
3739         public static native void Listen_free(long this_ptr);
3740         // void Confirm_free(struct LDKConfirm this_ptr);
3741         public static native void Confirm_free(long this_ptr);
3742         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
3743         public static native ChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(long orig);
3744         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
3745         public static native ChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure();
3746         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
3747         public static native ChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure();
3748         // void Watch_free(struct LDKWatch this_ptr);
3749         public static native void Watch_free(long this_ptr);
3750         // void Filter_free(struct LDKFilter this_ptr);
3751         public static native void Filter_free(long this_ptr);
3752         // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
3753         public static native void WatchedOutput_free(long this_obj);
3754         // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
3755         public static native byte[] WatchedOutput_get_block_hash(long this_ptr);
3756         // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3757         public static native void WatchedOutput_set_block_hash(long this_ptr, byte[] val);
3758         // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
3759         public static native long WatchedOutput_get_outpoint(long this_ptr);
3760         // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
3761         public static native void WatchedOutput_set_outpoint(long this_ptr, long val);
3762         // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
3763         public static native byte[] WatchedOutput_get_script_pubkey(long this_ptr);
3764         // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
3765         public static native void WatchedOutput_set_script_pubkey(long this_ptr, byte[] val);
3766         // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
3767         public static native long WatchedOutput_new(byte[] block_hash_arg, long outpoint_arg, byte[] script_pubkey_arg);
3768         // uintptr_t WatchedOutput_clone_ptr(LDKWatchedOutput *NONNULL_PTR arg);
3769         public static native long WatchedOutput_clone_ptr(long arg);
3770         // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
3771         public static native long WatchedOutput_clone(long orig);
3772         // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
3773         public static native long WatchedOutput_hash(long o);
3774         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
3775         public static native void BroadcasterInterface_free(long this_ptr);
3776         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
3777         public static native ConfirmationTarget ConfirmationTarget_clone(long orig);
3778         // enum LDKConfirmationTarget ConfirmationTarget_background(void);
3779         public static native ConfirmationTarget ConfirmationTarget_background();
3780         // enum LDKConfirmationTarget ConfirmationTarget_normal(void);
3781         public static native ConfirmationTarget ConfirmationTarget_normal();
3782         // enum LDKConfirmationTarget ConfirmationTarget_high_priority(void);
3783         public static native ConfirmationTarget ConfirmationTarget_high_priority();
3784         // bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b);
3785         public static native boolean ConfirmationTarget_eq(long a, long b);
3786         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
3787         public static native void FeeEstimator_free(long this_ptr);
3788         // void MonitorUpdateId_free(struct LDKMonitorUpdateId this_obj);
3789         public static native void MonitorUpdateId_free(long this_obj);
3790         // uintptr_t MonitorUpdateId_clone_ptr(LDKMonitorUpdateId *NONNULL_PTR arg);
3791         public static native long MonitorUpdateId_clone_ptr(long arg);
3792         // struct LDKMonitorUpdateId MonitorUpdateId_clone(const struct LDKMonitorUpdateId *NONNULL_PTR orig);
3793         public static native long MonitorUpdateId_clone(long orig);
3794         // uint64_t MonitorUpdateId_hash(const struct LDKMonitorUpdateId *NONNULL_PTR o);
3795         public static native long MonitorUpdateId_hash(long o);
3796         // bool MonitorUpdateId_eq(const struct LDKMonitorUpdateId *NONNULL_PTR a, const struct LDKMonitorUpdateId *NONNULL_PTR b);
3797         public static native boolean MonitorUpdateId_eq(long a, long b);
3798         // void Persist_free(struct LDKPersist this_ptr);
3799         public static native void Persist_free(long this_ptr);
3800         // void LockedChannelMonitor_free(struct LDKLockedChannelMonitor this_obj);
3801         public static native void LockedChannelMonitor_free(long this_obj);
3802         // void ChainMonitor_free(struct LDKChainMonitor this_obj);
3803         public static native void ChainMonitor_free(long this_obj);
3804         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKCOption_FilterZ chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
3805         public static native long ChainMonitor_new(long chain_source, long broadcaster, long logger, long feeest, long persister);
3806         // MUST_USE_RES struct LDKCVec_BalanceZ ChainMonitor_get_claimable_balances(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKCVec_ChannelDetailsZ ignored_channels);
3807         public static native long[] ChainMonitor_get_claimable_balances(long this_arg, long[] ignored_channels);
3808         // MUST_USE_RES struct LDKCResult_LockedChannelMonitorNoneZ ChainMonitor_get_monitor(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo);
3809         public static native long ChainMonitor_get_monitor(long this_arg, long funding_txo);
3810         // MUST_USE_RES struct LDKCVec_OutPointZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
3811         public static native long[] ChainMonitor_list_monitors(long this_arg);
3812         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChainMonitor_channel_monitor_updated(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKMonitorUpdateId completed_update_id);
3813         public static native long ChainMonitor_channel_monitor_updated(long this_arg, long funding_txo, long completed_update_id);
3814         // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
3815         public static native long ChainMonitor_as_Listen(long this_arg);
3816         // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
3817         public static native long ChainMonitor_as_Confirm(long this_arg);
3818         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
3819         public static native long ChainMonitor_as_Watch(long this_arg);
3820         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
3821         public static native long ChainMonitor_as_EventsProvider(long this_arg);
3822         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
3823         public static native void ChannelMonitorUpdate_free(long this_obj);
3824         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
3825         public static native long ChannelMonitorUpdate_get_update_id(long this_ptr);
3826         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
3827         public static native void ChannelMonitorUpdate_set_update_id(long this_ptr, long val);
3828         // uintptr_t ChannelMonitorUpdate_clone_ptr(LDKChannelMonitorUpdate *NONNULL_PTR arg);
3829         public static native long ChannelMonitorUpdate_clone_ptr(long arg);
3830         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
3831         public static native long ChannelMonitorUpdate_clone(long orig);
3832         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
3833         public static native byte[] ChannelMonitorUpdate_write(long obj);
3834         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
3835         public static native long ChannelMonitorUpdate_read(byte[] ser);
3836         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
3837         public static native void MonitorEvent_free(long this_ptr);
3838         // uintptr_t MonitorEvent_clone_ptr(LDKMonitorEvent *NONNULL_PTR arg);
3839         public static native long MonitorEvent_clone_ptr(long arg);
3840         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
3841         public static native long MonitorEvent_clone(long orig);
3842         // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
3843         public static native long MonitorEvent_htlcevent(long a);
3844         // struct LDKMonitorEvent MonitorEvent_commitment_tx_confirmed(struct LDKOutPoint a);
3845         public static native long MonitorEvent_commitment_tx_confirmed(long a);
3846         // struct LDKMonitorEvent MonitorEvent_update_completed(struct LDKOutPoint funding_txo, uint64_t monitor_update_id);
3847         public static native long MonitorEvent_update_completed(long funding_txo, long monitor_update_id);
3848         // struct LDKMonitorEvent MonitorEvent_update_failed(struct LDKOutPoint a);
3849         public static native long MonitorEvent_update_failed(long a);
3850         // struct LDKCVec_u8Z MonitorEvent_write(const struct LDKMonitorEvent *NONNULL_PTR obj);
3851         public static native byte[] MonitorEvent_write(long obj);
3852         // struct LDKCResult_COption_MonitorEventZDecodeErrorZ MonitorEvent_read(struct LDKu8slice ser);
3853         public static native long MonitorEvent_read(byte[] ser);
3854         // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
3855         public static native void HTLCUpdate_free(long this_obj);
3856         // uintptr_t HTLCUpdate_clone_ptr(LDKHTLCUpdate *NONNULL_PTR arg);
3857         public static native long HTLCUpdate_clone_ptr(long arg);
3858         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
3859         public static native long HTLCUpdate_clone(long orig);
3860         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
3861         public static native byte[] HTLCUpdate_write(long obj);
3862         // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
3863         public static native long HTLCUpdate_read(byte[] ser);
3864         // void Balance_free(struct LDKBalance this_ptr);
3865         public static native void Balance_free(long this_ptr);
3866         // uintptr_t Balance_clone_ptr(LDKBalance *NONNULL_PTR arg);
3867         public static native long Balance_clone_ptr(long arg);
3868         // struct LDKBalance Balance_clone(const struct LDKBalance *NONNULL_PTR orig);
3869         public static native long Balance_clone(long orig);
3870         // struct LDKBalance Balance_claimable_on_channel_close(uint64_t claimable_amount_satoshis);
3871         public static native long Balance_claimable_on_channel_close(long claimable_amount_satoshis);
3872         // struct LDKBalance Balance_claimable_awaiting_confirmations(uint64_t claimable_amount_satoshis, uint32_t confirmation_height);
3873         public static native long Balance_claimable_awaiting_confirmations(long claimable_amount_satoshis, int confirmation_height);
3874         // struct LDKBalance Balance_contentious_claimable(uint64_t claimable_amount_satoshis, uint32_t timeout_height);
3875         public static native long Balance_contentious_claimable(long claimable_amount_satoshis, int timeout_height);
3876         // struct LDKBalance Balance_maybe_claimable_htlcawaiting_timeout(uint64_t claimable_amount_satoshis, uint32_t claimable_height);
3877         public static native long Balance_maybe_claimable_htlcawaiting_timeout(long claimable_amount_satoshis, int claimable_height);
3878         // bool Balance_eq(const struct LDKBalance *NONNULL_PTR a, const struct LDKBalance *NONNULL_PTR b);
3879         public static native boolean Balance_eq(long a, long b);
3880         // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
3881         public static native void ChannelMonitor_free(long this_obj);
3882         // uintptr_t ChannelMonitor_clone_ptr(LDKChannelMonitor *NONNULL_PTR arg);
3883         public static native long ChannelMonitor_clone_ptr(long arg);
3884         // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
3885         public static native long ChannelMonitor_clone(long orig);
3886         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
3887         public static native byte[] ChannelMonitor_write(long obj);
3888         // MUST_USE_RES struct LDKCResult_NoneNoneZ 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);
3889         public static native long ChannelMonitor_update_monitor(long this_arg, long updates, long broadcaster, long fee_estimator, long logger);
3890         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
3891         public static native long ChannelMonitor_get_latest_update_id(long this_arg);
3892         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
3893         public static native long ChannelMonitor_get_funding_txo(long this_arg);
3894         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
3895         public static native long[] ChannelMonitor_get_outputs_to_watch(long this_arg);
3896         // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
3897         public static native void ChannelMonitor_load_outputs_to_watch(long this_arg, long filter);
3898         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
3899         public static native long[] ChannelMonitor_get_and_clear_pending_monitor_events(long this_arg);
3900         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
3901         public static native long[] ChannelMonitor_get_and_clear_pending_events(long this_arg);
3902         // 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);
3903         public static native byte[][] ChannelMonitor_get_latest_holder_commitment_txn(long this_arg, long logger);
3904         // 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);
3905         public static native long[] ChannelMonitor_block_connected(long this_arg, byte[] header, long[] txdata, int height, long broadcaster, long fee_estimator, long logger);
3906         // 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);
3907         public static native void ChannelMonitor_block_disconnected(long this_arg, byte[] header, int height, long broadcaster, long fee_estimator, long logger);
3908         // 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);
3909         public static native long[] ChannelMonitor_transactions_confirmed(long this_arg, byte[] header, long[] txdata, int height, long broadcaster, long fee_estimator, long logger);
3910         // 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);
3911         public static native void ChannelMonitor_transaction_unconfirmed(long this_arg, byte[] txid, long broadcaster, long fee_estimator, long logger);
3912         // 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);
3913         public static native long[] ChannelMonitor_best_block_updated(long this_arg, byte[] header, int height, long broadcaster, long fee_estimator, long logger);
3914         // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
3915         public static native byte[][] ChannelMonitor_get_relevant_txids(long this_arg);
3916         // MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
3917         public static native long ChannelMonitor_current_best_block(long this_arg);
3918         // MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
3919         public static native long[] ChannelMonitor_get_claimable_balances(long this_arg);
3920         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
3921         public static native long C2Tuple_BlockHashChannelMonitorZ_read(byte[] ser, long arg);
3922         // void OutPoint_free(struct LDKOutPoint this_obj);
3923         public static native void OutPoint_free(long this_obj);
3924         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
3925         public static native byte[] OutPoint_get_txid(long this_ptr);
3926         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3927         public static native void OutPoint_set_txid(long this_ptr, byte[] val);
3928         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
3929         public static native short OutPoint_get_index(long this_ptr);
3930         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
3931         public static native void OutPoint_set_index(long this_ptr, short val);
3932         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
3933         public static native long OutPoint_new(byte[] txid_arg, short index_arg);
3934         // uintptr_t OutPoint_clone_ptr(LDKOutPoint *NONNULL_PTR arg);
3935         public static native long OutPoint_clone_ptr(long arg);
3936         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
3937         public static native long OutPoint_clone(long orig);
3938         // bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b);
3939         public static native boolean OutPoint_eq(long a, long b);
3940         // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
3941         public static native long OutPoint_hash(long o);
3942         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
3943         public static native byte[] OutPoint_to_channel_id(long this_arg);
3944         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
3945         public static native byte[] OutPoint_write(long obj);
3946         // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
3947         public static native long OutPoint_read(byte[] ser);
3948         // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
3949         public static native void DelayedPaymentOutputDescriptor_free(long this_obj);
3950         // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
3951         public static native long DelayedPaymentOutputDescriptor_get_outpoint(long this_ptr);
3952         // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
3953         public static native void DelayedPaymentOutputDescriptor_set_outpoint(long this_ptr, long val);
3954         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
3955         public static native byte[] DelayedPaymentOutputDescriptor_get_per_commitment_point(long this_ptr);
3956         // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3957         public static native void DelayedPaymentOutputDescriptor_set_per_commitment_point(long this_ptr, byte[] val);
3958         // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
3959         public static native short DelayedPaymentOutputDescriptor_get_to_self_delay(long this_ptr);
3960         // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
3961         public static native void DelayedPaymentOutputDescriptor_set_to_self_delay(long this_ptr, short val);
3962         // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
3963         public static native void DelayedPaymentOutputDescriptor_set_output(long this_ptr, long val);
3964         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
3965         public static native byte[] DelayedPaymentOutputDescriptor_get_revocation_pubkey(long this_ptr);
3966         // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
3967         public static native void DelayedPaymentOutputDescriptor_set_revocation_pubkey(long this_ptr, byte[] val);
3968         // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
3969         public static native byte[] DelayedPaymentOutputDescriptor_get_channel_keys_id(long this_ptr);
3970         // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3971         public static native void DelayedPaymentOutputDescriptor_set_channel_keys_id(long this_ptr, byte[] val);
3972         // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
3973         public static native long DelayedPaymentOutputDescriptor_get_channel_value_satoshis(long this_ptr);
3974         // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
3975         public static native void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(long this_ptr, long val);
3976         // 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);
3977         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);
3978         // uintptr_t DelayedPaymentOutputDescriptor_clone_ptr(LDKDelayedPaymentOutputDescriptor *NONNULL_PTR arg);
3979         public static native long DelayedPaymentOutputDescriptor_clone_ptr(long arg);
3980         // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
3981         public static native long DelayedPaymentOutputDescriptor_clone(long orig);
3982         // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
3983         public static native byte[] DelayedPaymentOutputDescriptor_write(long obj);
3984         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
3985         public static native long DelayedPaymentOutputDescriptor_read(byte[] ser);
3986         // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
3987         public static native void StaticPaymentOutputDescriptor_free(long this_obj);
3988         // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
3989         public static native long StaticPaymentOutputDescriptor_get_outpoint(long this_ptr);
3990         // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
3991         public static native void StaticPaymentOutputDescriptor_set_outpoint(long this_ptr, long val);
3992         // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
3993         public static native void StaticPaymentOutputDescriptor_set_output(long this_ptr, long val);
3994         // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
3995         public static native byte[] StaticPaymentOutputDescriptor_get_channel_keys_id(long this_ptr);
3996         // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
3997         public static native void StaticPaymentOutputDescriptor_set_channel_keys_id(long this_ptr, byte[] val);
3998         // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
3999         public static native long StaticPaymentOutputDescriptor_get_channel_value_satoshis(long this_ptr);
4000         // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
4001         public static native void StaticPaymentOutputDescriptor_set_channel_value_satoshis(long this_ptr, long val);
4002         // 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);
4003         public static native long StaticPaymentOutputDescriptor_new(long outpoint_arg, long output_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg);
4004         // uintptr_t StaticPaymentOutputDescriptor_clone_ptr(LDKStaticPaymentOutputDescriptor *NONNULL_PTR arg);
4005         public static native long StaticPaymentOutputDescriptor_clone_ptr(long arg);
4006         // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
4007         public static native long StaticPaymentOutputDescriptor_clone(long orig);
4008         // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
4009         public static native byte[] StaticPaymentOutputDescriptor_write(long obj);
4010         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
4011         public static native long StaticPaymentOutputDescriptor_read(byte[] ser);
4012         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
4013         public static native void SpendableOutputDescriptor_free(long this_ptr);
4014         // uintptr_t SpendableOutputDescriptor_clone_ptr(LDKSpendableOutputDescriptor *NONNULL_PTR arg);
4015         public static native long SpendableOutputDescriptor_clone_ptr(long arg);
4016         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
4017         public static native long SpendableOutputDescriptor_clone(long orig);
4018         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output);
4019         public static native long SpendableOutputDescriptor_static_output(long outpoint, long output);
4020         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
4021         public static native long SpendableOutputDescriptor_delayed_payment_output(long a);
4022         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
4023         public static native long SpendableOutputDescriptor_static_payment_output(long a);
4024         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
4025         public static native byte[] SpendableOutputDescriptor_write(long obj);
4026         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
4027         public static native long SpendableOutputDescriptor_read(byte[] ser);
4028         // void BaseSign_free(struct LDKBaseSign this_ptr);
4029         public static native void BaseSign_free(long this_ptr);
4030         // uintptr_t Sign_clone_ptr(LDKSign *NONNULL_PTR arg);
4031         public static native long Sign_clone_ptr(long arg);
4032         // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
4033         public static native long Sign_clone(long orig);
4034         // void Sign_free(struct LDKSign this_ptr);
4035         public static native void Sign_free(long this_ptr);
4036         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
4037         public static native void KeysInterface_free(long this_ptr);
4038         // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
4039         public static native void InMemorySigner_free(long this_obj);
4040         // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
4041         public static native byte[] InMemorySigner_get_funding_key(long this_ptr);
4042         // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
4043         public static native void InMemorySigner_set_funding_key(long this_ptr, byte[] val);
4044         // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
4045         public static native byte[] InMemorySigner_get_revocation_base_key(long this_ptr);
4046         // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
4047         public static native void InMemorySigner_set_revocation_base_key(long this_ptr, byte[] val);
4048         // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
4049         public static native byte[] InMemorySigner_get_payment_key(long this_ptr);
4050         // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
4051         public static native void InMemorySigner_set_payment_key(long this_ptr, byte[] val);
4052         // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
4053         public static native byte[] InMemorySigner_get_delayed_payment_base_key(long this_ptr);
4054         // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
4055         public static native void InMemorySigner_set_delayed_payment_base_key(long this_ptr, byte[] val);
4056         // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
4057         public static native byte[] InMemorySigner_get_htlc_base_key(long this_ptr);
4058         // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
4059         public static native void InMemorySigner_set_htlc_base_key(long this_ptr, byte[] val);
4060         // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
4061         public static native byte[] InMemorySigner_get_commitment_seed(long this_ptr);
4062         // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4063         public static native void InMemorySigner_set_commitment_seed(long this_ptr, byte[] val);
4064         // uintptr_t InMemorySigner_clone_ptr(LDKInMemorySigner *NONNULL_PTR arg);
4065         public static native long InMemorySigner_clone_ptr(long arg);
4066         // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
4067         public static native long InMemorySigner_clone(long orig);
4068         // 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);
4069         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);
4070         // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
4071         public static native long InMemorySigner_counterparty_pubkeys(long this_arg);
4072         // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
4073         public static native short InMemorySigner_counterparty_selected_contest_delay(long this_arg);
4074         // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
4075         public static native short InMemorySigner_holder_selected_contest_delay(long this_arg);
4076         // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
4077         public static native boolean InMemorySigner_is_outbound(long this_arg);
4078         // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
4079         public static native long InMemorySigner_funding_outpoint(long this_arg);
4080         // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
4081         public static native long InMemorySigner_get_channel_parameters(long this_arg);
4082         // MUST_USE_RES bool InMemorySigner_opt_anchors(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
4083         public static native boolean InMemorySigner_opt_anchors(long this_arg);
4084         // 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);
4085         public static native long InMemorySigner_sign_counterparty_payment_input(long this_arg, byte[] spend_tx, long input_idx, long descriptor);
4086         // 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);
4087         public static native long InMemorySigner_sign_dynamic_p2wsh_input(long this_arg, byte[] spend_tx, long input_idx, long descriptor);
4088         // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
4089         public static native long InMemorySigner_as_BaseSign(long this_arg);
4090         // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
4091         public static native long InMemorySigner_as_Sign(long this_arg);
4092         // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
4093         public static native byte[] InMemorySigner_write(long obj);
4094         // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
4095         public static native long InMemorySigner_read(byte[] ser);
4096         // void KeysManager_free(struct LDKKeysManager this_obj);
4097         public static native void KeysManager_free(long this_obj);
4098         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
4099         public static native long KeysManager_new(byte[] seed, long starting_time_secs, int starting_time_nanos);
4100         // 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]);
4101         public static native long KeysManager_derive_channel_keys(long this_arg, long channel_value_satoshis, byte[] params);
4102         // 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);
4103         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);
4104         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
4105         public static native long KeysManager_as_KeysInterface(long this_arg);
4106         // void ChannelManager_free(struct LDKChannelManager this_obj);
4107         public static native void ChannelManager_free(long this_obj);
4108         // void ChainParameters_free(struct LDKChainParameters this_obj);
4109         public static native void ChainParameters_free(long this_obj);
4110         // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
4111         public static native Network ChainParameters_get_network(long this_ptr);
4112         // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
4113         public static native void ChainParameters_set_network(long this_ptr, Network val);
4114         // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
4115         public static native long ChainParameters_get_best_block(long this_ptr);
4116         // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
4117         public static native void ChainParameters_set_best_block(long this_ptr, long val);
4118         // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
4119         public static native long ChainParameters_new(Network network_arg, long best_block_arg);
4120         // uintptr_t ChainParameters_clone_ptr(LDKChainParameters *NONNULL_PTR arg);
4121         public static native long ChainParameters_clone_ptr(long arg);
4122         // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
4123         public static native long ChainParameters_clone(long orig);
4124         // void CounterpartyForwardingInfo_free(struct LDKCounterpartyForwardingInfo this_obj);
4125         public static native void CounterpartyForwardingInfo_free(long this_obj);
4126         // uint32_t CounterpartyForwardingInfo_get_fee_base_msat(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
4127         public static native int CounterpartyForwardingInfo_get_fee_base_msat(long this_ptr);
4128         // void CounterpartyForwardingInfo_set_fee_base_msat(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
4129         public static native void CounterpartyForwardingInfo_set_fee_base_msat(long this_ptr, int val);
4130         // uint32_t CounterpartyForwardingInfo_get_fee_proportional_millionths(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
4131         public static native int CounterpartyForwardingInfo_get_fee_proportional_millionths(long this_ptr);
4132         // void CounterpartyForwardingInfo_set_fee_proportional_millionths(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
4133         public static native void CounterpartyForwardingInfo_set_fee_proportional_millionths(long this_ptr, int val);
4134         // uint16_t CounterpartyForwardingInfo_get_cltv_expiry_delta(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
4135         public static native short CounterpartyForwardingInfo_get_cltv_expiry_delta(long this_ptr);
4136         // void CounterpartyForwardingInfo_set_cltv_expiry_delta(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint16_t val);
4137         public static native void CounterpartyForwardingInfo_set_cltv_expiry_delta(long this_ptr, short val);
4138         // 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);
4139         public static native long CounterpartyForwardingInfo_new(int fee_base_msat_arg, int fee_proportional_millionths_arg, short cltv_expiry_delta_arg);
4140         // uintptr_t CounterpartyForwardingInfo_clone_ptr(LDKCounterpartyForwardingInfo *NONNULL_PTR arg);
4141         public static native long CounterpartyForwardingInfo_clone_ptr(long arg);
4142         // struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_clone(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR orig);
4143         public static native long CounterpartyForwardingInfo_clone(long orig);
4144         // void ChannelCounterparty_free(struct LDKChannelCounterparty this_obj);
4145         public static native void ChannelCounterparty_free(long this_obj);
4146         // struct LDKPublicKey ChannelCounterparty_get_node_id(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
4147         public static native byte[] ChannelCounterparty_get_node_id(long this_ptr);
4148         // void ChannelCounterparty_set_node_id(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4149         public static native void ChannelCounterparty_set_node_id(long this_ptr, byte[] val);
4150         // struct LDKInitFeatures ChannelCounterparty_get_features(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
4151         public static native long ChannelCounterparty_get_features(long this_ptr);
4152         // void ChannelCounterparty_set_features(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
4153         public static native void ChannelCounterparty_set_features(long this_ptr, long val);
4154         // uint64_t ChannelCounterparty_get_unspendable_punishment_reserve(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
4155         public static native long ChannelCounterparty_get_unspendable_punishment_reserve(long this_ptr);
4156         // void ChannelCounterparty_set_unspendable_punishment_reserve(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, uint64_t val);
4157         public static native void ChannelCounterparty_set_unspendable_punishment_reserve(long this_ptr, long val);
4158         // struct LDKCounterpartyForwardingInfo ChannelCounterparty_get_forwarding_info(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
4159         public static native long ChannelCounterparty_get_forwarding_info(long this_ptr);
4160         // void ChannelCounterparty_set_forwarding_info(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKCounterpartyForwardingInfo val);
4161         public static native void ChannelCounterparty_set_forwarding_info(long this_ptr, long val);
4162         // 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);
4163         public static native long ChannelCounterparty_new(byte[] node_id_arg, long features_arg, long unspendable_punishment_reserve_arg, long forwarding_info_arg);
4164         // uintptr_t ChannelCounterparty_clone_ptr(LDKChannelCounterparty *NONNULL_PTR arg);
4165         public static native long ChannelCounterparty_clone_ptr(long arg);
4166         // struct LDKChannelCounterparty ChannelCounterparty_clone(const struct LDKChannelCounterparty *NONNULL_PTR orig);
4167         public static native long ChannelCounterparty_clone(long orig);
4168         // void ChannelDetails_free(struct LDKChannelDetails this_obj);
4169         public static native void ChannelDetails_free(long this_obj);
4170         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
4171         public static native byte[] ChannelDetails_get_channel_id(long this_ptr);
4172         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4173         public static native void ChannelDetails_set_channel_id(long this_ptr, byte[] val);
4174         // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4175         public static native long ChannelDetails_get_counterparty(long this_ptr);
4176         // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
4177         public static native void ChannelDetails_set_counterparty(long this_ptr, long val);
4178         // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4179         public static native long ChannelDetails_get_funding_txo(long this_ptr);
4180         // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
4181         public static native void ChannelDetails_set_funding_txo(long this_ptr, long val);
4182         // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4183         public static native long ChannelDetails_get_short_channel_id(long this_ptr);
4184         // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
4185         public static native void ChannelDetails_set_short_channel_id(long this_ptr, long val);
4186         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4187         public static native long ChannelDetails_get_channel_value_satoshis(long this_ptr);
4188         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
4189         public static native void ChannelDetails_set_channel_value_satoshis(long this_ptr, long val);
4190         // struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4191         public static native long ChannelDetails_get_unspendable_punishment_reserve(long this_ptr);
4192         // void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
4193         public static native void ChannelDetails_set_unspendable_punishment_reserve(long this_ptr, long val);
4194         // uint64_t ChannelDetails_get_user_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4195         public static native long ChannelDetails_get_user_channel_id(long this_ptr);
4196         // void ChannelDetails_set_user_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
4197         public static native void ChannelDetails_set_user_channel_id(long this_ptr, long val);
4198         // uint64_t ChannelDetails_get_balance_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4199         public static native long ChannelDetails_get_balance_msat(long this_ptr);
4200         // void ChannelDetails_set_balance_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
4201         public static native void ChannelDetails_set_balance_msat(long this_ptr, long val);
4202         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4203         public static native long ChannelDetails_get_outbound_capacity_msat(long this_ptr);
4204         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
4205         public static native void ChannelDetails_set_outbound_capacity_msat(long this_ptr, long val);
4206         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4207         public static native long ChannelDetails_get_inbound_capacity_msat(long this_ptr);
4208         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
4209         public static native void ChannelDetails_set_inbound_capacity_msat(long this_ptr, long val);
4210         // struct LDKCOption_u32Z ChannelDetails_get_confirmations_required(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4211         public static native long ChannelDetails_get_confirmations_required(long this_ptr);
4212         // void ChannelDetails_set_confirmations_required(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
4213         public static native void ChannelDetails_set_confirmations_required(long this_ptr, long val);
4214         // struct LDKCOption_u16Z ChannelDetails_get_force_close_spend_delay(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4215         public static native long ChannelDetails_get_force_close_spend_delay(long this_ptr);
4216         // void ChannelDetails_set_force_close_spend_delay(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
4217         public static native void ChannelDetails_set_force_close_spend_delay(long this_ptr, long val);
4218         // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4219         public static native boolean ChannelDetails_get_is_outbound(long this_ptr);
4220         // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
4221         public static native void ChannelDetails_set_is_outbound(long this_ptr, boolean val);
4222         // bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4223         public static native boolean ChannelDetails_get_is_funding_locked(long this_ptr);
4224         // void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
4225         public static native void ChannelDetails_set_is_funding_locked(long this_ptr, boolean val);
4226         // bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4227         public static native boolean ChannelDetails_get_is_usable(long this_ptr);
4228         // void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
4229         public static native void ChannelDetails_set_is_usable(long this_ptr, boolean val);
4230         // bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
4231         public static native boolean ChannelDetails_get_is_public(long this_ptr);
4232         // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
4233         public static native void ChannelDetails_set_is_public(long this_ptr, boolean val);
4234         // 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 balance_msat_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);
4235         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 balance_msat_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);
4236         // uintptr_t ChannelDetails_clone_ptr(LDKChannelDetails *NONNULL_PTR arg);
4237         public static native long ChannelDetails_clone_ptr(long arg);
4238         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
4239         public static native long ChannelDetails_clone(long orig);
4240         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
4241         public static native void PaymentSendFailure_free(long this_ptr);
4242         // uintptr_t PaymentSendFailure_clone_ptr(LDKPaymentSendFailure *NONNULL_PTR arg);
4243         public static native long PaymentSendFailure_clone_ptr(long arg);
4244         // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
4245         public static native long PaymentSendFailure_clone(long orig);
4246         // struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
4247         public static native long PaymentSendFailure_parameter_error(long a);
4248         // struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
4249         public static native long PaymentSendFailure_path_parameter_error(long[] a);
4250         // struct LDKPaymentSendFailure PaymentSendFailure_all_failed_retry_safe(struct LDKCVec_APIErrorZ a);
4251         public static native long PaymentSendFailure_all_failed_retry_safe(long[] a);
4252         // struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ results, struct LDKRouteParameters failed_paths_retry, struct LDKThirtyTwoBytes payment_id);
4253         public static native long PaymentSendFailure_partial_failure(long[] results, long failed_paths_retry, byte[] payment_id);
4254         // 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);
4255         public static native long ChannelManager_new(long fee_est, long chain_monitor, long tx_broadcaster, long logger, long keys_manager, long config, long params);
4256         // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
4257         public static native long ChannelManager_get_current_default_configuration(long this_arg);
4258         // 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);
4259         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);
4260         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
4261         public static native long[] ChannelManager_list_channels(long this_arg);
4262         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
4263         public static native long[] ChannelManager_list_usable_channels(long this_arg);
4264         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
4265         public static native long ChannelManager_close_channel(long this_arg, byte[] channel_id);
4266         // 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);
4267         public static native long ChannelManager_close_channel_with_target_feerate(long this_arg, byte[] channel_id, int target_feerate_sats_per_1000_weight);
4268         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
4269         public static native long ChannelManager_force_close_channel(long this_arg, byte[] channel_id);
4270         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
4271         public static native void ChannelManager_force_close_all_channels(long this_arg);
4272         // 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);
4273         public static native long ChannelManager_send_payment(long this_arg, long route, byte[] payment_hash, byte[] payment_secret);
4274         // MUST_USE_RES struct LDKCResult_NonePaymentSendFailureZ ChannelManager_retry_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_id);
4275         public static native long ChannelManager_retry_payment(long this_arg, long route, byte[] payment_id);
4276         // void ChannelManager_abandon_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_id);
4277         public static native void ChannelManager_abandon_payment(long this_arg, byte[] payment_id);
4278         // 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);
4279         public static native long ChannelManager_send_spontaneous_payment(long this_arg, long route, byte[] payment_preimage);
4280         // 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);
4281         public static native long ChannelManager_funding_transaction_generated(long this_arg, byte[] temporary_channel_id, byte[] funding_transaction);
4282         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
4283         public static native void ChannelManager_broadcast_node_announcement(long this_arg, byte[] rgb, byte[] alias, long[] addresses);
4284         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
4285         public static native void ChannelManager_process_pending_htlc_forwards(long this_arg);
4286         // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
4287         public static native void ChannelManager_timer_tick_occurred(long this_arg);
4288         // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
4289         public static native boolean ChannelManager_fail_htlc_backwards(long this_arg, byte[] payment_hash);
4290         // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
4291         public static native boolean ChannelManager_claim_funds(long this_arg, byte[] payment_preimage);
4292         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
4293         public static native byte[] ChannelManager_get_our_node_id(long this_arg);
4294         // MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZNoneZ ChannelManager_create_inbound_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs);
4295         public static native long ChannelManager_create_inbound_payment(long this_arg, long min_value_msat, int invoice_expiry_delta_secs);
4296         // MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentSecretZAPIErrorZ ChannelManager_create_inbound_payment_legacy(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs);
4297         public static native long ChannelManager_create_inbound_payment_legacy(long this_arg, long min_value_msat, int invoice_expiry_delta_secs);
4298         // MUST_USE_RES struct LDKCResult_PaymentSecretNoneZ 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);
4299         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);
4300         // MUST_USE_RES struct LDKCResult_PaymentSecretAPIErrorZ ChannelManager_create_inbound_payment_for_hash_legacy(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs);
4301         public static native long ChannelManager_create_inbound_payment_for_hash_legacy(long this_arg, byte[] payment_hash, long min_value_msat, int invoice_expiry_delta_secs);
4302         // MUST_USE_RES struct LDKCResult_PaymentPreimageAPIErrorZ ChannelManager_get_payment_preimage(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret);
4303         public static native long ChannelManager_get_payment_preimage(long this_arg, byte[] payment_hash, byte[] payment_secret);
4304         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
4305         public static native long ChannelManager_as_MessageSendEventsProvider(long this_arg);
4306         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
4307         public static native long ChannelManager_as_EventsProvider(long this_arg);
4308         // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
4309         public static native long ChannelManager_as_Listen(long this_arg);
4310         // struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
4311         public static native long ChannelManager_as_Confirm(long this_arg);
4312         // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
4313         public static native boolean ChannelManager_await_persistable_update_timeout(long this_arg, long max_wait);
4314         // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
4315         public static native void ChannelManager_await_persistable_update(long this_arg);
4316         // MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
4317         public static native long ChannelManager_current_best_block(long this_arg);
4318         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
4319         public static native long ChannelManager_as_ChannelMessageHandler(long this_arg);
4320         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
4321         public static native byte[] ChannelManager_write(long obj);
4322         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
4323         public static native void ChannelManagerReadArgs_free(long this_obj);
4324         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
4325         public static native long ChannelManagerReadArgs_get_keys_manager(long this_ptr);
4326         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
4327         public static native void ChannelManagerReadArgs_set_keys_manager(long this_ptr, long val);
4328         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
4329         public static native long ChannelManagerReadArgs_get_fee_estimator(long this_ptr);
4330         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
4331         public static native void ChannelManagerReadArgs_set_fee_estimator(long this_ptr, long val);
4332         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
4333         public static native long ChannelManagerReadArgs_get_chain_monitor(long this_ptr);
4334         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
4335         public static native void ChannelManagerReadArgs_set_chain_monitor(long this_ptr, long val);
4336         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
4337         public static native long ChannelManagerReadArgs_get_tx_broadcaster(long this_ptr);
4338         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
4339         public static native void ChannelManagerReadArgs_set_tx_broadcaster(long this_ptr, long val);
4340         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
4341         public static native long ChannelManagerReadArgs_get_logger(long this_ptr);
4342         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
4343         public static native void ChannelManagerReadArgs_set_logger(long this_ptr, long val);
4344         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
4345         public static native long ChannelManagerReadArgs_get_default_config(long this_ptr);
4346         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
4347         public static native void ChannelManagerReadArgs_set_default_config(long this_ptr, long val);
4348         // 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);
4349         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);
4350         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
4351         public static native long C2Tuple_BlockHashChannelManagerZ_read(byte[] ser, long arg);
4352         // void DecodeError_free(struct LDKDecodeError this_obj);
4353         public static native void DecodeError_free(long this_obj);
4354         // uintptr_t DecodeError_clone_ptr(LDKDecodeError *NONNULL_PTR arg);
4355         public static native long DecodeError_clone_ptr(long arg);
4356         // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
4357         public static native long DecodeError_clone(long orig);
4358         // void Init_free(struct LDKInit this_obj);
4359         public static native void Init_free(long this_obj);
4360         // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
4361         public static native long Init_get_features(long this_ptr);
4362         // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
4363         public static native void Init_set_features(long this_ptr, long val);
4364         // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
4365         public static native long Init_new(long features_arg);
4366         // uintptr_t Init_clone_ptr(LDKInit *NONNULL_PTR arg);
4367         public static native long Init_clone_ptr(long arg);
4368         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
4369         public static native long Init_clone(long orig);
4370         // void ErrorMessage_free(struct LDKErrorMessage this_obj);
4371         public static native void ErrorMessage_free(long this_obj);
4372         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
4373         public static native byte[] ErrorMessage_get_channel_id(long this_ptr);
4374         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4375         public static native void ErrorMessage_set_channel_id(long this_ptr, byte[] val);
4376         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
4377         public static native String ErrorMessage_get_data(long this_ptr);
4378         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
4379         public static native void ErrorMessage_set_data(long this_ptr, String val);
4380         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
4381         public static native long ErrorMessage_new(byte[] channel_id_arg, String data_arg);
4382         // uintptr_t ErrorMessage_clone_ptr(LDKErrorMessage *NONNULL_PTR arg);
4383         public static native long ErrorMessage_clone_ptr(long arg);
4384         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
4385         public static native long ErrorMessage_clone(long orig);
4386         // void Ping_free(struct LDKPing this_obj);
4387         public static native void Ping_free(long this_obj);
4388         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
4389         public static native short Ping_get_ponglen(long this_ptr);
4390         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
4391         public static native void Ping_set_ponglen(long this_ptr, short val);
4392         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
4393         public static native short Ping_get_byteslen(long this_ptr);
4394         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
4395         public static native void Ping_set_byteslen(long this_ptr, short val);
4396         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
4397         public static native long Ping_new(short ponglen_arg, short byteslen_arg);
4398         // uintptr_t Ping_clone_ptr(LDKPing *NONNULL_PTR arg);
4399         public static native long Ping_clone_ptr(long arg);
4400         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
4401         public static native long Ping_clone(long orig);
4402         // void Pong_free(struct LDKPong this_obj);
4403         public static native void Pong_free(long this_obj);
4404         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
4405         public static native short Pong_get_byteslen(long this_ptr);
4406         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
4407         public static native void Pong_set_byteslen(long this_ptr, short val);
4408         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
4409         public static native long Pong_new(short byteslen_arg);
4410         // uintptr_t Pong_clone_ptr(LDKPong *NONNULL_PTR arg);
4411         public static native long Pong_clone_ptr(long arg);
4412         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
4413         public static native long Pong_clone(long orig);
4414         // void OpenChannel_free(struct LDKOpenChannel this_obj);
4415         public static native void OpenChannel_free(long this_obj);
4416         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
4417         public static native byte[] OpenChannel_get_chain_hash(long this_ptr);
4418         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4419         public static native void OpenChannel_set_chain_hash(long this_ptr, byte[] val);
4420         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
4421         public static native byte[] OpenChannel_get_temporary_channel_id(long this_ptr);
4422         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4423         public static native void OpenChannel_set_temporary_channel_id(long this_ptr, byte[] val);
4424         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4425         public static native long OpenChannel_get_funding_satoshis(long this_ptr);
4426         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
4427         public static native void OpenChannel_set_funding_satoshis(long this_ptr, long val);
4428         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4429         public static native long OpenChannel_get_push_msat(long this_ptr);
4430         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
4431         public static native void OpenChannel_set_push_msat(long this_ptr, long val);
4432         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4433         public static native long OpenChannel_get_dust_limit_satoshis(long this_ptr);
4434         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
4435         public static native void OpenChannel_set_dust_limit_satoshis(long this_ptr, long val);
4436         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4437         public static native long OpenChannel_get_max_htlc_value_in_flight_msat(long this_ptr);
4438         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
4439         public static native void OpenChannel_set_max_htlc_value_in_flight_msat(long this_ptr, long val);
4440         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4441         public static native long OpenChannel_get_channel_reserve_satoshis(long this_ptr);
4442         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
4443         public static native void OpenChannel_set_channel_reserve_satoshis(long this_ptr, long val);
4444         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4445         public static native long OpenChannel_get_htlc_minimum_msat(long this_ptr);
4446         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
4447         public static native void OpenChannel_set_htlc_minimum_msat(long this_ptr, long val);
4448         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4449         public static native int OpenChannel_get_feerate_per_kw(long this_ptr);
4450         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
4451         public static native void OpenChannel_set_feerate_per_kw(long this_ptr, int val);
4452         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4453         public static native short OpenChannel_get_to_self_delay(long this_ptr);
4454         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
4455         public static native void OpenChannel_set_to_self_delay(long this_ptr, short val);
4456         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4457         public static native short OpenChannel_get_max_accepted_htlcs(long this_ptr);
4458         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
4459         public static native void OpenChannel_set_max_accepted_htlcs(long this_ptr, short val);
4460         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4461         public static native byte[] OpenChannel_get_funding_pubkey(long this_ptr);
4462         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4463         public static native void OpenChannel_set_funding_pubkey(long this_ptr, byte[] val);
4464         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4465         public static native byte[] OpenChannel_get_revocation_basepoint(long this_ptr);
4466         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4467         public static native void OpenChannel_set_revocation_basepoint(long this_ptr, byte[] val);
4468         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4469         public static native byte[] OpenChannel_get_payment_point(long this_ptr);
4470         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4471         public static native void OpenChannel_set_payment_point(long this_ptr, byte[] val);
4472         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4473         public static native byte[] OpenChannel_get_delayed_payment_basepoint(long this_ptr);
4474         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4475         public static native void OpenChannel_set_delayed_payment_basepoint(long this_ptr, byte[] val);
4476         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4477         public static native byte[] OpenChannel_get_htlc_basepoint(long this_ptr);
4478         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4479         public static native void OpenChannel_set_htlc_basepoint(long this_ptr, byte[] val);
4480         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4481         public static native byte[] OpenChannel_get_first_per_commitment_point(long this_ptr);
4482         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4483         public static native void OpenChannel_set_first_per_commitment_point(long this_ptr, byte[] val);
4484         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4485         public static native byte OpenChannel_get_channel_flags(long this_ptr);
4486         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
4487         public static native void OpenChannel_set_channel_flags(long this_ptr, byte val);
4488         // struct LDKChannelTypeFeatures OpenChannel_get_channel_type(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
4489         public static native long OpenChannel_get_channel_type(long this_ptr);
4490         // void OpenChannel_set_channel_type(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKChannelTypeFeatures val);
4491         public static native void OpenChannel_set_channel_type(long this_ptr, long val);
4492         // uintptr_t OpenChannel_clone_ptr(LDKOpenChannel *NONNULL_PTR arg);
4493         public static native long OpenChannel_clone_ptr(long arg);
4494         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
4495         public static native long OpenChannel_clone(long orig);
4496         // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
4497         public static native void AcceptChannel_free(long this_obj);
4498         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
4499         public static native byte[] AcceptChannel_get_temporary_channel_id(long this_ptr);
4500         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4501         public static native void AcceptChannel_set_temporary_channel_id(long this_ptr, byte[] val);
4502         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
4503         public static native long AcceptChannel_get_dust_limit_satoshis(long this_ptr);
4504         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
4505         public static native void AcceptChannel_set_dust_limit_satoshis(long this_ptr, long val);
4506         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
4507         public static native long AcceptChannel_get_max_htlc_value_in_flight_msat(long this_ptr);
4508         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
4509         public static native void AcceptChannel_set_max_htlc_value_in_flight_msat(long this_ptr, long val);
4510         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
4511         public static native long AcceptChannel_get_channel_reserve_satoshis(long this_ptr);
4512         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
4513         public static native void AcceptChannel_set_channel_reserve_satoshis(long this_ptr, long val);
4514         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
4515         public static native long AcceptChannel_get_htlc_minimum_msat(long this_ptr);
4516         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
4517         public static native void AcceptChannel_set_htlc_minimum_msat(long this_ptr, long val);
4518         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
4519         public static native int AcceptChannel_get_minimum_depth(long this_ptr);
4520         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
4521         public static native void AcceptChannel_set_minimum_depth(long this_ptr, int val);
4522         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
4523         public static native short AcceptChannel_get_to_self_delay(long this_ptr);
4524         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
4525         public static native void AcceptChannel_set_to_self_delay(long this_ptr, short val);
4526         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
4527         public static native short AcceptChannel_get_max_accepted_htlcs(long this_ptr);
4528         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
4529         public static native void AcceptChannel_set_max_accepted_htlcs(long this_ptr, short val);
4530         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
4531         public static native byte[] AcceptChannel_get_funding_pubkey(long this_ptr);
4532         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4533         public static native void AcceptChannel_set_funding_pubkey(long this_ptr, byte[] val);
4534         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
4535         public static native byte[] AcceptChannel_get_revocation_basepoint(long this_ptr);
4536         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4537         public static native void AcceptChannel_set_revocation_basepoint(long this_ptr, byte[] val);
4538         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
4539         public static native byte[] AcceptChannel_get_payment_point(long this_ptr);
4540         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4541         public static native void AcceptChannel_set_payment_point(long this_ptr, byte[] val);
4542         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
4543         public static native byte[] AcceptChannel_get_delayed_payment_basepoint(long this_ptr);
4544         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4545         public static native void AcceptChannel_set_delayed_payment_basepoint(long this_ptr, byte[] val);
4546         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
4547         public static native byte[] AcceptChannel_get_htlc_basepoint(long this_ptr);
4548         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4549         public static native void AcceptChannel_set_htlc_basepoint(long this_ptr, byte[] val);
4550         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
4551         public static native byte[] AcceptChannel_get_first_per_commitment_point(long this_ptr);
4552         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4553         public static native void AcceptChannel_set_first_per_commitment_point(long this_ptr, byte[] val);
4554         // uintptr_t AcceptChannel_clone_ptr(LDKAcceptChannel *NONNULL_PTR arg);
4555         public static native long AcceptChannel_clone_ptr(long arg);
4556         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
4557         public static native long AcceptChannel_clone(long orig);
4558         // void FundingCreated_free(struct LDKFundingCreated this_obj);
4559         public static native void FundingCreated_free(long this_obj);
4560         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
4561         public static native byte[] FundingCreated_get_temporary_channel_id(long this_ptr);
4562         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4563         public static native void FundingCreated_set_temporary_channel_id(long this_ptr, byte[] val);
4564         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
4565         public static native byte[] FundingCreated_get_funding_txid(long this_ptr);
4566         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4567         public static native void FundingCreated_set_funding_txid(long this_ptr, byte[] val);
4568         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
4569         public static native short FundingCreated_get_funding_output_index(long this_ptr);
4570         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
4571         public static native void FundingCreated_set_funding_output_index(long this_ptr, short val);
4572         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
4573         public static native byte[] FundingCreated_get_signature(long this_ptr);
4574         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
4575         public static native void FundingCreated_set_signature(long this_ptr, byte[] val);
4576         // 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);
4577         public static native long FundingCreated_new(byte[] temporary_channel_id_arg, byte[] funding_txid_arg, short funding_output_index_arg, byte[] signature_arg);
4578         // uintptr_t FundingCreated_clone_ptr(LDKFundingCreated *NONNULL_PTR arg);
4579         public static native long FundingCreated_clone_ptr(long arg);
4580         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
4581         public static native long FundingCreated_clone(long orig);
4582         // void FundingSigned_free(struct LDKFundingSigned this_obj);
4583         public static native void FundingSigned_free(long this_obj);
4584         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
4585         public static native byte[] FundingSigned_get_channel_id(long this_ptr);
4586         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4587         public static native void FundingSigned_set_channel_id(long this_ptr, byte[] val);
4588         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
4589         public static native byte[] FundingSigned_get_signature(long this_ptr);
4590         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
4591         public static native void FundingSigned_set_signature(long this_ptr, byte[] val);
4592         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
4593         public static native long FundingSigned_new(byte[] channel_id_arg, byte[] signature_arg);
4594         // uintptr_t FundingSigned_clone_ptr(LDKFundingSigned *NONNULL_PTR arg);
4595         public static native long FundingSigned_clone_ptr(long arg);
4596         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
4597         public static native long FundingSigned_clone(long orig);
4598         // void FundingLocked_free(struct LDKFundingLocked this_obj);
4599         public static native void FundingLocked_free(long this_obj);
4600         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
4601         public static native byte[] FundingLocked_get_channel_id(long this_ptr);
4602         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4603         public static native void FundingLocked_set_channel_id(long this_ptr, byte[] val);
4604         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
4605         public static native byte[] FundingLocked_get_next_per_commitment_point(long this_ptr);
4606         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4607         public static native void FundingLocked_set_next_per_commitment_point(long this_ptr, byte[] val);
4608         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
4609         public static native long FundingLocked_new(byte[] channel_id_arg, byte[] next_per_commitment_point_arg);
4610         // uintptr_t FundingLocked_clone_ptr(LDKFundingLocked *NONNULL_PTR arg);
4611         public static native long FundingLocked_clone_ptr(long arg);
4612         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
4613         public static native long FundingLocked_clone(long orig);
4614         // void Shutdown_free(struct LDKShutdown this_obj);
4615         public static native void Shutdown_free(long this_obj);
4616         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
4617         public static native byte[] Shutdown_get_channel_id(long this_ptr);
4618         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4619         public static native void Shutdown_set_channel_id(long this_ptr, byte[] val);
4620         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
4621         public static native byte[] Shutdown_get_scriptpubkey(long this_ptr);
4622         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
4623         public static native void Shutdown_set_scriptpubkey(long this_ptr, byte[] val);
4624         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
4625         public static native long Shutdown_new(byte[] channel_id_arg, byte[] scriptpubkey_arg);
4626         // uintptr_t Shutdown_clone_ptr(LDKShutdown *NONNULL_PTR arg);
4627         public static native long Shutdown_clone_ptr(long arg);
4628         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
4629         public static native long Shutdown_clone(long orig);
4630         // void ClosingSignedFeeRange_free(struct LDKClosingSignedFeeRange this_obj);
4631         public static native void ClosingSignedFeeRange_free(long this_obj);
4632         // uint64_t ClosingSignedFeeRange_get_min_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
4633         public static native long ClosingSignedFeeRange_get_min_fee_satoshis(long this_ptr);
4634         // void ClosingSignedFeeRange_set_min_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
4635         public static native void ClosingSignedFeeRange_set_min_fee_satoshis(long this_ptr, long val);
4636         // uint64_t ClosingSignedFeeRange_get_max_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
4637         public static native long ClosingSignedFeeRange_get_max_fee_satoshis(long this_ptr);
4638         // void ClosingSignedFeeRange_set_max_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
4639         public static native void ClosingSignedFeeRange_set_max_fee_satoshis(long this_ptr, long val);
4640         // MUST_USE_RES struct LDKClosingSignedFeeRange ClosingSignedFeeRange_new(uint64_t min_fee_satoshis_arg, uint64_t max_fee_satoshis_arg);
4641         public static native long ClosingSignedFeeRange_new(long min_fee_satoshis_arg, long max_fee_satoshis_arg);
4642         // uintptr_t ClosingSignedFeeRange_clone_ptr(LDKClosingSignedFeeRange *NONNULL_PTR arg);
4643         public static native long ClosingSignedFeeRange_clone_ptr(long arg);
4644         // struct LDKClosingSignedFeeRange ClosingSignedFeeRange_clone(const struct LDKClosingSignedFeeRange *NONNULL_PTR orig);
4645         public static native long ClosingSignedFeeRange_clone(long orig);
4646         // void ClosingSigned_free(struct LDKClosingSigned this_obj);
4647         public static native void ClosingSigned_free(long this_obj);
4648         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
4649         public static native byte[] ClosingSigned_get_channel_id(long this_ptr);
4650         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4651         public static native void ClosingSigned_set_channel_id(long this_ptr, byte[] val);
4652         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
4653         public static native long ClosingSigned_get_fee_satoshis(long this_ptr);
4654         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
4655         public static native void ClosingSigned_set_fee_satoshis(long this_ptr, long val);
4656         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
4657         public static native byte[] ClosingSigned_get_signature(long this_ptr);
4658         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
4659         public static native void ClosingSigned_set_signature(long this_ptr, byte[] val);
4660         // struct LDKClosingSignedFeeRange ClosingSigned_get_fee_range(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
4661         public static native long ClosingSigned_get_fee_range(long this_ptr);
4662         // void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val);
4663         public static native void ClosingSigned_set_fee_range(long this_ptr, long val);
4664         // 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);
4665         public static native long ClosingSigned_new(byte[] channel_id_arg, long fee_satoshis_arg, byte[] signature_arg, long fee_range_arg);
4666         // uintptr_t ClosingSigned_clone_ptr(LDKClosingSigned *NONNULL_PTR arg);
4667         public static native long ClosingSigned_clone_ptr(long arg);
4668         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
4669         public static native long ClosingSigned_clone(long orig);
4670         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
4671         public static native void UpdateAddHTLC_free(long this_obj);
4672         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
4673         public static native byte[] UpdateAddHTLC_get_channel_id(long this_ptr);
4674         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4675         public static native void UpdateAddHTLC_set_channel_id(long this_ptr, byte[] val);
4676         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
4677         public static native long UpdateAddHTLC_get_htlc_id(long this_ptr);
4678         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
4679         public static native void UpdateAddHTLC_set_htlc_id(long this_ptr, long val);
4680         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
4681         public static native long UpdateAddHTLC_get_amount_msat(long this_ptr);
4682         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
4683         public static native void UpdateAddHTLC_set_amount_msat(long this_ptr, long val);
4684         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
4685         public static native byte[] UpdateAddHTLC_get_payment_hash(long this_ptr);
4686         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4687         public static native void UpdateAddHTLC_set_payment_hash(long this_ptr, byte[] val);
4688         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
4689         public static native int UpdateAddHTLC_get_cltv_expiry(long this_ptr);
4690         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
4691         public static native void UpdateAddHTLC_set_cltv_expiry(long this_ptr, int val);
4692         // uintptr_t UpdateAddHTLC_clone_ptr(LDKUpdateAddHTLC *NONNULL_PTR arg);
4693         public static native long UpdateAddHTLC_clone_ptr(long arg);
4694         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
4695         public static native long UpdateAddHTLC_clone(long orig);
4696         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
4697         public static native void UpdateFulfillHTLC_free(long this_obj);
4698         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
4699         public static native byte[] UpdateFulfillHTLC_get_channel_id(long this_ptr);
4700         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4701         public static native void UpdateFulfillHTLC_set_channel_id(long this_ptr, byte[] val);
4702         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
4703         public static native long UpdateFulfillHTLC_get_htlc_id(long this_ptr);
4704         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
4705         public static native void UpdateFulfillHTLC_set_htlc_id(long this_ptr, long val);
4706         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
4707         public static native byte[] UpdateFulfillHTLC_get_payment_preimage(long this_ptr);
4708         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4709         public static native void UpdateFulfillHTLC_set_payment_preimage(long this_ptr, byte[] val);
4710         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
4711         public static native long UpdateFulfillHTLC_new(byte[] channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg);
4712         // uintptr_t UpdateFulfillHTLC_clone_ptr(LDKUpdateFulfillHTLC *NONNULL_PTR arg);
4713         public static native long UpdateFulfillHTLC_clone_ptr(long arg);
4714         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
4715         public static native long UpdateFulfillHTLC_clone(long orig);
4716         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
4717         public static native void UpdateFailHTLC_free(long this_obj);
4718         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
4719         public static native byte[] UpdateFailHTLC_get_channel_id(long this_ptr);
4720         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4721         public static native void UpdateFailHTLC_set_channel_id(long this_ptr, byte[] val);
4722         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
4723         public static native long UpdateFailHTLC_get_htlc_id(long this_ptr);
4724         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
4725         public static native void UpdateFailHTLC_set_htlc_id(long this_ptr, long val);
4726         // uintptr_t UpdateFailHTLC_clone_ptr(LDKUpdateFailHTLC *NONNULL_PTR arg);
4727         public static native long UpdateFailHTLC_clone_ptr(long arg);
4728         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
4729         public static native long UpdateFailHTLC_clone(long orig);
4730         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
4731         public static native void UpdateFailMalformedHTLC_free(long this_obj);
4732         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
4733         public static native byte[] UpdateFailMalformedHTLC_get_channel_id(long this_ptr);
4734         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4735         public static native void UpdateFailMalformedHTLC_set_channel_id(long this_ptr, byte[] val);
4736         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
4737         public static native long UpdateFailMalformedHTLC_get_htlc_id(long this_ptr);
4738         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
4739         public static native void UpdateFailMalformedHTLC_set_htlc_id(long this_ptr, long val);
4740         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
4741         public static native short UpdateFailMalformedHTLC_get_failure_code(long this_ptr);
4742         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
4743         public static native void UpdateFailMalformedHTLC_set_failure_code(long this_ptr, short val);
4744         // uintptr_t UpdateFailMalformedHTLC_clone_ptr(LDKUpdateFailMalformedHTLC *NONNULL_PTR arg);
4745         public static native long UpdateFailMalformedHTLC_clone_ptr(long arg);
4746         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
4747         public static native long UpdateFailMalformedHTLC_clone(long orig);
4748         // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
4749         public static native void CommitmentSigned_free(long this_obj);
4750         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
4751         public static native byte[] CommitmentSigned_get_channel_id(long this_ptr);
4752         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4753         public static native void CommitmentSigned_set_channel_id(long this_ptr, byte[] val);
4754         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
4755         public static native byte[] CommitmentSigned_get_signature(long this_ptr);
4756         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
4757         public static native void CommitmentSigned_set_signature(long this_ptr, byte[] val);
4758         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
4759         public static native void CommitmentSigned_set_htlc_signatures(long this_ptr, byte[][] val);
4760         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
4761         public static native long CommitmentSigned_new(byte[] channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg);
4762         // uintptr_t CommitmentSigned_clone_ptr(LDKCommitmentSigned *NONNULL_PTR arg);
4763         public static native long CommitmentSigned_clone_ptr(long arg);
4764         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
4765         public static native long CommitmentSigned_clone(long orig);
4766         // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
4767         public static native void RevokeAndACK_free(long this_obj);
4768         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
4769         public static native byte[] RevokeAndACK_get_channel_id(long this_ptr);
4770         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4771         public static native void RevokeAndACK_set_channel_id(long this_ptr, byte[] val);
4772         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
4773         public static native byte[] RevokeAndACK_get_per_commitment_secret(long this_ptr);
4774         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4775         public static native void RevokeAndACK_set_per_commitment_secret(long this_ptr, byte[] val);
4776         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
4777         public static native byte[] RevokeAndACK_get_next_per_commitment_point(long this_ptr);
4778         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4779         public static native void RevokeAndACK_set_next_per_commitment_point(long this_ptr, byte[] val);
4780         // 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);
4781         public static native long RevokeAndACK_new(byte[] channel_id_arg, byte[] per_commitment_secret_arg, byte[] next_per_commitment_point_arg);
4782         // uintptr_t RevokeAndACK_clone_ptr(LDKRevokeAndACK *NONNULL_PTR arg);
4783         public static native long RevokeAndACK_clone_ptr(long arg);
4784         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
4785         public static native long RevokeAndACK_clone(long orig);
4786         // void UpdateFee_free(struct LDKUpdateFee this_obj);
4787         public static native void UpdateFee_free(long this_obj);
4788         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
4789         public static native byte[] UpdateFee_get_channel_id(long this_ptr);
4790         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4791         public static native void UpdateFee_set_channel_id(long this_ptr, byte[] val);
4792         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
4793         public static native int UpdateFee_get_feerate_per_kw(long this_ptr);
4794         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
4795         public static native void UpdateFee_set_feerate_per_kw(long this_ptr, int val);
4796         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
4797         public static native long UpdateFee_new(byte[] channel_id_arg, int feerate_per_kw_arg);
4798         // uintptr_t UpdateFee_clone_ptr(LDKUpdateFee *NONNULL_PTR arg);
4799         public static native long UpdateFee_clone_ptr(long arg);
4800         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
4801         public static native long UpdateFee_clone(long orig);
4802         // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
4803         public static native void DataLossProtect_free(long this_obj);
4804         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
4805         public static native byte[] DataLossProtect_get_your_last_per_commitment_secret(long this_ptr);
4806         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4807         public static native void DataLossProtect_set_your_last_per_commitment_secret(long this_ptr, byte[] val);
4808         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
4809         public static native byte[] DataLossProtect_get_my_current_per_commitment_point(long this_ptr);
4810         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4811         public static native void DataLossProtect_set_my_current_per_commitment_point(long this_ptr, byte[] val);
4812         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
4813         public static native long DataLossProtect_new(byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg);
4814         // uintptr_t DataLossProtect_clone_ptr(LDKDataLossProtect *NONNULL_PTR arg);
4815         public static native long DataLossProtect_clone_ptr(long arg);
4816         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
4817         public static native long DataLossProtect_clone(long orig);
4818         // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
4819         public static native void ChannelReestablish_free(long this_obj);
4820         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
4821         public static native byte[] ChannelReestablish_get_channel_id(long this_ptr);
4822         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4823         public static native void ChannelReestablish_set_channel_id(long this_ptr, byte[] val);
4824         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
4825         public static native long ChannelReestablish_get_next_local_commitment_number(long this_ptr);
4826         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
4827         public static native void ChannelReestablish_set_next_local_commitment_number(long this_ptr, long val);
4828         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
4829         public static native long ChannelReestablish_get_next_remote_commitment_number(long this_ptr);
4830         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
4831         public static native void ChannelReestablish_set_next_remote_commitment_number(long this_ptr, long val);
4832         // uintptr_t ChannelReestablish_clone_ptr(LDKChannelReestablish *NONNULL_PTR arg);
4833         public static native long ChannelReestablish_clone_ptr(long arg);
4834         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
4835         public static native long ChannelReestablish_clone(long orig);
4836         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
4837         public static native void AnnouncementSignatures_free(long this_obj);
4838         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
4839         public static native byte[] AnnouncementSignatures_get_channel_id(long this_ptr);
4840         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4841         public static native void AnnouncementSignatures_set_channel_id(long this_ptr, byte[] val);
4842         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
4843         public static native long AnnouncementSignatures_get_short_channel_id(long this_ptr);
4844         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
4845         public static native void AnnouncementSignatures_set_short_channel_id(long this_ptr, long val);
4846         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
4847         public static native byte[] AnnouncementSignatures_get_node_signature(long this_ptr);
4848         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
4849         public static native void AnnouncementSignatures_set_node_signature(long this_ptr, byte[] val);
4850         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
4851         public static native byte[] AnnouncementSignatures_get_bitcoin_signature(long this_ptr);
4852         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
4853         public static native void AnnouncementSignatures_set_bitcoin_signature(long this_ptr, byte[] val);
4854         // 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);
4855         public static native long AnnouncementSignatures_new(byte[] channel_id_arg, long short_channel_id_arg, byte[] node_signature_arg, byte[] bitcoin_signature_arg);
4856         // uintptr_t AnnouncementSignatures_clone_ptr(LDKAnnouncementSignatures *NONNULL_PTR arg);
4857         public static native long AnnouncementSignatures_clone_ptr(long arg);
4858         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
4859         public static native long AnnouncementSignatures_clone(long orig);
4860         // void NetAddress_free(struct LDKNetAddress this_ptr);
4861         public static native void NetAddress_free(long this_ptr);
4862         // uintptr_t NetAddress_clone_ptr(LDKNetAddress *NONNULL_PTR arg);
4863         public static native long NetAddress_clone_ptr(long arg);
4864         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
4865         public static native long NetAddress_clone(long orig);
4866         // struct LDKNetAddress NetAddress_ipv4(struct LDKFourBytes addr, uint16_t port);
4867         public static native long NetAddress_ipv4(byte[] addr, short port);
4868         // struct LDKNetAddress NetAddress_ipv6(struct LDKSixteenBytes addr, uint16_t port);
4869         public static native long NetAddress_ipv6(byte[] addr, short port);
4870         // struct LDKNetAddress NetAddress_onion_v2(struct LDKTwelveBytes a);
4871         public static native long NetAddress_onion_v2(byte[] a);
4872         // struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
4873         public static native long NetAddress_onion_v3(byte[] ed25519_pubkey, short checksum, byte version, short port);
4874         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
4875         public static native byte[] NetAddress_write(long obj);
4876         // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
4877         public static native long NetAddress_read(byte[] ser);
4878         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
4879         public static native void UnsignedNodeAnnouncement_free(long this_obj);
4880         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
4881         public static native long UnsignedNodeAnnouncement_get_features(long this_ptr);
4882         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
4883         public static native void UnsignedNodeAnnouncement_set_features(long this_ptr, long val);
4884         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
4885         public static native int UnsignedNodeAnnouncement_get_timestamp(long this_ptr);
4886         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
4887         public static native void UnsignedNodeAnnouncement_set_timestamp(long this_ptr, int val);
4888         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
4889         public static native byte[] UnsignedNodeAnnouncement_get_node_id(long this_ptr);
4890         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4891         public static native void UnsignedNodeAnnouncement_set_node_id(long this_ptr, byte[] val);
4892         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
4893         public static native byte[] UnsignedNodeAnnouncement_get_rgb(long this_ptr);
4894         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
4895         public static native void UnsignedNodeAnnouncement_set_rgb(long this_ptr, byte[] val);
4896         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
4897         public static native byte[] UnsignedNodeAnnouncement_get_alias(long this_ptr);
4898         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4899         public static native void UnsignedNodeAnnouncement_set_alias(long this_ptr, byte[] val);
4900         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
4901         public static native void UnsignedNodeAnnouncement_set_addresses(long this_ptr, long[] val);
4902         // uintptr_t UnsignedNodeAnnouncement_clone_ptr(LDKUnsignedNodeAnnouncement *NONNULL_PTR arg);
4903         public static native long UnsignedNodeAnnouncement_clone_ptr(long arg);
4904         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
4905         public static native long UnsignedNodeAnnouncement_clone(long orig);
4906         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
4907         public static native void NodeAnnouncement_free(long this_obj);
4908         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
4909         public static native byte[] NodeAnnouncement_get_signature(long this_ptr);
4910         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
4911         public static native void NodeAnnouncement_set_signature(long this_ptr, byte[] val);
4912         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
4913         public static native long NodeAnnouncement_get_contents(long this_ptr);
4914         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
4915         public static native void NodeAnnouncement_set_contents(long this_ptr, long val);
4916         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
4917         public static native long NodeAnnouncement_new(byte[] signature_arg, long contents_arg);
4918         // uintptr_t NodeAnnouncement_clone_ptr(LDKNodeAnnouncement *NONNULL_PTR arg);
4919         public static native long NodeAnnouncement_clone_ptr(long arg);
4920         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
4921         public static native long NodeAnnouncement_clone(long orig);
4922         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
4923         public static native void UnsignedChannelAnnouncement_free(long this_obj);
4924         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
4925         public static native long UnsignedChannelAnnouncement_get_features(long this_ptr);
4926         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
4927         public static native void UnsignedChannelAnnouncement_set_features(long this_ptr, long val);
4928         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
4929         public static native byte[] UnsignedChannelAnnouncement_get_chain_hash(long this_ptr);
4930         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4931         public static native void UnsignedChannelAnnouncement_set_chain_hash(long this_ptr, byte[] val);
4932         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
4933         public static native long UnsignedChannelAnnouncement_get_short_channel_id(long this_ptr);
4934         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
4935         public static native void UnsignedChannelAnnouncement_set_short_channel_id(long this_ptr, long val);
4936         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
4937         public static native byte[] UnsignedChannelAnnouncement_get_node_id_1(long this_ptr);
4938         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4939         public static native void UnsignedChannelAnnouncement_set_node_id_1(long this_ptr, byte[] val);
4940         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
4941         public static native byte[] UnsignedChannelAnnouncement_get_node_id_2(long this_ptr);
4942         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4943         public static native void UnsignedChannelAnnouncement_set_node_id_2(long this_ptr, byte[] val);
4944         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
4945         public static native byte[] UnsignedChannelAnnouncement_get_bitcoin_key_1(long this_ptr);
4946         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4947         public static native void UnsignedChannelAnnouncement_set_bitcoin_key_1(long this_ptr, byte[] val);
4948         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
4949         public static native byte[] UnsignedChannelAnnouncement_get_bitcoin_key_2(long this_ptr);
4950         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
4951         public static native void UnsignedChannelAnnouncement_set_bitcoin_key_2(long this_ptr, byte[] val);
4952         // uintptr_t UnsignedChannelAnnouncement_clone_ptr(LDKUnsignedChannelAnnouncement *NONNULL_PTR arg);
4953         public static native long UnsignedChannelAnnouncement_clone_ptr(long arg);
4954         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
4955         public static native long UnsignedChannelAnnouncement_clone(long orig);
4956         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
4957         public static native void ChannelAnnouncement_free(long this_obj);
4958         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
4959         public static native byte[] ChannelAnnouncement_get_node_signature_1(long this_ptr);
4960         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
4961         public static native void ChannelAnnouncement_set_node_signature_1(long this_ptr, byte[] val);
4962         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
4963         public static native byte[] ChannelAnnouncement_get_node_signature_2(long this_ptr);
4964         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
4965         public static native void ChannelAnnouncement_set_node_signature_2(long this_ptr, byte[] val);
4966         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
4967         public static native byte[] ChannelAnnouncement_get_bitcoin_signature_1(long this_ptr);
4968         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
4969         public static native void ChannelAnnouncement_set_bitcoin_signature_1(long this_ptr, byte[] val);
4970         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
4971         public static native byte[] ChannelAnnouncement_get_bitcoin_signature_2(long this_ptr);
4972         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
4973         public static native void ChannelAnnouncement_set_bitcoin_signature_2(long this_ptr, byte[] val);
4974         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
4975         public static native long ChannelAnnouncement_get_contents(long this_ptr);
4976         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
4977         public static native void ChannelAnnouncement_set_contents(long this_ptr, long val);
4978         // 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);
4979         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);
4980         // uintptr_t ChannelAnnouncement_clone_ptr(LDKChannelAnnouncement *NONNULL_PTR arg);
4981         public static native long ChannelAnnouncement_clone_ptr(long arg);
4982         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
4983         public static native long ChannelAnnouncement_clone(long orig);
4984         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
4985         public static native void UnsignedChannelUpdate_free(long this_obj);
4986         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
4987         public static native byte[] UnsignedChannelUpdate_get_chain_hash(long this_ptr);
4988         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
4989         public static native void UnsignedChannelUpdate_set_chain_hash(long this_ptr, byte[] val);
4990         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
4991         public static native long UnsignedChannelUpdate_get_short_channel_id(long this_ptr);
4992         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
4993         public static native void UnsignedChannelUpdate_set_short_channel_id(long this_ptr, long val);
4994         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
4995         public static native int UnsignedChannelUpdate_get_timestamp(long this_ptr);
4996         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
4997         public static native void UnsignedChannelUpdate_set_timestamp(long this_ptr, int val);
4998         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
4999         public static native byte UnsignedChannelUpdate_get_flags(long this_ptr);
5000         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
5001         public static native void UnsignedChannelUpdate_set_flags(long this_ptr, byte val);
5002         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
5003         public static native short UnsignedChannelUpdate_get_cltv_expiry_delta(long this_ptr);
5004         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
5005         public static native void UnsignedChannelUpdate_set_cltv_expiry_delta(long this_ptr, short val);
5006         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
5007         public static native long UnsignedChannelUpdate_get_htlc_minimum_msat(long this_ptr);
5008         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
5009         public static native void UnsignedChannelUpdate_set_htlc_minimum_msat(long this_ptr, long val);
5010         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
5011         public static native int UnsignedChannelUpdate_get_fee_base_msat(long this_ptr);
5012         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
5013         public static native void UnsignedChannelUpdate_set_fee_base_msat(long this_ptr, int val);
5014         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
5015         public static native int UnsignedChannelUpdate_get_fee_proportional_millionths(long this_ptr);
5016         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
5017         public static native void UnsignedChannelUpdate_set_fee_proportional_millionths(long this_ptr, int val);
5018         // uintptr_t UnsignedChannelUpdate_clone_ptr(LDKUnsignedChannelUpdate *NONNULL_PTR arg);
5019         public static native long UnsignedChannelUpdate_clone_ptr(long arg);
5020         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
5021         public static native long UnsignedChannelUpdate_clone(long orig);
5022         // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
5023         public static native void ChannelUpdate_free(long this_obj);
5024         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
5025         public static native byte[] ChannelUpdate_get_signature(long this_ptr);
5026         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
5027         public static native void ChannelUpdate_set_signature(long this_ptr, byte[] val);
5028         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
5029         public static native long ChannelUpdate_get_contents(long this_ptr);
5030         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
5031         public static native void ChannelUpdate_set_contents(long this_ptr, long val);
5032         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
5033         public static native long ChannelUpdate_new(byte[] signature_arg, long contents_arg);
5034         // uintptr_t ChannelUpdate_clone_ptr(LDKChannelUpdate *NONNULL_PTR arg);
5035         public static native long ChannelUpdate_clone_ptr(long arg);
5036         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
5037         public static native long ChannelUpdate_clone(long orig);
5038         // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
5039         public static native void QueryChannelRange_free(long this_obj);
5040         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
5041         public static native byte[] QueryChannelRange_get_chain_hash(long this_ptr);
5042         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5043         public static native void QueryChannelRange_set_chain_hash(long this_ptr, byte[] val);
5044         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
5045         public static native int QueryChannelRange_get_first_blocknum(long this_ptr);
5046         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
5047         public static native void QueryChannelRange_set_first_blocknum(long this_ptr, int val);
5048         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
5049         public static native int QueryChannelRange_get_number_of_blocks(long this_ptr);
5050         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
5051         public static native void QueryChannelRange_set_number_of_blocks(long this_ptr, int val);
5052         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
5053         public static native long QueryChannelRange_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg);
5054         // uintptr_t QueryChannelRange_clone_ptr(LDKQueryChannelRange *NONNULL_PTR arg);
5055         public static native long QueryChannelRange_clone_ptr(long arg);
5056         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
5057         public static native long QueryChannelRange_clone(long orig);
5058         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
5059         public static native void ReplyChannelRange_free(long this_obj);
5060         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
5061         public static native byte[] ReplyChannelRange_get_chain_hash(long this_ptr);
5062         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5063         public static native void ReplyChannelRange_set_chain_hash(long this_ptr, byte[] val);
5064         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
5065         public static native int ReplyChannelRange_get_first_blocknum(long this_ptr);
5066         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
5067         public static native void ReplyChannelRange_set_first_blocknum(long this_ptr, int val);
5068         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
5069         public static native int ReplyChannelRange_get_number_of_blocks(long this_ptr);
5070         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
5071         public static native void ReplyChannelRange_set_number_of_blocks(long this_ptr, int val);
5072         // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
5073         public static native boolean ReplyChannelRange_get_sync_complete(long this_ptr);
5074         // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
5075         public static native void ReplyChannelRange_set_sync_complete(long this_ptr, boolean val);
5076         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
5077         public static native void ReplyChannelRange_set_short_channel_ids(long this_ptr, long[] val);
5078         // 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);
5079         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);
5080         // uintptr_t ReplyChannelRange_clone_ptr(LDKReplyChannelRange *NONNULL_PTR arg);
5081         public static native long ReplyChannelRange_clone_ptr(long arg);
5082         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
5083         public static native long ReplyChannelRange_clone(long orig);
5084         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
5085         public static native void QueryShortChannelIds_free(long this_obj);
5086         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
5087         public static native byte[] QueryShortChannelIds_get_chain_hash(long this_ptr);
5088         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5089         public static native void QueryShortChannelIds_set_chain_hash(long this_ptr, byte[] val);
5090         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
5091         public static native void QueryShortChannelIds_set_short_channel_ids(long this_ptr, long[] val);
5092         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
5093         public static native long QueryShortChannelIds_new(byte[] chain_hash_arg, long[] short_channel_ids_arg);
5094         // uintptr_t QueryShortChannelIds_clone_ptr(LDKQueryShortChannelIds *NONNULL_PTR arg);
5095         public static native long QueryShortChannelIds_clone_ptr(long arg);
5096         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
5097         public static native long QueryShortChannelIds_clone(long orig);
5098         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
5099         public static native void ReplyShortChannelIdsEnd_free(long this_obj);
5100         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
5101         public static native byte[] ReplyShortChannelIdsEnd_get_chain_hash(long this_ptr);
5102         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5103         public static native void ReplyShortChannelIdsEnd_set_chain_hash(long this_ptr, byte[] val);
5104         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
5105         public static native boolean ReplyShortChannelIdsEnd_get_full_information(long this_ptr);
5106         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
5107         public static native void ReplyShortChannelIdsEnd_set_full_information(long this_ptr, boolean val);
5108         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
5109         public static native long ReplyShortChannelIdsEnd_new(byte[] chain_hash_arg, boolean full_information_arg);
5110         // uintptr_t ReplyShortChannelIdsEnd_clone_ptr(LDKReplyShortChannelIdsEnd *NONNULL_PTR arg);
5111         public static native long ReplyShortChannelIdsEnd_clone_ptr(long arg);
5112         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
5113         public static native long ReplyShortChannelIdsEnd_clone(long orig);
5114         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
5115         public static native void GossipTimestampFilter_free(long this_obj);
5116         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
5117         public static native byte[] GossipTimestampFilter_get_chain_hash(long this_ptr);
5118         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5119         public static native void GossipTimestampFilter_set_chain_hash(long this_ptr, byte[] val);
5120         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
5121         public static native int GossipTimestampFilter_get_first_timestamp(long this_ptr);
5122         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
5123         public static native void GossipTimestampFilter_set_first_timestamp(long this_ptr, int val);
5124         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
5125         public static native int GossipTimestampFilter_get_timestamp_range(long this_ptr);
5126         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
5127         public static native void GossipTimestampFilter_set_timestamp_range(long this_ptr, int val);
5128         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
5129         public static native long GossipTimestampFilter_new(byte[] chain_hash_arg, int first_timestamp_arg, int timestamp_range_arg);
5130         // uintptr_t GossipTimestampFilter_clone_ptr(LDKGossipTimestampFilter *NONNULL_PTR arg);
5131         public static native long GossipTimestampFilter_clone_ptr(long arg);
5132         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
5133         public static native long GossipTimestampFilter_clone(long orig);
5134         // void ErrorAction_free(struct LDKErrorAction this_ptr);
5135         public static native void ErrorAction_free(long this_ptr);
5136         // uintptr_t ErrorAction_clone_ptr(LDKErrorAction *NONNULL_PTR arg);
5137         public static native long ErrorAction_clone_ptr(long arg);
5138         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
5139         public static native long ErrorAction_clone(long orig);
5140         // struct LDKErrorAction ErrorAction_disconnect_peer(struct LDKErrorMessage msg);
5141         public static native long ErrorAction_disconnect_peer(long msg);
5142         // struct LDKErrorAction ErrorAction_ignore_error(void);
5143         public static native long ErrorAction_ignore_error();
5144         // struct LDKErrorAction ErrorAction_ignore_and_log(enum LDKLevel a);
5145         public static native long ErrorAction_ignore_and_log(Level a);
5146         // struct LDKErrorAction ErrorAction_ignore_duplicate_gossip(void);
5147         public static native long ErrorAction_ignore_duplicate_gossip();
5148         // struct LDKErrorAction ErrorAction_send_error_message(struct LDKErrorMessage msg);
5149         public static native long ErrorAction_send_error_message(long msg);
5150         // void LightningError_free(struct LDKLightningError this_obj);
5151         public static native void LightningError_free(long this_obj);
5152         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
5153         public static native String LightningError_get_err(long this_ptr);
5154         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKStr val);
5155         public static native void LightningError_set_err(long this_ptr, String val);
5156         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
5157         public static native long LightningError_get_action(long this_ptr);
5158         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
5159         public static native void LightningError_set_action(long this_ptr, long val);
5160         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKStr err_arg, struct LDKErrorAction action_arg);
5161         public static native long LightningError_new(String err_arg, long action_arg);
5162         // uintptr_t LightningError_clone_ptr(LDKLightningError *NONNULL_PTR arg);
5163         public static native long LightningError_clone_ptr(long arg);
5164         // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
5165         public static native long LightningError_clone(long orig);
5166         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
5167         public static native void CommitmentUpdate_free(long this_obj);
5168         // struct LDKCVec_UpdateAddHTLCZ CommitmentUpdate_get_update_add_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
5169         public static native long[] CommitmentUpdate_get_update_add_htlcs(long this_ptr);
5170         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
5171         public static native void CommitmentUpdate_set_update_add_htlcs(long this_ptr, long[] val);
5172         // struct LDKCVec_UpdateFulfillHTLCZ CommitmentUpdate_get_update_fulfill_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
5173         public static native long[] CommitmentUpdate_get_update_fulfill_htlcs(long this_ptr);
5174         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
5175         public static native void CommitmentUpdate_set_update_fulfill_htlcs(long this_ptr, long[] val);
5176         // struct LDKCVec_UpdateFailHTLCZ CommitmentUpdate_get_update_fail_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
5177         public static native long[] CommitmentUpdate_get_update_fail_htlcs(long this_ptr);
5178         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
5179         public static native void CommitmentUpdate_set_update_fail_htlcs(long this_ptr, long[] val);
5180         // struct LDKCVec_UpdateFailMalformedHTLCZ CommitmentUpdate_get_update_fail_malformed_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
5181         public static native long[] CommitmentUpdate_get_update_fail_malformed_htlcs(long this_ptr);
5182         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
5183         public static native void CommitmentUpdate_set_update_fail_malformed_htlcs(long this_ptr, long[] val);
5184         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
5185         public static native long CommitmentUpdate_get_update_fee(long this_ptr);
5186         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
5187         public static native void CommitmentUpdate_set_update_fee(long this_ptr, long val);
5188         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
5189         public static native long CommitmentUpdate_get_commitment_signed(long this_ptr);
5190         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
5191         public static native void CommitmentUpdate_set_commitment_signed(long this_ptr, long val);
5192         // 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);
5193         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);
5194         // uintptr_t CommitmentUpdate_clone_ptr(LDKCommitmentUpdate *NONNULL_PTR arg);
5195         public static native long CommitmentUpdate_clone_ptr(long arg);
5196         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
5197         public static native long CommitmentUpdate_clone(long orig);
5198         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
5199         public static native void ChannelMessageHandler_free(long this_ptr);
5200         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
5201         public static native void RoutingMessageHandler_free(long this_ptr);
5202         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
5203         public static native byte[] AcceptChannel_write(long obj);
5204         // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
5205         public static native long AcceptChannel_read(byte[] ser);
5206         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
5207         public static native byte[] AnnouncementSignatures_write(long obj);
5208         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
5209         public static native long AnnouncementSignatures_read(byte[] ser);
5210         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
5211         public static native byte[] ChannelReestablish_write(long obj);
5212         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
5213         public static native long ChannelReestablish_read(byte[] ser);
5214         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
5215         public static native byte[] ClosingSigned_write(long obj);
5216         // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
5217         public static native long ClosingSigned_read(byte[] ser);
5218         // struct LDKCVec_u8Z ClosingSignedFeeRange_write(const struct LDKClosingSignedFeeRange *NONNULL_PTR obj);
5219         public static native byte[] ClosingSignedFeeRange_write(long obj);
5220         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ ClosingSignedFeeRange_read(struct LDKu8slice ser);
5221         public static native long ClosingSignedFeeRange_read(byte[] ser);
5222         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
5223         public static native byte[] CommitmentSigned_write(long obj);
5224         // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
5225         public static native long CommitmentSigned_read(byte[] ser);
5226         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
5227         public static native byte[] FundingCreated_write(long obj);
5228         // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
5229         public static native long FundingCreated_read(byte[] ser);
5230         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
5231         public static native byte[] FundingSigned_write(long obj);
5232         // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
5233         public static native long FundingSigned_read(byte[] ser);
5234         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
5235         public static native byte[] FundingLocked_write(long obj);
5236         // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
5237         public static native long FundingLocked_read(byte[] ser);
5238         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
5239         public static native byte[] Init_write(long obj);
5240         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
5241         public static native long Init_read(byte[] ser);
5242         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
5243         public static native byte[] OpenChannel_write(long obj);
5244         // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
5245         public static native long OpenChannel_read(byte[] ser);
5246         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
5247         public static native byte[] RevokeAndACK_write(long obj);
5248         // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
5249         public static native long RevokeAndACK_read(byte[] ser);
5250         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
5251         public static native byte[] Shutdown_write(long obj);
5252         // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
5253         public static native long Shutdown_read(byte[] ser);
5254         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
5255         public static native byte[] UpdateFailHTLC_write(long obj);
5256         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
5257         public static native long UpdateFailHTLC_read(byte[] ser);
5258         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
5259         public static native byte[] UpdateFailMalformedHTLC_write(long obj);
5260         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
5261         public static native long UpdateFailMalformedHTLC_read(byte[] ser);
5262         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
5263         public static native byte[] UpdateFee_write(long obj);
5264         // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
5265         public static native long UpdateFee_read(byte[] ser);
5266         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
5267         public static native byte[] UpdateFulfillHTLC_write(long obj);
5268         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
5269         public static native long UpdateFulfillHTLC_read(byte[] ser);
5270         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
5271         public static native byte[] UpdateAddHTLC_write(long obj);
5272         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
5273         public static native long UpdateAddHTLC_read(byte[] ser);
5274         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
5275         public static native byte[] Ping_write(long obj);
5276         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
5277         public static native long Ping_read(byte[] ser);
5278         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
5279         public static native byte[] Pong_write(long obj);
5280         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
5281         public static native long Pong_read(byte[] ser);
5282         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
5283         public static native byte[] UnsignedChannelAnnouncement_write(long obj);
5284         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
5285         public static native long UnsignedChannelAnnouncement_read(byte[] ser);
5286         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
5287         public static native byte[] ChannelAnnouncement_write(long obj);
5288         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
5289         public static native long ChannelAnnouncement_read(byte[] ser);
5290         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
5291         public static native byte[] UnsignedChannelUpdate_write(long obj);
5292         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
5293         public static native long UnsignedChannelUpdate_read(byte[] ser);
5294         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
5295         public static native byte[] ChannelUpdate_write(long obj);
5296         // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
5297         public static native long ChannelUpdate_read(byte[] ser);
5298         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
5299         public static native byte[] ErrorMessage_write(long obj);
5300         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
5301         public static native long ErrorMessage_read(byte[] ser);
5302         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
5303         public static native byte[] UnsignedNodeAnnouncement_write(long obj);
5304         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
5305         public static native long UnsignedNodeAnnouncement_read(byte[] ser);
5306         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
5307         public static native byte[] NodeAnnouncement_write(long obj);
5308         // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
5309         public static native long NodeAnnouncement_read(byte[] ser);
5310         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
5311         public static native long QueryShortChannelIds_read(byte[] ser);
5312         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
5313         public static native byte[] QueryShortChannelIds_write(long obj);
5314         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
5315         public static native byte[] ReplyShortChannelIdsEnd_write(long obj);
5316         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
5317         public static native long ReplyShortChannelIdsEnd_read(byte[] ser);
5318         // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
5319         public static native int QueryChannelRange_end_blocknum(long this_arg);
5320         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
5321         public static native byte[] QueryChannelRange_write(long obj);
5322         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
5323         public static native long QueryChannelRange_read(byte[] ser);
5324         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
5325         public static native long ReplyChannelRange_read(byte[] ser);
5326         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
5327         public static native byte[] ReplyChannelRange_write(long obj);
5328         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
5329         public static native byte[] GossipTimestampFilter_write(long obj);
5330         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
5331         public static native long GossipTimestampFilter_read(byte[] ser);
5332         // void CustomMessageHandler_free(struct LDKCustomMessageHandler this_ptr);
5333         public static native void CustomMessageHandler_free(long this_ptr);
5334         // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
5335         public static native void IgnoringMessageHandler_free(long this_obj);
5336         // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
5337         public static native long IgnoringMessageHandler_new();
5338         // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
5339         public static native long IgnoringMessageHandler_as_MessageSendEventsProvider(long this_arg);
5340         // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
5341         public static native long IgnoringMessageHandler_as_RoutingMessageHandler(long this_arg);
5342         // struct LDKCustomMessageReader IgnoringMessageHandler_as_CustomMessageReader(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
5343         public static native long IgnoringMessageHandler_as_CustomMessageReader(long this_arg);
5344         // struct LDKCustomMessageHandler IgnoringMessageHandler_as_CustomMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
5345         public static native long IgnoringMessageHandler_as_CustomMessageHandler(long this_arg);
5346         // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
5347         public static native void ErroringMessageHandler_free(long this_obj);
5348         // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
5349         public static native long ErroringMessageHandler_new();
5350         // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
5351         public static native long ErroringMessageHandler_as_MessageSendEventsProvider(long this_arg);
5352         // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
5353         public static native long ErroringMessageHandler_as_ChannelMessageHandler(long this_arg);
5354         // void MessageHandler_free(struct LDKMessageHandler this_obj);
5355         public static native void MessageHandler_free(long this_obj);
5356         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
5357         public static native long MessageHandler_get_chan_handler(long this_ptr);
5358         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
5359         public static native void MessageHandler_set_chan_handler(long this_ptr, long val);
5360         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
5361         public static native long MessageHandler_get_route_handler(long this_ptr);
5362         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
5363         public static native void MessageHandler_set_route_handler(long this_ptr, long val);
5364         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
5365         public static native long MessageHandler_new(long chan_handler_arg, long route_handler_arg);
5366         // uintptr_t SocketDescriptor_clone_ptr(LDKSocketDescriptor *NONNULL_PTR arg);
5367         public static native long SocketDescriptor_clone_ptr(long arg);
5368         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
5369         public static native long SocketDescriptor_clone(long orig);
5370         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
5371         public static native void SocketDescriptor_free(long this_ptr);
5372         // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
5373         public static native void PeerHandleError_free(long this_obj);
5374         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
5375         public static native boolean PeerHandleError_get_no_connection_possible(long this_ptr);
5376         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
5377         public static native void PeerHandleError_set_no_connection_possible(long this_ptr, boolean val);
5378         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
5379         public static native long PeerHandleError_new(boolean no_connection_possible_arg);
5380         // uintptr_t PeerHandleError_clone_ptr(LDKPeerHandleError *NONNULL_PTR arg);
5381         public static native long PeerHandleError_clone_ptr(long arg);
5382         // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
5383         public static native long PeerHandleError_clone(long orig);
5384         // void PeerManager_free(struct LDKPeerManager this_obj);
5385         public static native void PeerManager_free(long this_obj);
5386         // 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);
5387         public static native long PeerManager_new(long message_handler, byte[] our_node_secret, byte[] ephemeral_random_data, long logger, long custom_message_handler);
5388         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
5389         public static native byte[][] PeerManager_get_peer_node_ids(long this_arg);
5390         // 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);
5391         public static native long PeerManager_new_outbound_connection(long this_arg, byte[] their_node_id, long descriptor);
5392         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
5393         public static native long PeerManager_new_inbound_connection(long this_arg, long descriptor);
5394         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
5395         public static native long PeerManager_write_buffer_space_avail(long this_arg, long descriptor);
5396         // 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);
5397         public static native long PeerManager_read_event(long this_arg, long peer_descriptor, byte[] data);
5398         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
5399         public static native void PeerManager_process_events(long this_arg);
5400         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
5401         public static native void PeerManager_socket_disconnected(long this_arg, long descriptor);
5402         // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
5403         public static native void PeerManager_disconnect_by_node_id(long this_arg, byte[] node_id, boolean no_connection_possible);
5404         // void PeerManager_disconnect_all_peers(const struct LDKPeerManager *NONNULL_PTR this_arg);
5405         public static native void PeerManager_disconnect_all_peers(long this_arg);
5406         // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
5407         public static native void PeerManager_timer_tick_occurred(long this_arg);
5408         // uint64_t htlc_success_tx_weight(bool opt_anchors);
5409         public static native long htlc_success_tx_weight(boolean opt_anchors);
5410         // uint64_t htlc_timeout_tx_weight(bool opt_anchors);
5411         public static native long htlc_timeout_tx_weight(boolean opt_anchors);
5412         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
5413         public static native byte[] build_commitment_secret(byte[] commitment_seed, long idx);
5414         // 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);
5415         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);
5416         // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
5417         public static native long derive_private_key(byte[] per_commitment_point, byte[] base_secret);
5418         // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
5419         public static native long derive_public_key(byte[] per_commitment_point, byte[] base_point);
5420         // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
5421         public static native long derive_private_revocation_key(byte[] per_commitment_secret, byte[] countersignatory_revocation_base_secret);
5422         // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
5423         public static native long derive_public_revocation_key(byte[] per_commitment_point, byte[] countersignatory_revocation_base_point);
5424         // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
5425         public static native void TxCreationKeys_free(long this_obj);
5426         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
5427         public static native byte[] TxCreationKeys_get_per_commitment_point(long this_ptr);
5428         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5429         public static native void TxCreationKeys_set_per_commitment_point(long this_ptr, byte[] val);
5430         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
5431         public static native byte[] TxCreationKeys_get_revocation_key(long this_ptr);
5432         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5433         public static native void TxCreationKeys_set_revocation_key(long this_ptr, byte[] val);
5434         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
5435         public static native byte[] TxCreationKeys_get_broadcaster_htlc_key(long this_ptr);
5436         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5437         public static native void TxCreationKeys_set_broadcaster_htlc_key(long this_ptr, byte[] val);
5438         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
5439         public static native byte[] TxCreationKeys_get_countersignatory_htlc_key(long this_ptr);
5440         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5441         public static native void TxCreationKeys_set_countersignatory_htlc_key(long this_ptr, byte[] val);
5442         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
5443         public static native byte[] TxCreationKeys_get_broadcaster_delayed_payment_key(long this_ptr);
5444         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5445         public static native void TxCreationKeys_set_broadcaster_delayed_payment_key(long this_ptr, byte[] val);
5446         // 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);
5447         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);
5448         // uintptr_t TxCreationKeys_clone_ptr(LDKTxCreationKeys *NONNULL_PTR arg);
5449         public static native long TxCreationKeys_clone_ptr(long arg);
5450         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
5451         public static native long TxCreationKeys_clone(long orig);
5452         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
5453         public static native byte[] TxCreationKeys_write(long obj);
5454         // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
5455         public static native long TxCreationKeys_read(byte[] ser);
5456         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
5457         public static native void ChannelPublicKeys_free(long this_obj);
5458         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
5459         public static native byte[] ChannelPublicKeys_get_funding_pubkey(long this_ptr);
5460         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5461         public static native void ChannelPublicKeys_set_funding_pubkey(long this_ptr, byte[] val);
5462         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
5463         public static native byte[] ChannelPublicKeys_get_revocation_basepoint(long this_ptr);
5464         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5465         public static native void ChannelPublicKeys_set_revocation_basepoint(long this_ptr, byte[] val);
5466         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
5467         public static native byte[] ChannelPublicKeys_get_payment_point(long this_ptr);
5468         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5469         public static native void ChannelPublicKeys_set_payment_point(long this_ptr, byte[] val);
5470         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
5471         public static native byte[] ChannelPublicKeys_get_delayed_payment_basepoint(long this_ptr);
5472         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5473         public static native void ChannelPublicKeys_set_delayed_payment_basepoint(long this_ptr, byte[] val);
5474         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
5475         public static native byte[] ChannelPublicKeys_get_htlc_basepoint(long this_ptr);
5476         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5477         public static native void ChannelPublicKeys_set_htlc_basepoint(long this_ptr, byte[] val);
5478         // 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);
5479         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);
5480         // uintptr_t ChannelPublicKeys_clone_ptr(LDKChannelPublicKeys *NONNULL_PTR arg);
5481         public static native long ChannelPublicKeys_clone_ptr(long arg);
5482         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
5483         public static native long ChannelPublicKeys_clone(long orig);
5484         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
5485         public static native byte[] ChannelPublicKeys_write(long obj);
5486         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
5487         public static native long ChannelPublicKeys_read(byte[] ser);
5488         // 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);
5489         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);
5490         // 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);
5491         public static native long TxCreationKeys_from_channel_static_keys(byte[] per_commitment_point, long broadcaster_keys, long countersignatory_keys);
5492         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
5493         public static native byte[] get_revokeable_redeemscript(byte[] revocation_key, short contest_delay, byte[] broadcaster_delayed_payment_key);
5494         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
5495         public static native void HTLCOutputInCommitment_free(long this_obj);
5496         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
5497         public static native boolean HTLCOutputInCommitment_get_offered(long this_ptr);
5498         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
5499         public static native void HTLCOutputInCommitment_set_offered(long this_ptr, boolean val);
5500         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
5501         public static native long HTLCOutputInCommitment_get_amount_msat(long this_ptr);
5502         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
5503         public static native void HTLCOutputInCommitment_set_amount_msat(long this_ptr, long val);
5504         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
5505         public static native int HTLCOutputInCommitment_get_cltv_expiry(long this_ptr);
5506         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
5507         public static native void HTLCOutputInCommitment_set_cltv_expiry(long this_ptr, int val);
5508         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
5509         public static native byte[] HTLCOutputInCommitment_get_payment_hash(long this_ptr);
5510         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5511         public static native void HTLCOutputInCommitment_set_payment_hash(long this_ptr, byte[] val);
5512         // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
5513         public static native long HTLCOutputInCommitment_get_transaction_output_index(long this_ptr);
5514         // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
5515         public static native void HTLCOutputInCommitment_set_transaction_output_index(long this_ptr, long val);
5516         // 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);
5517         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);
5518         // uintptr_t HTLCOutputInCommitment_clone_ptr(LDKHTLCOutputInCommitment *NONNULL_PTR arg);
5519         public static native long HTLCOutputInCommitment_clone_ptr(long arg);
5520         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
5521         public static native long HTLCOutputInCommitment_clone(long orig);
5522         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
5523         public static native byte[] HTLCOutputInCommitment_write(long obj);
5524         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
5525         public static native long HTLCOutputInCommitment_read(byte[] ser);
5526         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, bool opt_anchors, const struct LDKTxCreationKeys *NONNULL_PTR keys);
5527         public static native byte[] get_htlc_redeemscript(long htlc, boolean opt_anchors, long keys);
5528         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
5529         public static native byte[] make_funding_redeemscript(byte[] broadcaster, byte[] countersignatory);
5530         // 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, bool opt_anchors, struct LDKPublicKey broadcaster_delayed_payment_key, struct LDKPublicKey revocation_key);
5531         public static native byte[] build_htlc_transaction(byte[] commitment_txid, int feerate_per_kw, short contest_delay, long htlc, boolean opt_anchors, byte[] broadcaster_delayed_payment_key, byte[] revocation_key);
5532         // struct LDKCVec_u8Z get_anchor_redeemscript(struct LDKPublicKey funding_pubkey);
5533         public static native byte[] get_anchor_redeemscript(byte[] funding_pubkey);
5534         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
5535         public static native void ChannelTransactionParameters_free(long this_obj);
5536         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
5537         public static native long ChannelTransactionParameters_get_holder_pubkeys(long this_ptr);
5538         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
5539         public static native void ChannelTransactionParameters_set_holder_pubkeys(long this_ptr, long val);
5540         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
5541         public static native short ChannelTransactionParameters_get_holder_selected_contest_delay(long this_ptr);
5542         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
5543         public static native void ChannelTransactionParameters_set_holder_selected_contest_delay(long this_ptr, short val);
5544         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
5545         public static native boolean ChannelTransactionParameters_get_is_outbound_from_holder(long this_ptr);
5546         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
5547         public static native void ChannelTransactionParameters_set_is_outbound_from_holder(long this_ptr, boolean val);
5548         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
5549         public static native long ChannelTransactionParameters_get_counterparty_parameters(long this_ptr);
5550         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
5551         public static native void ChannelTransactionParameters_set_counterparty_parameters(long this_ptr, long val);
5552         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
5553         public static native long ChannelTransactionParameters_get_funding_outpoint(long this_ptr);
5554         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5555         public static native void ChannelTransactionParameters_set_funding_outpoint(long this_ptr, long val);
5556         // enum LDKCOption_NoneZ ChannelTransactionParameters_get_opt_anchors(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
5557         public static native COption_NoneZ ChannelTransactionParameters_get_opt_anchors(long this_ptr);
5558         // void ChannelTransactionParameters_set_opt_anchors(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, enum LDKCOption_NoneZ val);
5559         public static native void ChannelTransactionParameters_set_opt_anchors(long this_ptr, COption_NoneZ val);
5560         // 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, enum LDKCOption_NoneZ opt_anchors_arg);
5561         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, COption_NoneZ opt_anchors_arg);
5562         // uintptr_t ChannelTransactionParameters_clone_ptr(LDKChannelTransactionParameters *NONNULL_PTR arg);
5563         public static native long ChannelTransactionParameters_clone_ptr(long arg);
5564         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
5565         public static native long ChannelTransactionParameters_clone(long orig);
5566         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
5567         public static native void CounterpartyChannelTransactionParameters_free(long this_obj);
5568         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
5569         public static native long CounterpartyChannelTransactionParameters_get_pubkeys(long this_ptr);
5570         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
5571         public static native void CounterpartyChannelTransactionParameters_set_pubkeys(long this_ptr, long val);
5572         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
5573         public static native short CounterpartyChannelTransactionParameters_get_selected_contest_delay(long this_ptr);
5574         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
5575         public static native void CounterpartyChannelTransactionParameters_set_selected_contest_delay(long this_ptr, short val);
5576         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
5577         public static native long CounterpartyChannelTransactionParameters_new(long pubkeys_arg, short selected_contest_delay_arg);
5578         // uintptr_t CounterpartyChannelTransactionParameters_clone_ptr(LDKCounterpartyChannelTransactionParameters *NONNULL_PTR arg);
5579         public static native long CounterpartyChannelTransactionParameters_clone_ptr(long arg);
5580         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
5581         public static native long CounterpartyChannelTransactionParameters_clone(long orig);
5582         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
5583         public static native boolean ChannelTransactionParameters_is_populated(long this_arg);
5584         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
5585         public static native long ChannelTransactionParameters_as_holder_broadcastable(long this_arg);
5586         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
5587         public static native long ChannelTransactionParameters_as_counterparty_broadcastable(long this_arg);
5588         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
5589         public static native byte[] CounterpartyChannelTransactionParameters_write(long obj);
5590         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
5591         public static native long CounterpartyChannelTransactionParameters_read(byte[] ser);
5592         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
5593         public static native byte[] ChannelTransactionParameters_write(long obj);
5594         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
5595         public static native long ChannelTransactionParameters_read(byte[] ser);
5596         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
5597         public static native void DirectedChannelTransactionParameters_free(long this_obj);
5598         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
5599         public static native long DirectedChannelTransactionParameters_broadcaster_pubkeys(long this_arg);
5600         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
5601         public static native long DirectedChannelTransactionParameters_countersignatory_pubkeys(long this_arg);
5602         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
5603         public static native short DirectedChannelTransactionParameters_contest_delay(long this_arg);
5604         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
5605         public static native boolean DirectedChannelTransactionParameters_is_outbound(long this_arg);
5606         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
5607         public static native long DirectedChannelTransactionParameters_funding_outpoint(long this_arg);
5608         // MUST_USE_RES bool DirectedChannelTransactionParameters_opt_anchors(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
5609         public static native boolean DirectedChannelTransactionParameters_opt_anchors(long this_arg);
5610         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
5611         public static native void HolderCommitmentTransaction_free(long this_obj);
5612         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
5613         public static native byte[] HolderCommitmentTransaction_get_counterparty_sig(long this_ptr);
5614         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
5615         public static native void HolderCommitmentTransaction_set_counterparty_sig(long this_ptr, byte[] val);
5616         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
5617         public static native void HolderCommitmentTransaction_set_counterparty_htlc_sigs(long this_ptr, byte[][] val);
5618         // uintptr_t HolderCommitmentTransaction_clone_ptr(LDKHolderCommitmentTransaction *NONNULL_PTR arg);
5619         public static native long HolderCommitmentTransaction_clone_ptr(long arg);
5620         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
5621         public static native long HolderCommitmentTransaction_clone(long orig);
5622         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
5623         public static native byte[] HolderCommitmentTransaction_write(long obj);
5624         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
5625         public static native long HolderCommitmentTransaction_read(byte[] ser);
5626         // 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);
5627         public static native long HolderCommitmentTransaction_new(long commitment_tx, byte[] counterparty_sig, byte[][] counterparty_htlc_sigs, byte[] holder_funding_key, byte[] counterparty_funding_key);
5628         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
5629         public static native void BuiltCommitmentTransaction_free(long this_obj);
5630         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
5631         public static native byte[] BuiltCommitmentTransaction_get_transaction(long this_ptr);
5632         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
5633         public static native void BuiltCommitmentTransaction_set_transaction(long this_ptr, byte[] val);
5634         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
5635         public static native byte[] BuiltCommitmentTransaction_get_txid(long this_ptr);
5636         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5637         public static native void BuiltCommitmentTransaction_set_txid(long this_ptr, byte[] val);
5638         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
5639         public static native long BuiltCommitmentTransaction_new(byte[] transaction_arg, byte[] txid_arg);
5640         // uintptr_t BuiltCommitmentTransaction_clone_ptr(LDKBuiltCommitmentTransaction *NONNULL_PTR arg);
5641         public static native long BuiltCommitmentTransaction_clone_ptr(long arg);
5642         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
5643         public static native long BuiltCommitmentTransaction_clone(long orig);
5644         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
5645         public static native byte[] BuiltCommitmentTransaction_write(long obj);
5646         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
5647         public static native long BuiltCommitmentTransaction_read(byte[] ser);
5648         // 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);
5649         public static native byte[] BuiltCommitmentTransaction_get_sighash_all(long this_arg, byte[] funding_redeemscript, long channel_value_satoshis);
5650         // 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);
5651         public static native byte[] BuiltCommitmentTransaction_sign(long this_arg, byte[] funding_key, byte[] funding_redeemscript, long channel_value_satoshis);
5652         // void ClosingTransaction_free(struct LDKClosingTransaction this_obj);
5653         public static native void ClosingTransaction_free(long this_obj);
5654         // uintptr_t ClosingTransaction_clone_ptr(LDKClosingTransaction *NONNULL_PTR arg);
5655         public static native long ClosingTransaction_clone_ptr(long arg);
5656         // struct LDKClosingTransaction ClosingTransaction_clone(const struct LDKClosingTransaction *NONNULL_PTR orig);
5657         public static native long ClosingTransaction_clone(long orig);
5658         // uint64_t ClosingTransaction_hash(const struct LDKClosingTransaction *NONNULL_PTR o);
5659         public static native long ClosingTransaction_hash(long o);
5660         // 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);
5661         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);
5662         // MUST_USE_RES struct LDKTrustedClosingTransaction ClosingTransaction_trust(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
5663         public static native long ClosingTransaction_trust(long this_arg);
5664         // MUST_USE_RES struct LDKCResult_TrustedClosingTransactionNoneZ ClosingTransaction_verify(const struct LDKClosingTransaction *NONNULL_PTR this_arg, struct LDKOutPoint funding_outpoint);
5665         public static native long ClosingTransaction_verify(long this_arg, long funding_outpoint);
5666         // MUST_USE_RES uint64_t ClosingTransaction_to_holder_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
5667         public static native long ClosingTransaction_to_holder_value_sat(long this_arg);
5668         // MUST_USE_RES uint64_t ClosingTransaction_to_counterparty_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
5669         public static native long ClosingTransaction_to_counterparty_value_sat(long this_arg);
5670         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_holder_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
5671         public static native byte[] ClosingTransaction_to_holder_script(long this_arg);
5672         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_counterparty_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
5673         public static native byte[] ClosingTransaction_to_counterparty_script(long this_arg);
5674         // void TrustedClosingTransaction_free(struct LDKTrustedClosingTransaction this_obj);
5675         public static native void TrustedClosingTransaction_free(long this_obj);
5676         // MUST_USE_RES struct LDKTransaction TrustedClosingTransaction_built_transaction(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg);
5677         public static native byte[] TrustedClosingTransaction_built_transaction(long this_arg);
5678         // 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);
5679         public static native byte[] TrustedClosingTransaction_get_sighash_all(long this_arg, byte[] funding_redeemscript, long channel_value_satoshis);
5680         // 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);
5681         public static native byte[] TrustedClosingTransaction_sign(long this_arg, byte[] funding_key, byte[] funding_redeemscript, long channel_value_satoshis);
5682         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
5683         public static native void CommitmentTransaction_free(long this_obj);
5684         // uintptr_t CommitmentTransaction_clone_ptr(LDKCommitmentTransaction *NONNULL_PTR arg);
5685         public static native long CommitmentTransaction_clone_ptr(long arg);
5686         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
5687         public static native long CommitmentTransaction_clone(long orig);
5688         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
5689         public static native byte[] CommitmentTransaction_write(long obj);
5690         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
5691         public static native long CommitmentTransaction_read(byte[] ser);
5692         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
5693         public static native long CommitmentTransaction_commitment_number(long this_arg);
5694         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
5695         public static native long CommitmentTransaction_to_broadcaster_value_sat(long this_arg);
5696         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
5697         public static native long CommitmentTransaction_to_countersignatory_value_sat(long this_arg);
5698         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
5699         public static native int CommitmentTransaction_feerate_per_kw(long this_arg);
5700         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
5701         public static native long CommitmentTransaction_trust(long this_arg);
5702         // 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);
5703         public static native long CommitmentTransaction_verify(long this_arg, long channel_parameters, long broadcaster_keys, long countersignatory_keys);
5704         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
5705         public static native void TrustedCommitmentTransaction_free(long this_obj);
5706         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
5707         public static native byte[] TrustedCommitmentTransaction_txid(long this_arg);
5708         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
5709         public static native long TrustedCommitmentTransaction_built_transaction(long this_arg);
5710         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
5711         public static native long TrustedCommitmentTransaction_keys(long this_arg);
5712         // MUST_USE_RES bool TrustedCommitmentTransaction_opt_anchors(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
5713         public static native boolean TrustedCommitmentTransaction_opt_anchors(long this_arg);
5714         // 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);
5715         public static native long TrustedCommitmentTransaction_get_htlc_sigs(long this_arg, byte[] htlc_base_key, long channel_parameters);
5716         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
5717         public static native long get_commitment_transaction_number_obscure_factor(byte[] broadcaster_payment_basepoint, byte[] countersignatory_payment_basepoint, boolean outbound_from_broadcaster);
5718         // bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b);
5719         public static native boolean InitFeatures_eq(long a, long b);
5720         // bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b);
5721         public static native boolean NodeFeatures_eq(long a, long b);
5722         // bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b);
5723         public static native boolean ChannelFeatures_eq(long a, long b);
5724         // bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b);
5725         public static native boolean InvoiceFeatures_eq(long a, long b);
5726         // bool ChannelTypeFeatures_eq(const struct LDKChannelTypeFeatures *NONNULL_PTR a, const struct LDKChannelTypeFeatures *NONNULL_PTR b);
5727         public static native boolean ChannelTypeFeatures_eq(long a, long b);
5728         // uintptr_t InitFeatures_clone_ptr(LDKInitFeatures *NONNULL_PTR arg);
5729         public static native long InitFeatures_clone_ptr(long arg);
5730         // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
5731         public static native long InitFeatures_clone(long orig);
5732         // uintptr_t NodeFeatures_clone_ptr(LDKNodeFeatures *NONNULL_PTR arg);
5733         public static native long NodeFeatures_clone_ptr(long arg);
5734         // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
5735         public static native long NodeFeatures_clone(long orig);
5736         // uintptr_t ChannelFeatures_clone_ptr(LDKChannelFeatures *NONNULL_PTR arg);
5737         public static native long ChannelFeatures_clone_ptr(long arg);
5738         // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
5739         public static native long ChannelFeatures_clone(long orig);
5740         // uintptr_t InvoiceFeatures_clone_ptr(LDKInvoiceFeatures *NONNULL_PTR arg);
5741         public static native long InvoiceFeatures_clone_ptr(long arg);
5742         // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
5743         public static native long InvoiceFeatures_clone(long orig);
5744         // uintptr_t ChannelTypeFeatures_clone_ptr(LDKChannelTypeFeatures *NONNULL_PTR arg);
5745         public static native long ChannelTypeFeatures_clone_ptr(long arg);
5746         // struct LDKChannelTypeFeatures ChannelTypeFeatures_clone(const struct LDKChannelTypeFeatures *NONNULL_PTR orig);
5747         public static native long ChannelTypeFeatures_clone(long orig);
5748         // void InitFeatures_free(struct LDKInitFeatures this_obj);
5749         public static native void InitFeatures_free(long this_obj);
5750         // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
5751         public static native void NodeFeatures_free(long this_obj);
5752         // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
5753         public static native void ChannelFeatures_free(long this_obj);
5754         // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
5755         public static native void InvoiceFeatures_free(long this_obj);
5756         // void ChannelTypeFeatures_free(struct LDKChannelTypeFeatures this_obj);
5757         public static native void ChannelTypeFeatures_free(long this_obj);
5758         // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
5759         public static native long InitFeatures_empty();
5760         // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
5761         public static native long InitFeatures_known();
5762         // MUST_USE_RES bool InitFeatures_requires_unknown_bits(const struct LDKInitFeatures *NONNULL_PTR this_arg);
5763         public static native boolean InitFeatures_requires_unknown_bits(long this_arg);
5764         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
5765         public static native long NodeFeatures_empty();
5766         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
5767         public static native long NodeFeatures_known();
5768         // MUST_USE_RES bool NodeFeatures_requires_unknown_bits(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
5769         public static native boolean NodeFeatures_requires_unknown_bits(long this_arg);
5770         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
5771         public static native long ChannelFeatures_empty();
5772         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
5773         public static native long ChannelFeatures_known();
5774         // MUST_USE_RES bool ChannelFeatures_requires_unknown_bits(const struct LDKChannelFeatures *NONNULL_PTR this_arg);
5775         public static native boolean ChannelFeatures_requires_unknown_bits(long this_arg);
5776         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
5777         public static native long InvoiceFeatures_empty();
5778         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
5779         public static native long InvoiceFeatures_known();
5780         // MUST_USE_RES bool InvoiceFeatures_requires_unknown_bits(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
5781         public static native boolean InvoiceFeatures_requires_unknown_bits(long this_arg);
5782         // MUST_USE_RES struct LDKChannelTypeFeatures ChannelTypeFeatures_empty(void);
5783         public static native long ChannelTypeFeatures_empty();
5784         // MUST_USE_RES struct LDKChannelTypeFeatures ChannelTypeFeatures_known(void);
5785         public static native long ChannelTypeFeatures_known();
5786         // MUST_USE_RES bool ChannelTypeFeatures_requires_unknown_bits(const struct LDKChannelTypeFeatures *NONNULL_PTR this_arg);
5787         public static native boolean ChannelTypeFeatures_requires_unknown_bits(long this_arg);
5788         // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
5789         public static native byte[] InitFeatures_write(long obj);
5790         // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
5791         public static native long InitFeatures_read(byte[] ser);
5792         // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
5793         public static native byte[] ChannelFeatures_write(long obj);
5794         // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
5795         public static native long ChannelFeatures_read(byte[] ser);
5796         // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
5797         public static native byte[] NodeFeatures_write(long obj);
5798         // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
5799         public static native long NodeFeatures_read(byte[] ser);
5800         // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
5801         public static native byte[] InvoiceFeatures_write(long obj);
5802         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
5803         public static native long InvoiceFeatures_read(byte[] ser);
5804         // struct LDKCVec_u8Z ChannelTypeFeatures_write(const struct LDKChannelTypeFeatures *NONNULL_PTR obj);
5805         public static native byte[] ChannelTypeFeatures_write(long obj);
5806         // struct LDKCResult_ChannelTypeFeaturesDecodeErrorZ ChannelTypeFeatures_read(struct LDKu8slice ser);
5807         public static native long ChannelTypeFeatures_read(byte[] ser);
5808         // void ShutdownScript_free(struct LDKShutdownScript this_obj);
5809         public static native void ShutdownScript_free(long this_obj);
5810         // uintptr_t ShutdownScript_clone_ptr(LDKShutdownScript *NONNULL_PTR arg);
5811         public static native long ShutdownScript_clone_ptr(long arg);
5812         // struct LDKShutdownScript ShutdownScript_clone(const struct LDKShutdownScript *NONNULL_PTR orig);
5813         public static native long ShutdownScript_clone(long orig);
5814         // void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
5815         public static native void InvalidShutdownScript_free(long this_obj);
5816         // struct LDKu8slice InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
5817         public static native byte[] InvalidShutdownScript_get_script(long this_ptr);
5818         // void InvalidShutdownScript_set_script(struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
5819         public static native void InvalidShutdownScript_set_script(long this_ptr, byte[] val);
5820         // MUST_USE_RES struct LDKInvalidShutdownScript InvalidShutdownScript_new(struct LDKCVec_u8Z script_arg);
5821         public static native long InvalidShutdownScript_new(byte[] script_arg);
5822         // uintptr_t InvalidShutdownScript_clone_ptr(LDKInvalidShutdownScript *NONNULL_PTR arg);
5823         public static native long InvalidShutdownScript_clone_ptr(long arg);
5824         // struct LDKInvalidShutdownScript InvalidShutdownScript_clone(const struct LDKInvalidShutdownScript *NONNULL_PTR orig);
5825         public static native long InvalidShutdownScript_clone(long orig);
5826         // struct LDKCVec_u8Z ShutdownScript_write(const struct LDKShutdownScript *NONNULL_PTR obj);
5827         public static native byte[] ShutdownScript_write(long obj);
5828         // struct LDKCResult_ShutdownScriptDecodeErrorZ ShutdownScript_read(struct LDKu8slice ser);
5829         public static native long ShutdownScript_read(byte[] ser);
5830         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wpkh(const uint8_t (*pubkey_hash)[20]);
5831         public static native long ShutdownScript_new_p2wpkh(byte[] pubkey_hash);
5832         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wsh(const uint8_t (*script_hash)[32]);
5833         public static native long ShutdownScript_new_p2wsh(byte[] script_hash);
5834         // MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(uint8_t version, struct LDKu8slice program);
5835         public static native long ShutdownScript_new_witness_program(byte version, byte[] program);
5836         // MUST_USE_RES struct LDKCVec_u8Z ShutdownScript_into_inner(struct LDKShutdownScript this_arg);
5837         public static native byte[] ShutdownScript_into_inner(long this_arg);
5838         // MUST_USE_RES struct LDKPublicKey ShutdownScript_as_legacy_pubkey(const struct LDKShutdownScript *NONNULL_PTR this_arg);
5839         public static native byte[] ShutdownScript_as_legacy_pubkey(long this_arg);
5840         // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
5841         public static native boolean ShutdownScript_is_compatible(long this_arg, long features);
5842         // void CustomMessageReader_free(struct LDKCustomMessageReader this_ptr);
5843         public static native void CustomMessageReader_free(long this_ptr);
5844         // uintptr_t Type_clone_ptr(LDKType *NONNULL_PTR arg);
5845         public static native long Type_clone_ptr(long arg);
5846         // struct LDKType Type_clone(const struct LDKType *NONNULL_PTR orig);
5847         public static native long Type_clone(long orig);
5848         // void Type_free(struct LDKType this_ptr);
5849         public static native void Type_free(long this_ptr);
5850         // void NodeId_free(struct LDKNodeId this_obj);
5851         public static native void NodeId_free(long this_obj);
5852         // uintptr_t NodeId_clone_ptr(LDKNodeId *NONNULL_PTR arg);
5853         public static native long NodeId_clone_ptr(long arg);
5854         // struct LDKNodeId NodeId_clone(const struct LDKNodeId *NONNULL_PTR orig);
5855         public static native long NodeId_clone(long orig);
5856         // MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey);
5857         public static native long NodeId_from_pubkey(byte[] pubkey);
5858         // MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg);
5859         public static native byte[] NodeId_as_slice(long this_arg);
5860         // uint64_t NodeId_hash(const struct LDKNodeId *NONNULL_PTR o);
5861         public static native long NodeId_hash(long o);
5862         // struct LDKCVec_u8Z NodeId_write(const struct LDKNodeId *NONNULL_PTR obj);
5863         public static native byte[] NodeId_write(long obj);
5864         // struct LDKCResult_NodeIdDecodeErrorZ NodeId_read(struct LDKu8slice ser);
5865         public static native long NodeId_read(byte[] ser);
5866         // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
5867         public static native void NetworkGraph_free(long this_obj);
5868         // uintptr_t NetworkGraph_clone_ptr(LDKNetworkGraph *NONNULL_PTR arg);
5869         public static native long NetworkGraph_clone_ptr(long arg);
5870         // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
5871         public static native long NetworkGraph_clone(long orig);
5872         // void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
5873         public static native void ReadOnlyNetworkGraph_free(long this_obj);
5874         // void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
5875         public static native void NetworkUpdate_free(long this_ptr);
5876         // uintptr_t NetworkUpdate_clone_ptr(LDKNetworkUpdate *NONNULL_PTR arg);
5877         public static native long NetworkUpdate_clone_ptr(long arg);
5878         // struct LDKNetworkUpdate NetworkUpdate_clone(const struct LDKNetworkUpdate *NONNULL_PTR orig);
5879         public static native long NetworkUpdate_clone(long orig);
5880         // struct LDKNetworkUpdate NetworkUpdate_channel_update_message(struct LDKChannelUpdate msg);
5881         public static native long NetworkUpdate_channel_update_message(long msg);
5882         // struct LDKNetworkUpdate NetworkUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
5883         public static native long NetworkUpdate_channel_closed(long short_channel_id, boolean is_permanent);
5884         // struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
5885         public static native long NetworkUpdate_node_failure(byte[] node_id, boolean is_permanent);
5886         // struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
5887         public static native byte[] NetworkUpdate_write(long obj);
5888         // struct LDKCResult_COption_NetworkUpdateZDecodeErrorZ NetworkUpdate_read(struct LDKu8slice ser);
5889         public static native long NetworkUpdate_read(byte[] ser);
5890         // struct LDKEventHandler NetGraphMsgHandler_as_EventHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
5891         public static native long NetGraphMsgHandler_as_EventHandler(long this_arg);
5892         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
5893         public static native void NetGraphMsgHandler_free(long this_obj);
5894         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKCOption_AccessZ chain_access, struct LDKLogger logger);
5895         public static native long NetGraphMsgHandler_new(long network_graph, long chain_access, long logger);
5896         // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKCOption_AccessZ chain_access);
5897         public static native void NetGraphMsgHandler_add_chain_access(long this_arg, long chain_access);
5898         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
5899         public static native long NetGraphMsgHandler_as_RoutingMessageHandler(long this_arg);
5900         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
5901         public static native long NetGraphMsgHandler_as_MessageSendEventsProvider(long this_arg);
5902         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
5903         public static native void DirectionalChannelInfo_free(long this_obj);
5904         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
5905         public static native int DirectionalChannelInfo_get_last_update(long this_ptr);
5906         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
5907         public static native void DirectionalChannelInfo_set_last_update(long this_ptr, int val);
5908         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
5909         public static native boolean DirectionalChannelInfo_get_enabled(long this_ptr);
5910         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
5911         public static native void DirectionalChannelInfo_set_enabled(long this_ptr, boolean val);
5912         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
5913         public static native short DirectionalChannelInfo_get_cltv_expiry_delta(long this_ptr);
5914         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
5915         public static native void DirectionalChannelInfo_set_cltv_expiry_delta(long this_ptr, short val);
5916         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
5917         public static native long DirectionalChannelInfo_get_htlc_minimum_msat(long this_ptr);
5918         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
5919         public static native void DirectionalChannelInfo_set_htlc_minimum_msat(long this_ptr, long val);
5920         // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
5921         public static native long DirectionalChannelInfo_get_htlc_maximum_msat(long this_ptr);
5922         // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
5923         public static native void DirectionalChannelInfo_set_htlc_maximum_msat(long this_ptr, long val);
5924         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
5925         public static native long DirectionalChannelInfo_get_fees(long this_ptr);
5926         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
5927         public static native void DirectionalChannelInfo_set_fees(long this_ptr, long val);
5928         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
5929         public static native long DirectionalChannelInfo_get_last_update_message(long this_ptr);
5930         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
5931         public static native void DirectionalChannelInfo_set_last_update_message(long this_ptr, long val);
5932         // 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);
5933         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);
5934         // uintptr_t DirectionalChannelInfo_clone_ptr(LDKDirectionalChannelInfo *NONNULL_PTR arg);
5935         public static native long DirectionalChannelInfo_clone_ptr(long arg);
5936         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
5937         public static native long DirectionalChannelInfo_clone(long orig);
5938         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
5939         public static native byte[] DirectionalChannelInfo_write(long obj);
5940         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
5941         public static native long DirectionalChannelInfo_read(byte[] ser);
5942         // void ChannelInfo_free(struct LDKChannelInfo this_obj);
5943         public static native void ChannelInfo_free(long this_obj);
5944         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
5945         public static native long ChannelInfo_get_features(long this_ptr);
5946         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
5947         public static native void ChannelInfo_set_features(long this_ptr, long val);
5948         // struct LDKNodeId ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
5949         public static native long ChannelInfo_get_node_one(long this_ptr);
5950         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
5951         public static native void ChannelInfo_set_node_one(long this_ptr, long val);
5952         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
5953         public static native long ChannelInfo_get_one_to_two(long this_ptr);
5954         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
5955         public static native void ChannelInfo_set_one_to_two(long this_ptr, long val);
5956         // struct LDKNodeId ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
5957         public static native long ChannelInfo_get_node_two(long this_ptr);
5958         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
5959         public static native void ChannelInfo_set_node_two(long this_ptr, long val);
5960         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
5961         public static native long ChannelInfo_get_two_to_one(long this_ptr);
5962         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
5963         public static native void ChannelInfo_set_two_to_one(long this_ptr, long val);
5964         // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
5965         public static native long ChannelInfo_get_capacity_sats(long this_ptr);
5966         // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
5967         public static native void ChannelInfo_set_capacity_sats(long this_ptr, long val);
5968         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
5969         public static native long ChannelInfo_get_announcement_message(long this_ptr);
5970         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
5971         public static native void ChannelInfo_set_announcement_message(long this_ptr, long val);
5972         // uintptr_t ChannelInfo_clone_ptr(LDKChannelInfo *NONNULL_PTR arg);
5973         public static native long ChannelInfo_clone_ptr(long arg);
5974         // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
5975         public static native long ChannelInfo_clone(long orig);
5976         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
5977         public static native byte[] ChannelInfo_write(long obj);
5978         // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
5979         public static native long ChannelInfo_read(byte[] ser);
5980         // void RoutingFees_free(struct LDKRoutingFees this_obj);
5981         public static native void RoutingFees_free(long this_obj);
5982         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
5983         public static native int RoutingFees_get_base_msat(long this_ptr);
5984         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
5985         public static native void RoutingFees_set_base_msat(long this_ptr, int val);
5986         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
5987         public static native int RoutingFees_get_proportional_millionths(long this_ptr);
5988         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
5989         public static native void RoutingFees_set_proportional_millionths(long this_ptr, int val);
5990         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
5991         public static native long RoutingFees_new(int base_msat_arg, int proportional_millionths_arg);
5992         // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
5993         public static native boolean RoutingFees_eq(long a, long b);
5994         // uintptr_t RoutingFees_clone_ptr(LDKRoutingFees *NONNULL_PTR arg);
5995         public static native long RoutingFees_clone_ptr(long arg);
5996         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
5997         public static native long RoutingFees_clone(long orig);
5998         // uint64_t RoutingFees_hash(const struct LDKRoutingFees *NONNULL_PTR o);
5999         public static native long RoutingFees_hash(long o);
6000         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
6001         public static native byte[] RoutingFees_write(long obj);
6002         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
6003         public static native long RoutingFees_read(byte[] ser);
6004         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
6005         public static native void NodeAnnouncementInfo_free(long this_obj);
6006         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
6007         public static native long NodeAnnouncementInfo_get_features(long this_ptr);
6008         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
6009         public static native void NodeAnnouncementInfo_set_features(long this_ptr, long val);
6010         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
6011         public static native int NodeAnnouncementInfo_get_last_update(long this_ptr);
6012         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
6013         public static native void NodeAnnouncementInfo_set_last_update(long this_ptr, int val);
6014         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
6015         public static native byte[] NodeAnnouncementInfo_get_rgb(long this_ptr);
6016         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
6017         public static native void NodeAnnouncementInfo_set_rgb(long this_ptr, byte[] val);
6018         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
6019         public static native byte[] NodeAnnouncementInfo_get_alias(long this_ptr);
6020         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6021         public static native void NodeAnnouncementInfo_set_alias(long this_ptr, byte[] val);
6022         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
6023         public static native void NodeAnnouncementInfo_set_addresses(long this_ptr, long[] val);
6024         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
6025         public static native long NodeAnnouncementInfo_get_announcement_message(long this_ptr);
6026         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
6027         public static native void NodeAnnouncementInfo_set_announcement_message(long this_ptr, long val);
6028         // 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);
6029         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);
6030         // uintptr_t NodeAnnouncementInfo_clone_ptr(LDKNodeAnnouncementInfo *NONNULL_PTR arg);
6031         public static native long NodeAnnouncementInfo_clone_ptr(long arg);
6032         // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
6033         public static native long NodeAnnouncementInfo_clone(long orig);
6034         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
6035         public static native byte[] NodeAnnouncementInfo_write(long obj);
6036         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
6037         public static native long NodeAnnouncementInfo_read(byte[] ser);
6038         // void NodeInfo_free(struct LDKNodeInfo this_obj);
6039         public static native void NodeInfo_free(long this_obj);
6040         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
6041         public static native void NodeInfo_set_channels(long this_ptr, long[] val);
6042         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
6043         public static native long NodeInfo_get_lowest_inbound_channel_fees(long this_ptr);
6044         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
6045         public static native void NodeInfo_set_lowest_inbound_channel_fees(long this_ptr, long val);
6046         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
6047         public static native long NodeInfo_get_announcement_info(long this_ptr);
6048         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
6049         public static native void NodeInfo_set_announcement_info(long this_ptr, long val);
6050         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
6051         public static native long NodeInfo_new(long[] channels_arg, long lowest_inbound_channel_fees_arg, long announcement_info_arg);
6052         // uintptr_t NodeInfo_clone_ptr(LDKNodeInfo *NONNULL_PTR arg);
6053         public static native long NodeInfo_clone_ptr(long arg);
6054         // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
6055         public static native long NodeInfo_clone(long orig);
6056         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
6057         public static native byte[] NodeInfo_write(long obj);
6058         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
6059         public static native long NodeInfo_read(byte[] ser);
6060         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
6061         public static native byte[] NetworkGraph_write(long obj);
6062         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
6063         public static native long NetworkGraph_read(byte[] ser);
6064         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
6065         public static native long NetworkGraph_new(byte[] genesis_hash);
6066         // MUST_USE_RES struct LDKReadOnlyNetworkGraph NetworkGraph_read_only(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
6067         public static native long NetworkGraph_read_only(long this_arg);
6068         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
6069         public static native long NetworkGraph_update_node_from_announcement(long this_arg, long msg);
6070         // 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);
6071         public static native long NetworkGraph_update_node_from_unsigned_announcement(long this_arg, long msg);
6072         // 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);
6073         public static native long NetworkGraph_update_channel_from_announcement(long this_arg, long msg, long chain_access);
6074         // 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);
6075         public static native long NetworkGraph_update_channel_from_unsigned_announcement(long this_arg, long msg, long chain_access);
6076         // void NetworkGraph_close_channel_from_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
6077         public static native void NetworkGraph_close_channel_from_update(long this_arg, long short_channel_id, boolean is_permanent);
6078         // void NetworkGraph_fail_node(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey _node_id, bool is_permanent);
6079         public static native void NetworkGraph_fail_node(long this_arg, byte[] _node_id, boolean is_permanent);
6080         // void NetworkGraph_remove_stale_channels_with_time(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t current_time_unix);
6081         public static native void NetworkGraph_remove_stale_channels_with_time(long this_arg, long current_time_unix);
6082         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
6083         public static native long NetworkGraph_update_channel(long this_arg, long msg);
6084         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
6085         public static native long NetworkGraph_update_channel_unsigned(long this_arg, long msg);
6086         // MUST_USE_RES struct LDKCOption_CVec_NetAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
6087         public static native long ReadOnlyNetworkGraph_get_addresses(long this_arg, byte[] pubkey);
6088         // void RouteHop_free(struct LDKRouteHop this_obj);
6089         public static native void RouteHop_free(long this_obj);
6090         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
6091         public static native byte[] RouteHop_get_pubkey(long this_ptr);
6092         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6093         public static native void RouteHop_set_pubkey(long this_ptr, byte[] val);
6094         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
6095         public static native long RouteHop_get_node_features(long this_ptr);
6096         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
6097         public static native void RouteHop_set_node_features(long this_ptr, long val);
6098         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
6099         public static native long RouteHop_get_short_channel_id(long this_ptr);
6100         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
6101         public static native void RouteHop_set_short_channel_id(long this_ptr, long val);
6102         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
6103         public static native long RouteHop_get_channel_features(long this_ptr);
6104         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
6105         public static native void RouteHop_set_channel_features(long this_ptr, long val);
6106         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
6107         public static native long RouteHop_get_fee_msat(long this_ptr);
6108         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
6109         public static native void RouteHop_set_fee_msat(long this_ptr, long val);
6110         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
6111         public static native int RouteHop_get_cltv_expiry_delta(long this_ptr);
6112         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
6113         public static native void RouteHop_set_cltv_expiry_delta(long this_ptr, int val);
6114         // 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);
6115         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);
6116         // uintptr_t RouteHop_clone_ptr(LDKRouteHop *NONNULL_PTR arg);
6117         public static native long RouteHop_clone_ptr(long arg);
6118         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
6119         public static native long RouteHop_clone(long orig);
6120         // uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
6121         public static native long RouteHop_hash(long o);
6122         // bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
6123         public static native boolean RouteHop_eq(long a, long b);
6124         // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
6125         public static native byte[] RouteHop_write(long obj);
6126         // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
6127         public static native long RouteHop_read(byte[] ser);
6128         // void Route_free(struct LDKRoute this_obj);
6129         public static native void Route_free(long this_obj);
6130         // struct LDKCVec_CVec_RouteHopZZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
6131         public static native long[][] Route_get_paths(long this_ptr);
6132         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
6133         public static native void Route_set_paths(long this_ptr, long[][] val);
6134         // struct LDKPayee Route_get_payee(const struct LDKRoute *NONNULL_PTR this_ptr);
6135         public static native long Route_get_payee(long this_ptr);
6136         // void Route_set_payee(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKPayee val);
6137         public static native void Route_set_payee(long this_ptr, long val);
6138         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg, struct LDKPayee payee_arg);
6139         public static native long Route_new(long[][] paths_arg, long payee_arg);
6140         // uintptr_t Route_clone_ptr(LDKRoute *NONNULL_PTR arg);
6141         public static native long Route_clone_ptr(long arg);
6142         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
6143         public static native long Route_clone(long orig);
6144         // uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
6145         public static native long Route_hash(long o);
6146         // bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
6147         public static native boolean Route_eq(long a, long b);
6148         // MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
6149         public static native long Route_get_total_fees(long this_arg);
6150         // MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
6151         public static native long Route_get_total_amount(long this_arg);
6152         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
6153         public static native byte[] Route_write(long obj);
6154         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
6155         public static native long Route_read(byte[] ser);
6156         // void RouteParameters_free(struct LDKRouteParameters this_obj);
6157         public static native void RouteParameters_free(long this_obj);
6158         // struct LDKPayee RouteParameters_get_payee(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
6159         public static native long RouteParameters_get_payee(long this_ptr);
6160         // void RouteParameters_set_payee(struct LDKRouteParameters *NONNULL_PTR this_ptr, struct LDKPayee val);
6161         public static native void RouteParameters_set_payee(long this_ptr, long val);
6162         // uint64_t RouteParameters_get_final_value_msat(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
6163         public static native long RouteParameters_get_final_value_msat(long this_ptr);
6164         // void RouteParameters_set_final_value_msat(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint64_t val);
6165         public static native void RouteParameters_set_final_value_msat(long this_ptr, long val);
6166         // uint32_t RouteParameters_get_final_cltv_expiry_delta(const struct LDKRouteParameters *NONNULL_PTR this_ptr);
6167         public static native int RouteParameters_get_final_cltv_expiry_delta(long this_ptr);
6168         // void RouteParameters_set_final_cltv_expiry_delta(struct LDKRouteParameters *NONNULL_PTR this_ptr, uint32_t val);
6169         public static native void RouteParameters_set_final_cltv_expiry_delta(long this_ptr, int val);
6170         // MUST_USE_RES struct LDKRouteParameters RouteParameters_new(struct LDKPayee payee_arg, uint64_t final_value_msat_arg, uint32_t final_cltv_expiry_delta_arg);
6171         public static native long RouteParameters_new(long payee_arg, long final_value_msat_arg, int final_cltv_expiry_delta_arg);
6172         // uintptr_t RouteParameters_clone_ptr(LDKRouteParameters *NONNULL_PTR arg);
6173         public static native long RouteParameters_clone_ptr(long arg);
6174         // struct LDKRouteParameters RouteParameters_clone(const struct LDKRouteParameters *NONNULL_PTR orig);
6175         public static native long RouteParameters_clone(long orig);
6176         // struct LDKCVec_u8Z RouteParameters_write(const struct LDKRouteParameters *NONNULL_PTR obj);
6177         public static native byte[] RouteParameters_write(long obj);
6178         // struct LDKCResult_RouteParametersDecodeErrorZ RouteParameters_read(struct LDKu8slice ser);
6179         public static native long RouteParameters_read(byte[] ser);
6180         // void Payee_free(struct LDKPayee this_obj);
6181         public static native void Payee_free(long this_obj);
6182         // struct LDKPublicKey Payee_get_pubkey(const struct LDKPayee *NONNULL_PTR this_ptr);
6183         public static native byte[] Payee_get_pubkey(long this_ptr);
6184         // void Payee_set_pubkey(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6185         public static native void Payee_set_pubkey(long this_ptr, byte[] val);
6186         // struct LDKInvoiceFeatures Payee_get_features(const struct LDKPayee *NONNULL_PTR this_ptr);
6187         public static native long Payee_get_features(long this_ptr);
6188         // void Payee_set_features(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKInvoiceFeatures val);
6189         public static native void Payee_set_features(long this_ptr, long val);
6190         // struct LDKCVec_RouteHintZ Payee_get_route_hints(const struct LDKPayee *NONNULL_PTR this_ptr);
6191         public static native long[] Payee_get_route_hints(long this_ptr);
6192         // void Payee_set_route_hints(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintZ val);
6193         public static native void Payee_set_route_hints(long this_ptr, long[] val);
6194         // struct LDKCOption_u64Z Payee_get_expiry_time(const struct LDKPayee *NONNULL_PTR this_ptr);
6195         public static native long Payee_get_expiry_time(long this_ptr);
6196         // void Payee_set_expiry_time(struct LDKPayee *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
6197         public static native void Payee_set_expiry_time(long this_ptr, long val);
6198         // MUST_USE_RES struct LDKPayee Payee_new(struct LDKPublicKey pubkey_arg, struct LDKInvoiceFeatures features_arg, struct LDKCVec_RouteHintZ route_hints_arg, struct LDKCOption_u64Z expiry_time_arg);
6199         public static native long Payee_new(byte[] pubkey_arg, long features_arg, long[] route_hints_arg, long expiry_time_arg);
6200         // uintptr_t Payee_clone_ptr(LDKPayee *NONNULL_PTR arg);
6201         public static native long Payee_clone_ptr(long arg);
6202         // struct LDKPayee Payee_clone(const struct LDKPayee *NONNULL_PTR orig);
6203         public static native long Payee_clone(long orig);
6204         // uint64_t Payee_hash(const struct LDKPayee *NONNULL_PTR o);
6205         public static native long Payee_hash(long o);
6206         // bool Payee_eq(const struct LDKPayee *NONNULL_PTR a, const struct LDKPayee *NONNULL_PTR b);
6207         public static native boolean Payee_eq(long a, long b);
6208         // struct LDKCVec_u8Z Payee_write(const struct LDKPayee *NONNULL_PTR obj);
6209         public static native byte[] Payee_write(long obj);
6210         // struct LDKCResult_PayeeDecodeErrorZ Payee_read(struct LDKu8slice ser);
6211         public static native long Payee_read(byte[] ser);
6212         // MUST_USE_RES struct LDKPayee Payee_from_node_id(struct LDKPublicKey pubkey);
6213         public static native long Payee_from_node_id(byte[] pubkey);
6214         // MUST_USE_RES struct LDKPayee Payee_for_keysend(struct LDKPublicKey pubkey);
6215         public static native long Payee_for_keysend(byte[] pubkey);
6216         // void RouteHint_free(struct LDKRouteHint this_obj);
6217         public static native void RouteHint_free(long this_obj);
6218         // struct LDKCVec_RouteHintHopZ RouteHint_get_a(const struct LDKRouteHint *NONNULL_PTR this_ptr);
6219         public static native long[] RouteHint_get_a(long this_ptr);
6220         // void RouteHint_set_a(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCVec_RouteHintHopZ val);
6221         public static native void RouteHint_set_a(long this_ptr, long[] val);
6222         // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKCVec_RouteHintHopZ a_arg);
6223         public static native long RouteHint_new(long[] a_arg);
6224         // uintptr_t RouteHint_clone_ptr(LDKRouteHint *NONNULL_PTR arg);
6225         public static native long RouteHint_clone_ptr(long arg);
6226         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
6227         public static native long RouteHint_clone(long orig);
6228         // uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
6229         public static native long RouteHint_hash(long o);
6230         // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
6231         public static native boolean RouteHint_eq(long a, long b);
6232         // struct LDKCVec_u8Z RouteHint_write(const struct LDKRouteHint *NONNULL_PTR obj);
6233         public static native byte[] RouteHint_write(long obj);
6234         // struct LDKCResult_RouteHintDecodeErrorZ RouteHint_read(struct LDKu8slice ser);
6235         public static native long RouteHint_read(byte[] ser);
6236         // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
6237         public static native void RouteHintHop_free(long this_obj);
6238         // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
6239         public static native byte[] RouteHintHop_get_src_node_id(long this_ptr);
6240         // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6241         public static native void RouteHintHop_set_src_node_id(long this_ptr, byte[] val);
6242         // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
6243         public static native long RouteHintHop_get_short_channel_id(long this_ptr);
6244         // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
6245         public static native void RouteHintHop_set_short_channel_id(long this_ptr, long val);
6246         // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
6247         public static native long RouteHintHop_get_fees(long this_ptr);
6248         // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
6249         public static native void RouteHintHop_set_fees(long this_ptr, long val);
6250         // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
6251         public static native short RouteHintHop_get_cltv_expiry_delta(long this_ptr);
6252         // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
6253         public static native void RouteHintHop_set_cltv_expiry_delta(long this_ptr, short val);
6254         // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
6255         public static native long RouteHintHop_get_htlc_minimum_msat(long this_ptr);
6256         // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
6257         public static native void RouteHintHop_set_htlc_minimum_msat(long this_ptr, long val);
6258         // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
6259         public static native long RouteHintHop_get_htlc_maximum_msat(long this_ptr);
6260         // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
6261         public static native void RouteHintHop_set_htlc_maximum_msat(long this_ptr, long val);
6262         // 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);
6263         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);
6264         // uintptr_t RouteHintHop_clone_ptr(LDKRouteHintHop *NONNULL_PTR arg);
6265         public static native long RouteHintHop_clone_ptr(long arg);
6266         // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
6267         public static native long RouteHintHop_clone(long orig);
6268         // uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
6269         public static native long RouteHintHop_hash(long o);
6270         // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
6271         public static native boolean RouteHintHop_eq(long a, long b);
6272         // struct LDKCVec_u8Z RouteHintHop_write(const struct LDKRouteHintHop *NONNULL_PTR obj);
6273         public static native byte[] RouteHintHop_write(long obj);
6274         // struct LDKCResult_RouteHintHopDecodeErrorZ RouteHintHop_read(struct LDKu8slice ser);
6275         public static native long RouteHintHop_read(byte[] ser);
6276         // struct LDKCResult_RouteLightningErrorZ find_route(struct LDKPublicKey our_node_pubkey, const struct LDKRouteParameters *NONNULL_PTR params, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKLogger logger, const struct LDKScore *NONNULL_PTR scorer);
6277         public static native long find_route(byte[] our_node_pubkey, long params, long network, long[] first_hops, long logger, long scorer);
6278         // void Score_free(struct LDKScore this_ptr);
6279         public static native void Score_free(long this_ptr);
6280         // void LockableScore_free(struct LDKLockableScore this_ptr);
6281         public static native void LockableScore_free(long this_ptr);
6282         // void MultiThreadedLockableScore_free(struct LDKMultiThreadedLockableScore this_obj);
6283         public static native void MultiThreadedLockableScore_free(long this_obj);
6284         // MUST_USE_RES struct LDKMultiThreadedLockableScore MultiThreadedLockableScore_new(struct LDKScore score);
6285         public static native long MultiThreadedLockableScore_new(long score);
6286         // void Scorer_free(struct LDKScorer this_obj);
6287         public static native void Scorer_free(long this_obj);
6288         // void ScoringParameters_free(struct LDKScoringParameters this_obj);
6289         public static native void ScoringParameters_free(long this_obj);
6290         // uint64_t ScoringParameters_get_base_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
6291         public static native long ScoringParameters_get_base_penalty_msat(long this_ptr);
6292         // void ScoringParameters_set_base_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
6293         public static native void ScoringParameters_set_base_penalty_msat(long this_ptr, long val);
6294         // uint64_t ScoringParameters_get_failure_penalty_msat(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
6295         public static native long ScoringParameters_get_failure_penalty_msat(long this_ptr);
6296         // void ScoringParameters_set_failure_penalty_msat(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
6297         public static native void ScoringParameters_set_failure_penalty_msat(long this_ptr, long val);
6298         // uint16_t ScoringParameters_get_overuse_penalty_start_1024th(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
6299         public static native short ScoringParameters_get_overuse_penalty_start_1024th(long this_ptr);
6300         // void ScoringParameters_set_overuse_penalty_start_1024th(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint16_t val);
6301         public static native void ScoringParameters_set_overuse_penalty_start_1024th(long this_ptr, short val);
6302         // uint64_t ScoringParameters_get_overuse_penalty_msat_per_1024th(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
6303         public static native long ScoringParameters_get_overuse_penalty_msat_per_1024th(long this_ptr);
6304         // void ScoringParameters_set_overuse_penalty_msat_per_1024th(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
6305         public static native void ScoringParameters_set_overuse_penalty_msat_per_1024th(long this_ptr, long val);
6306         // uint64_t ScoringParameters_get_failure_penalty_half_life(const struct LDKScoringParameters *NONNULL_PTR this_ptr);
6307         public static native long ScoringParameters_get_failure_penalty_half_life(long this_ptr);
6308         // void ScoringParameters_set_failure_penalty_half_life(struct LDKScoringParameters *NONNULL_PTR this_ptr, uint64_t val);
6309         public static native void ScoringParameters_set_failure_penalty_half_life(long this_ptr, long val);
6310         // MUST_USE_RES struct LDKScoringParameters ScoringParameters_new(uint64_t base_penalty_msat_arg, uint64_t failure_penalty_msat_arg, uint16_t overuse_penalty_start_1024th_arg, uint64_t overuse_penalty_msat_per_1024th_arg, uint64_t failure_penalty_half_life_arg);
6311         public static native long ScoringParameters_new(long base_penalty_msat_arg, long failure_penalty_msat_arg, short overuse_penalty_start_1024th_arg, long overuse_penalty_msat_per_1024th_arg, long failure_penalty_half_life_arg);
6312         // struct LDKCVec_u8Z ScoringParameters_write(const struct LDKScoringParameters *NONNULL_PTR obj);
6313         public static native byte[] ScoringParameters_write(long obj);
6314         // struct LDKCResult_ScoringParametersDecodeErrorZ ScoringParameters_read(struct LDKu8slice ser);
6315         public static native long ScoringParameters_read(byte[] ser);
6316         // MUST_USE_RES struct LDKScorer Scorer_new(struct LDKScoringParameters params);
6317         public static native long Scorer_new(long params);
6318         // MUST_USE_RES struct LDKScorer Scorer_default(void);
6319         public static native long Scorer_default();
6320         // MUST_USE_RES struct LDKScoringParameters ScoringParameters_default(void);
6321         public static native long ScoringParameters_default();
6322         // struct LDKScore Scorer_as_Score(const struct LDKScorer *NONNULL_PTR this_arg);
6323         public static native long Scorer_as_Score(long this_arg);
6324         // struct LDKCVec_u8Z Scorer_write(const struct LDKScorer *NONNULL_PTR obj);
6325         public static native byte[] Scorer_write(long obj);
6326         // struct LDKCResult_ScorerDecodeErrorZ Scorer_read(struct LDKu8slice ser);
6327         public static native long Scorer_read(byte[] ser);
6328         // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
6329         public static native void FilesystemPersister_free(long this_obj);
6330         // MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKStr path_to_channel_data);
6331         public static native long FilesystemPersister_new(String path_to_channel_data);
6332         // MUST_USE_RES struct LDKStr FilesystemPersister_get_data_dir(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
6333         public static native String FilesystemPersister_get_data_dir(long this_arg);
6334         // MUST_USE_RES struct LDKCResult_NoneErrorZ FilesystemPersister_persist_manager(struct LDKStr data_dir, const struct LDKChannelManager *NONNULL_PTR manager);
6335         public static native long FilesystemPersister_persist_manager(String data_dir, long manager);
6336         // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ FilesystemPersister_read_channelmonitors(const struct LDKFilesystemPersister *NONNULL_PTR this_arg, struct LDKKeysInterface keys_manager);
6337         public static native long FilesystemPersister_read_channelmonitors(long this_arg, long keys_manager);
6338         // struct LDKPersist FilesystemPersister_as_Persist(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
6339         public static native long FilesystemPersister_as_Persist(long this_arg);
6340         // void BackgroundProcessor_free(struct LDKBackgroundProcessor this_obj);
6341         public static native void BackgroundProcessor_free(long this_obj);
6342         // void ChannelManagerPersister_free(struct LDKChannelManagerPersister this_ptr);
6343         public static native void ChannelManagerPersister_free(long this_ptr);
6344         // 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);
6345         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);
6346         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_join(struct LDKBackgroundProcessor this_arg);
6347         public static native long BackgroundProcessor_join(long this_arg);
6348         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg);
6349         public static native long BackgroundProcessor_stop(long this_arg);
6350         // void check_platform(void);
6351         public static native void check_platform();
6352         // void Invoice_free(struct LDKInvoice this_obj);
6353         public static native void Invoice_free(long this_obj);
6354         // bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice *NONNULL_PTR b);
6355         public static native boolean Invoice_eq(long a, long b);
6356         // uintptr_t Invoice_clone_ptr(LDKInvoice *NONNULL_PTR arg);
6357         public static native long Invoice_clone_ptr(long arg);
6358         // struct LDKInvoice Invoice_clone(const struct LDKInvoice *NONNULL_PTR orig);
6359         public static native long Invoice_clone(long orig);
6360         // void SignedRawInvoice_free(struct LDKSignedRawInvoice this_obj);
6361         public static native void SignedRawInvoice_free(long this_obj);
6362         // bool SignedRawInvoice_eq(const struct LDKSignedRawInvoice *NONNULL_PTR a, const struct LDKSignedRawInvoice *NONNULL_PTR b);
6363         public static native boolean SignedRawInvoice_eq(long a, long b);
6364         // uintptr_t SignedRawInvoice_clone_ptr(LDKSignedRawInvoice *NONNULL_PTR arg);
6365         public static native long SignedRawInvoice_clone_ptr(long arg);
6366         // struct LDKSignedRawInvoice SignedRawInvoice_clone(const struct LDKSignedRawInvoice *NONNULL_PTR orig);
6367         public static native long SignedRawInvoice_clone(long orig);
6368         // void RawInvoice_free(struct LDKRawInvoice this_obj);
6369         public static native void RawInvoice_free(long this_obj);
6370         // struct LDKRawDataPart RawInvoice_get_data(const struct LDKRawInvoice *NONNULL_PTR this_ptr);
6371         public static native long RawInvoice_get_data(long this_ptr);
6372         // void RawInvoice_set_data(struct LDKRawInvoice *NONNULL_PTR this_ptr, struct LDKRawDataPart val);
6373         public static native void RawInvoice_set_data(long this_ptr, long val);
6374         // bool RawInvoice_eq(const struct LDKRawInvoice *NONNULL_PTR a, const struct LDKRawInvoice *NONNULL_PTR b);
6375         public static native boolean RawInvoice_eq(long a, long b);
6376         // uintptr_t RawInvoice_clone_ptr(LDKRawInvoice *NONNULL_PTR arg);
6377         public static native long RawInvoice_clone_ptr(long arg);
6378         // struct LDKRawInvoice RawInvoice_clone(const struct LDKRawInvoice *NONNULL_PTR orig);
6379         public static native long RawInvoice_clone(long orig);
6380         // void RawDataPart_free(struct LDKRawDataPart this_obj);
6381         public static native void RawDataPart_free(long this_obj);
6382         // struct LDKPositiveTimestamp RawDataPart_get_timestamp(const struct LDKRawDataPart *NONNULL_PTR this_ptr);
6383         public static native long RawDataPart_get_timestamp(long this_ptr);
6384         // void RawDataPart_set_timestamp(struct LDKRawDataPart *NONNULL_PTR this_ptr, struct LDKPositiveTimestamp val);
6385         public static native void RawDataPart_set_timestamp(long this_ptr, long val);
6386         // bool RawDataPart_eq(const struct LDKRawDataPart *NONNULL_PTR a, const struct LDKRawDataPart *NONNULL_PTR b);
6387         public static native boolean RawDataPart_eq(long a, long b);
6388         // uintptr_t RawDataPart_clone_ptr(LDKRawDataPart *NONNULL_PTR arg);
6389         public static native long RawDataPart_clone_ptr(long arg);
6390         // struct LDKRawDataPart RawDataPart_clone(const struct LDKRawDataPart *NONNULL_PTR orig);
6391         public static native long RawDataPart_clone(long orig);
6392         // void PositiveTimestamp_free(struct LDKPositiveTimestamp this_obj);
6393         public static native void PositiveTimestamp_free(long this_obj);
6394         // bool PositiveTimestamp_eq(const struct LDKPositiveTimestamp *NONNULL_PTR a, const struct LDKPositiveTimestamp *NONNULL_PTR b);
6395         public static native boolean PositiveTimestamp_eq(long a, long b);
6396         // uintptr_t PositiveTimestamp_clone_ptr(LDKPositiveTimestamp *NONNULL_PTR arg);
6397         public static native long PositiveTimestamp_clone_ptr(long arg);
6398         // struct LDKPositiveTimestamp PositiveTimestamp_clone(const struct LDKPositiveTimestamp *NONNULL_PTR orig);
6399         public static native long PositiveTimestamp_clone(long orig);
6400         // enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig);
6401         public static native SiPrefix SiPrefix_clone(long orig);
6402         // enum LDKSiPrefix SiPrefix_milli(void);
6403         public static native SiPrefix SiPrefix_milli();
6404         // enum LDKSiPrefix SiPrefix_micro(void);
6405         public static native SiPrefix SiPrefix_micro();
6406         // enum LDKSiPrefix SiPrefix_nano(void);
6407         public static native SiPrefix SiPrefix_nano();
6408         // enum LDKSiPrefix SiPrefix_pico(void);
6409         public static native SiPrefix SiPrefix_pico();
6410         // bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b);
6411         public static native boolean SiPrefix_eq(long a, long b);
6412         // MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR this_arg);
6413         public static native long SiPrefix_multiplier(long this_arg);
6414         // enum LDKCurrency Currency_clone(const enum LDKCurrency *NONNULL_PTR orig);
6415         public static native Currency Currency_clone(long orig);
6416         // enum LDKCurrency Currency_bitcoin(void);
6417         public static native Currency Currency_bitcoin();
6418         // enum LDKCurrency Currency_bitcoin_testnet(void);
6419         public static native Currency Currency_bitcoin_testnet();
6420         // enum LDKCurrency Currency_regtest(void);
6421         public static native Currency Currency_regtest();
6422         // enum LDKCurrency Currency_simnet(void);
6423         public static native Currency Currency_simnet();
6424         // enum LDKCurrency Currency_signet(void);
6425         public static native Currency Currency_signet();
6426         // uint64_t Currency_hash(const enum LDKCurrency *NONNULL_PTR o);
6427         public static native long Currency_hash(long o);
6428         // bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b);
6429         public static native boolean Currency_eq(long a, long b);
6430         // void Sha256_free(struct LDKSha256 this_obj);
6431         public static native void Sha256_free(long this_obj);
6432         // uintptr_t Sha256_clone_ptr(LDKSha256 *NONNULL_PTR arg);
6433         public static native long Sha256_clone_ptr(long arg);
6434         // struct LDKSha256 Sha256_clone(const struct LDKSha256 *NONNULL_PTR orig);
6435         public static native long Sha256_clone(long orig);
6436         // uint64_t Sha256_hash(const struct LDKSha256 *NONNULL_PTR o);
6437         public static native long Sha256_hash(long o);
6438         // bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b);
6439         public static native boolean Sha256_eq(long a, long b);
6440         // void Description_free(struct LDKDescription this_obj);
6441         public static native void Description_free(long this_obj);
6442         // uintptr_t Description_clone_ptr(LDKDescription *NONNULL_PTR arg);
6443         public static native long Description_clone_ptr(long arg);
6444         // struct LDKDescription Description_clone(const struct LDKDescription *NONNULL_PTR orig);
6445         public static native long Description_clone(long orig);
6446         // uint64_t Description_hash(const struct LDKDescription *NONNULL_PTR o);
6447         public static native long Description_hash(long o);
6448         // bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b);
6449         public static native boolean Description_eq(long a, long b);
6450         // void PayeePubKey_free(struct LDKPayeePubKey this_obj);
6451         public static native void PayeePubKey_free(long this_obj);
6452         // struct LDKPublicKey PayeePubKey_get_a(const struct LDKPayeePubKey *NONNULL_PTR this_ptr);
6453         public static native byte[] PayeePubKey_get_a(long this_ptr);
6454         // void PayeePubKey_set_a(struct LDKPayeePubKey *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6455         public static native void PayeePubKey_set_a(long this_ptr, byte[] val);
6456         // MUST_USE_RES struct LDKPayeePubKey PayeePubKey_new(struct LDKPublicKey a_arg);
6457         public static native long PayeePubKey_new(byte[] a_arg);
6458         // uintptr_t PayeePubKey_clone_ptr(LDKPayeePubKey *NONNULL_PTR arg);
6459         public static native long PayeePubKey_clone_ptr(long arg);
6460         // struct LDKPayeePubKey PayeePubKey_clone(const struct LDKPayeePubKey *NONNULL_PTR orig);
6461         public static native long PayeePubKey_clone(long orig);
6462         // uint64_t PayeePubKey_hash(const struct LDKPayeePubKey *NONNULL_PTR o);
6463         public static native long PayeePubKey_hash(long o);
6464         // bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b);
6465         public static native boolean PayeePubKey_eq(long a, long b);
6466         // void ExpiryTime_free(struct LDKExpiryTime this_obj);
6467         public static native void ExpiryTime_free(long this_obj);
6468         // uintptr_t ExpiryTime_clone_ptr(LDKExpiryTime *NONNULL_PTR arg);
6469         public static native long ExpiryTime_clone_ptr(long arg);
6470         // struct LDKExpiryTime ExpiryTime_clone(const struct LDKExpiryTime *NONNULL_PTR orig);
6471         public static native long ExpiryTime_clone(long orig);
6472         // uint64_t ExpiryTime_hash(const struct LDKExpiryTime *NONNULL_PTR o);
6473         public static native long ExpiryTime_hash(long o);
6474         // bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b);
6475         public static native boolean ExpiryTime_eq(long a, long b);
6476         // void MinFinalCltvExpiry_free(struct LDKMinFinalCltvExpiry this_obj);
6477         public static native void MinFinalCltvExpiry_free(long this_obj);
6478         // uint64_t MinFinalCltvExpiry_get_a(const struct LDKMinFinalCltvExpiry *NONNULL_PTR this_ptr);
6479         public static native long MinFinalCltvExpiry_get_a(long this_ptr);
6480         // void MinFinalCltvExpiry_set_a(struct LDKMinFinalCltvExpiry *NONNULL_PTR this_ptr, uint64_t val);
6481         public static native void MinFinalCltvExpiry_set_a(long this_ptr, long val);
6482         // MUST_USE_RES struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_new(uint64_t a_arg);
6483         public static native long MinFinalCltvExpiry_new(long a_arg);
6484         // uintptr_t MinFinalCltvExpiry_clone_ptr(LDKMinFinalCltvExpiry *NONNULL_PTR arg);
6485         public static native long MinFinalCltvExpiry_clone_ptr(long arg);
6486         // struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_clone(const struct LDKMinFinalCltvExpiry *NONNULL_PTR orig);
6487         public static native long MinFinalCltvExpiry_clone(long orig);
6488         // uint64_t MinFinalCltvExpiry_hash(const struct LDKMinFinalCltvExpiry *NONNULL_PTR o);
6489         public static native long MinFinalCltvExpiry_hash(long o);
6490         // bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b);
6491         public static native boolean MinFinalCltvExpiry_eq(long a, long b);
6492         // void Fallback_free(struct LDKFallback this_ptr);
6493         public static native void Fallback_free(long this_ptr);
6494         // uintptr_t Fallback_clone_ptr(LDKFallback *NONNULL_PTR arg);
6495         public static native long Fallback_clone_ptr(long arg);
6496         // struct LDKFallback Fallback_clone(const struct LDKFallback *NONNULL_PTR orig);
6497         public static native long Fallback_clone(long orig);
6498         // struct LDKFallback Fallback_seg_wit_program(struct LDKu5 version, struct LDKCVec_u8Z program);
6499         public static native long Fallback_seg_wit_program(byte version, byte[] program);
6500         // struct LDKFallback Fallback_pub_key_hash(struct LDKTwentyBytes a);
6501         public static native long Fallback_pub_key_hash(byte[] a);
6502         // struct LDKFallback Fallback_script_hash(struct LDKTwentyBytes a);
6503         public static native long Fallback_script_hash(byte[] a);
6504         // uint64_t Fallback_hash(const struct LDKFallback *NONNULL_PTR o);
6505         public static native long Fallback_hash(long o);
6506         // bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b);
6507         public static native boolean Fallback_eq(long a, long b);
6508         // void InvoiceSignature_free(struct LDKInvoiceSignature this_obj);
6509         public static native void InvoiceSignature_free(long this_obj);
6510         // uintptr_t InvoiceSignature_clone_ptr(LDKInvoiceSignature *NONNULL_PTR arg);
6511         public static native long InvoiceSignature_clone_ptr(long arg);
6512         // struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignature *NONNULL_PTR orig);
6513         public static native long InvoiceSignature_clone(long orig);
6514         // bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b);
6515         public static native boolean InvoiceSignature_eq(long a, long b);
6516         // void PrivateRoute_free(struct LDKPrivateRoute this_obj);
6517         public static native void PrivateRoute_free(long this_obj);
6518         // uintptr_t PrivateRoute_clone_ptr(LDKPrivateRoute *NONNULL_PTR arg);
6519         public static native long PrivateRoute_clone_ptr(long arg);
6520         // struct LDKPrivateRoute PrivateRoute_clone(const struct LDKPrivateRoute *NONNULL_PTR orig);
6521         public static native long PrivateRoute_clone(long orig);
6522         // uint64_t PrivateRoute_hash(const struct LDKPrivateRoute *NONNULL_PTR o);
6523         public static native long PrivateRoute_hash(long o);
6524         // bool PrivateRoute_eq(const struct LDKPrivateRoute *NONNULL_PTR a, const struct LDKPrivateRoute *NONNULL_PTR b);
6525         public static native boolean PrivateRoute_eq(long a, long b);
6526         // MUST_USE_RES struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ SignedRawInvoice_into_parts(struct LDKSignedRawInvoice this_arg);
6527         public static native long SignedRawInvoice_into_parts(long this_arg);
6528         // MUST_USE_RES struct LDKRawInvoice SignedRawInvoice_raw_invoice(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
6529         public static native long SignedRawInvoice_raw_invoice(long this_arg);
6530         // MUST_USE_RES const uint8_t (*SignedRawInvoice_hash(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg))[32];
6531         public static native byte[] SignedRawInvoice_hash(long this_arg);
6532         // MUST_USE_RES struct LDKInvoiceSignature SignedRawInvoice_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
6533         public static native long SignedRawInvoice_signature(long this_arg);
6534         // MUST_USE_RES struct LDKCResult_PayeePubKeyErrorZ SignedRawInvoice_recover_payee_pub_key(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
6535         public static native long SignedRawInvoice_recover_payee_pub_key(long this_arg);
6536         // MUST_USE_RES bool SignedRawInvoice_check_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
6537         public static native boolean SignedRawInvoice_check_signature(long this_arg);
6538         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
6539         public static native byte[] RawInvoice_hash(long this_arg);
6540         // MUST_USE_RES struct LDKSha256 RawInvoice_payment_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
6541         public static native long RawInvoice_payment_hash(long this_arg);
6542         // MUST_USE_RES struct LDKDescription RawInvoice_description(const struct LDKRawInvoice *NONNULL_PTR this_arg);
6543         public static native long RawInvoice_description(long this_arg);
6544         // MUST_USE_RES struct LDKPayeePubKey RawInvoice_payee_pub_key(const struct LDKRawInvoice *NONNULL_PTR this_arg);
6545         public static native long RawInvoice_payee_pub_key(long this_arg);
6546         // MUST_USE_RES struct LDKSha256 RawInvoice_description_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
6547         public static native long RawInvoice_description_hash(long this_arg);
6548         // MUST_USE_RES struct LDKExpiryTime RawInvoice_expiry_time(const struct LDKRawInvoice *NONNULL_PTR this_arg);
6549         public static native long RawInvoice_expiry_time(long this_arg);
6550         // MUST_USE_RES struct LDKMinFinalCltvExpiry RawInvoice_min_final_cltv_expiry(const struct LDKRawInvoice *NONNULL_PTR this_arg);
6551         public static native long RawInvoice_min_final_cltv_expiry(long this_arg);
6552         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_payment_secret(const struct LDKRawInvoice *NONNULL_PTR this_arg);
6553         public static native byte[] RawInvoice_payment_secret(long this_arg);
6554         // MUST_USE_RES struct LDKInvoiceFeatures RawInvoice_features(const struct LDKRawInvoice *NONNULL_PTR this_arg);
6555         public static native long RawInvoice_features(long this_arg);
6556         // MUST_USE_RES struct LDKCVec_PrivateRouteZ RawInvoice_private_routes(const struct LDKRawInvoice *NONNULL_PTR this_arg);
6557         public static native long[] RawInvoice_private_routes(long this_arg);
6558         // MUST_USE_RES struct LDKCOption_u64Z RawInvoice_amount_pico_btc(const struct LDKRawInvoice *NONNULL_PTR this_arg);
6559         public static native long RawInvoice_amount_pico_btc(long this_arg);
6560         // MUST_USE_RES enum LDKCurrency RawInvoice_currency(const struct LDKRawInvoice *NONNULL_PTR this_arg);
6561         public static native Currency RawInvoice_currency(long this_arg);
6562         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_unix_timestamp(uint64_t unix_seconds);
6563         public static native long PositiveTimestamp_from_unix_timestamp(long unix_seconds);
6564         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_system_time(uint64_t time);
6565         public static native long PositiveTimestamp_from_system_time(long time);
6566         // MUST_USE_RES uint64_t PositiveTimestamp_as_unix_timestamp(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
6567         public static native long PositiveTimestamp_as_unix_timestamp(long this_arg);
6568         // MUST_USE_RES uint64_t PositiveTimestamp_as_time(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
6569         public static native long PositiveTimestamp_as_time(long this_arg);
6570         // MUST_USE_RES struct LDKSignedRawInvoice Invoice_into_signed_raw(struct LDKInvoice this_arg);
6571         public static native long Invoice_into_signed_raw(long this_arg);
6572         // MUST_USE_RES struct LDKCResult_NoneSemanticErrorZ Invoice_check_signature(const struct LDKInvoice *NONNULL_PTR this_arg);
6573         public static native long Invoice_check_signature(long this_arg);
6574         // MUST_USE_RES struct LDKCResult_InvoiceSemanticErrorZ Invoice_from_signed(struct LDKSignedRawInvoice signed_invoice);
6575         public static native long Invoice_from_signed(long signed_invoice);
6576         // MUST_USE_RES uint64_t Invoice_timestamp(const struct LDKInvoice *NONNULL_PTR this_arg);
6577         public static native long Invoice_timestamp(long this_arg);
6578         // MUST_USE_RES const uint8_t (*Invoice_payment_hash(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
6579         public static native byte[] Invoice_payment_hash(long this_arg);
6580         // MUST_USE_RES struct LDKPublicKey Invoice_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
6581         public static native byte[] Invoice_payee_pub_key(long this_arg);
6582         // MUST_USE_RES const uint8_t (*Invoice_payment_secret(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
6583         public static native byte[] Invoice_payment_secret(long this_arg);
6584         // MUST_USE_RES struct LDKInvoiceFeatures Invoice_features(const struct LDKInvoice *NONNULL_PTR this_arg);
6585         public static native long Invoice_features(long this_arg);
6586         // MUST_USE_RES struct LDKPublicKey Invoice_recover_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
6587         public static native byte[] Invoice_recover_payee_pub_key(long this_arg);
6588         // MUST_USE_RES uint64_t Invoice_expiry_time(const struct LDKInvoice *NONNULL_PTR this_arg);
6589         public static native long Invoice_expiry_time(long this_arg);
6590         // MUST_USE_RES bool Invoice_is_expired(const struct LDKInvoice *NONNULL_PTR this_arg);
6591         public static native boolean Invoice_is_expired(long this_arg);
6592         // MUST_USE_RES uint64_t Invoice_min_final_cltv_expiry(const struct LDKInvoice *NONNULL_PTR this_arg);
6593         public static native long Invoice_min_final_cltv_expiry(long this_arg);
6594         // MUST_USE_RES struct LDKCVec_PrivateRouteZ Invoice_private_routes(const struct LDKInvoice *NONNULL_PTR this_arg);
6595         public static native long[] Invoice_private_routes(long this_arg);
6596         // MUST_USE_RES struct LDKCVec_RouteHintZ Invoice_route_hints(const struct LDKInvoice *NONNULL_PTR this_arg);
6597         public static native long[] Invoice_route_hints(long this_arg);
6598         // MUST_USE_RES enum LDKCurrency Invoice_currency(const struct LDKInvoice *NONNULL_PTR this_arg);
6599         public static native Currency Invoice_currency(long this_arg);
6600         // MUST_USE_RES struct LDKCOption_u64Z Invoice_amount_milli_satoshis(const struct LDKInvoice *NONNULL_PTR this_arg);
6601         public static native long Invoice_amount_milli_satoshis(long this_arg);
6602         // MUST_USE_RES struct LDKCResult_DescriptionCreationErrorZ Description_new(struct LDKStr description);
6603         public static native long Description_new(String description);
6604         // MUST_USE_RES struct LDKStr Description_into_inner(struct LDKDescription this_arg);
6605         public static native String Description_into_inner(long this_arg);
6606         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_seconds(uint64_t seconds);
6607         public static native long ExpiryTime_from_seconds(long seconds);
6608         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_duration(uint64_t duration);
6609         public static native long ExpiryTime_from_duration(long duration);
6610         // MUST_USE_RES uint64_t ExpiryTime_as_seconds(const struct LDKExpiryTime *NONNULL_PTR this_arg);
6611         public static native long ExpiryTime_as_seconds(long this_arg);
6612         // MUST_USE_RES uint64_t ExpiryTime_as_duration(const struct LDKExpiryTime *NONNULL_PTR this_arg);
6613         public static native long ExpiryTime_as_duration(long this_arg);
6614         // MUST_USE_RES struct LDKCResult_PrivateRouteCreationErrorZ PrivateRoute_new(struct LDKRouteHint hops);
6615         public static native long PrivateRoute_new(long hops);
6616         // MUST_USE_RES struct LDKRouteHint PrivateRoute_into_inner(struct LDKPrivateRoute this_arg);
6617         public static native long PrivateRoute_into_inner(long this_arg);
6618         // enum LDKCreationError CreationError_clone(const enum LDKCreationError *NONNULL_PTR orig);
6619         public static native CreationError CreationError_clone(long orig);
6620         // enum LDKCreationError CreationError_description_too_long(void);
6621         public static native CreationError CreationError_description_too_long();
6622         // enum LDKCreationError CreationError_route_too_long(void);
6623         public static native CreationError CreationError_route_too_long();
6624         // enum LDKCreationError CreationError_timestamp_out_of_bounds(void);
6625         public static native CreationError CreationError_timestamp_out_of_bounds();
6626         // enum LDKCreationError CreationError_expiry_time_out_of_bounds(void);
6627         public static native CreationError CreationError_expiry_time_out_of_bounds();
6628         // enum LDKCreationError CreationError_invalid_amount(void);
6629         public static native CreationError CreationError_invalid_amount();
6630         // bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b);
6631         public static native boolean CreationError_eq(long a, long b);
6632         // struct LDKStr CreationError_to_str(const enum LDKCreationError *NONNULL_PTR o);
6633         public static native String CreationError_to_str(long o);
6634         // enum LDKSemanticError SemanticError_clone(const enum LDKSemanticError *NONNULL_PTR orig);
6635         public static native SemanticError SemanticError_clone(long orig);
6636         // enum LDKSemanticError SemanticError_no_payment_hash(void);
6637         public static native SemanticError SemanticError_no_payment_hash();
6638         // enum LDKSemanticError SemanticError_multiple_payment_hashes(void);
6639         public static native SemanticError SemanticError_multiple_payment_hashes();
6640         // enum LDKSemanticError SemanticError_no_description(void);
6641         public static native SemanticError SemanticError_no_description();
6642         // enum LDKSemanticError SemanticError_multiple_descriptions(void);
6643         public static native SemanticError SemanticError_multiple_descriptions();
6644         // enum LDKSemanticError SemanticError_no_payment_secret(void);
6645         public static native SemanticError SemanticError_no_payment_secret();
6646         // enum LDKSemanticError SemanticError_multiple_payment_secrets(void);
6647         public static native SemanticError SemanticError_multiple_payment_secrets();
6648         // enum LDKSemanticError SemanticError_invalid_features(void);
6649         public static native SemanticError SemanticError_invalid_features();
6650         // enum LDKSemanticError SemanticError_invalid_recovery_id(void);
6651         public static native SemanticError SemanticError_invalid_recovery_id();
6652         // enum LDKSemanticError SemanticError_invalid_signature(void);
6653         public static native SemanticError SemanticError_invalid_signature();
6654         // enum LDKSemanticError SemanticError_imprecise_amount(void);
6655         public static native SemanticError SemanticError_imprecise_amount();
6656         // bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b);
6657         public static native boolean SemanticError_eq(long a, long b);
6658         // struct LDKStr SemanticError_to_str(const enum LDKSemanticError *NONNULL_PTR o);
6659         public static native String SemanticError_to_str(long o);
6660         // void SignOrCreationError_free(struct LDKSignOrCreationError this_ptr);
6661         public static native void SignOrCreationError_free(long this_ptr);
6662         // uintptr_t SignOrCreationError_clone_ptr(LDKSignOrCreationError *NONNULL_PTR arg);
6663         public static native long SignOrCreationError_clone_ptr(long arg);
6664         // struct LDKSignOrCreationError SignOrCreationError_clone(const struct LDKSignOrCreationError *NONNULL_PTR orig);
6665         public static native long SignOrCreationError_clone(long orig);
6666         // struct LDKSignOrCreationError SignOrCreationError_sign_error(void);
6667         public static native long SignOrCreationError_sign_error();
6668         // struct LDKSignOrCreationError SignOrCreationError_creation_error(enum LDKCreationError a);
6669         public static native long SignOrCreationError_creation_error(CreationError a);
6670         // bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b);
6671         public static native boolean SignOrCreationError_eq(long a, long b);
6672         // struct LDKStr SignOrCreationError_to_str(const struct LDKSignOrCreationError *NONNULL_PTR o);
6673         public static native String SignOrCreationError_to_str(long o);
6674         // void InvoicePayer_free(struct LDKInvoicePayer this_obj);
6675         public static native void InvoicePayer_free(long this_obj);
6676         // void Payer_free(struct LDKPayer this_ptr);
6677         public static native void Payer_free(long this_ptr);
6678         // void Router_free(struct LDKRouter this_ptr);
6679         public static native void Router_free(long this_ptr);
6680         // void RetryAttempts_free(struct LDKRetryAttempts this_obj);
6681         public static native void RetryAttempts_free(long this_obj);
6682         // uintptr_t RetryAttempts_get_a(const struct LDKRetryAttempts *NONNULL_PTR this_ptr);
6683         public static native long RetryAttempts_get_a(long this_ptr);
6684         // void RetryAttempts_set_a(struct LDKRetryAttempts *NONNULL_PTR this_ptr, uintptr_t val);
6685         public static native void RetryAttempts_set_a(long this_ptr, long val);
6686         // MUST_USE_RES struct LDKRetryAttempts RetryAttempts_new(uintptr_t a_arg);
6687         public static native long RetryAttempts_new(long a_arg);
6688         // uintptr_t RetryAttempts_clone_ptr(LDKRetryAttempts *NONNULL_PTR arg);
6689         public static native long RetryAttempts_clone_ptr(long arg);
6690         // struct LDKRetryAttempts RetryAttempts_clone(const struct LDKRetryAttempts *NONNULL_PTR orig);
6691         public static native long RetryAttempts_clone(long orig);
6692         // bool RetryAttempts_eq(const struct LDKRetryAttempts *NONNULL_PTR a, const struct LDKRetryAttempts *NONNULL_PTR b);
6693         public static native boolean RetryAttempts_eq(long a, long b);
6694         // uint64_t RetryAttempts_hash(const struct LDKRetryAttempts *NONNULL_PTR o);
6695         public static native long RetryAttempts_hash(long o);
6696         // void PaymentError_free(struct LDKPaymentError this_ptr);
6697         public static native void PaymentError_free(long this_ptr);
6698         // uintptr_t PaymentError_clone_ptr(LDKPaymentError *NONNULL_PTR arg);
6699         public static native long PaymentError_clone_ptr(long arg);
6700         // struct LDKPaymentError PaymentError_clone(const struct LDKPaymentError *NONNULL_PTR orig);
6701         public static native long PaymentError_clone(long orig);
6702         // struct LDKPaymentError PaymentError_invoice(struct LDKStr a);
6703         public static native long PaymentError_invoice(String a);
6704         // struct LDKPaymentError PaymentError_routing(struct LDKLightningError a);
6705         public static native long PaymentError_routing(long a);
6706         // struct LDKPaymentError PaymentError_sending(struct LDKPaymentSendFailure a);
6707         public static native long PaymentError_sending(long a);
6708         // MUST_USE_RES struct LDKInvoicePayer InvoicePayer_new(struct LDKPayer payer, struct LDKRouter router, const struct LDKMultiThreadedLockableScore *NONNULL_PTR scorer, struct LDKLogger logger, struct LDKEventHandler event_handler, struct LDKRetryAttempts retry_attempts);
6709         public static native long InvoicePayer_new(long payer, long router, long scorer, long logger, long event_handler, long retry_attempts);
6710         // MUST_USE_RES struct LDKCResult_PaymentIdPaymentErrorZ InvoicePayer_pay_invoice(const struct LDKInvoicePayer *NONNULL_PTR this_arg, const struct LDKInvoice *NONNULL_PTR invoice);
6711         public static native long InvoicePayer_pay_invoice(long this_arg, long invoice);
6712         // MUST_USE_RES struct LDKCResult_PaymentIdPaymentErrorZ InvoicePayer_pay_zero_value_invoice(const struct LDKInvoicePayer *NONNULL_PTR this_arg, const struct LDKInvoice *NONNULL_PTR invoice, uint64_t amount_msats);
6713         public static native long InvoicePayer_pay_zero_value_invoice(long this_arg, long invoice, long amount_msats);
6714         // MUST_USE_RES struct LDKCResult_PaymentIdPaymentErrorZ InvoicePayer_pay_pubkey(const struct LDKInvoicePayer *NONNULL_PTR this_arg, struct LDKPublicKey pubkey, struct LDKThirtyTwoBytes payment_preimage, uint64_t amount_msats, uint32_t final_cltv_expiry_delta);
6715         public static native long InvoicePayer_pay_pubkey(long this_arg, byte[] pubkey, byte[] payment_preimage, long amount_msats, int final_cltv_expiry_delta);
6716         // void InvoicePayer_remove_cached_payment(const struct LDKInvoicePayer *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
6717         public static native void InvoicePayer_remove_cached_payment(long this_arg, byte[] payment_hash);
6718         // struct LDKEventHandler InvoicePayer_as_EventHandler(const struct LDKInvoicePayer *NONNULL_PTR this_arg);
6719         public static native long InvoicePayer_as_EventHandler(long this_arg);
6720         // 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);
6721         public static native long create_invoice_from_channelmanager(long channelmanager, long keys_manager, Currency network, long amt_msat, String description);
6722         // void DefaultRouter_free(struct LDKDefaultRouter this_obj);
6723         public static native void DefaultRouter_free(long this_obj);
6724         // MUST_USE_RES struct LDKDefaultRouter DefaultRouter_new(const struct LDKNetworkGraph *NONNULL_PTR network_graph, struct LDKLogger logger);
6725         public static native long DefaultRouter_new(long network_graph, long logger);
6726         // struct LDKRouter DefaultRouter_as_Router(const struct LDKDefaultRouter *NONNULL_PTR this_arg);
6727         public static native long DefaultRouter_as_Router(long this_arg);
6728         // struct LDKPayer ChannelManager_as_Payer(const struct LDKChannelManager *NONNULL_PTR this_arg);
6729         public static native long ChannelManager_as_Payer(long this_arg);
6730         // struct LDKCResult_SiPrefixNoneZ SiPrefix_from_str(struct LDKStr s);
6731         public static native long SiPrefix_from_str(String s);
6732         // struct LDKCResult_InvoiceNoneZ Invoice_from_str(struct LDKStr s);
6733         public static native long Invoice_from_str(String s);
6734         // struct LDKCResult_SignedRawInvoiceNoneZ SignedRawInvoice_from_str(struct LDKStr s);
6735         public static native long SignedRawInvoice_from_str(String s);
6736         // struct LDKStr Invoice_to_str(const struct LDKInvoice *NONNULL_PTR o);
6737         public static native String Invoice_to_str(long o);
6738         // struct LDKStr SignedRawInvoice_to_str(const struct LDKSignedRawInvoice *NONNULL_PTR o);
6739         public static native String SignedRawInvoice_to_str(long o);
6740         // struct LDKStr Currency_to_str(const enum LDKCurrency *NONNULL_PTR o);
6741         public static native String Currency_to_str(long o);
6742         // struct LDKStr SiPrefix_to_str(const enum LDKSiPrefix *NONNULL_PTR o);
6743         public static native String SiPrefix_to_str(long o);
6744 }