Update auto-generated bindings
[ldk-java] / ts / bindings.ts
1
2 import * as fs from 'fs';
3 const source = fs.readFileSync('./ldk.wasm');
4
5 const memory = new WebAssembly.Memory({initial: 256});
6 const wasmModule = new WebAssembly.Module(source);
7
8 const imports: any = {};
9 imports.env = {};
10
11 imports.env.memoryBase = 0;
12 imports.env.memory = memory;
13 imports.env.tableBase = 0;
14 imports.env.table = new WebAssembly.Table({initial: 4, element: 'anyfunc'});
15
16 imports.env["abort"] = function () {
17     console.error("ABORT");
18 };
19
20 let wasm = null;
21 let isWasmInitialized: boolean = false;
22
23
24 // WASM CODEC
25
26 const nextMultipleOfFour = (value: number) => {
27     return Math.ceil(value / 4) * 4;
28 }
29
30 const encodeUint8Array = (inputArray) => {
31         const cArrayPointer = wasm.TS_malloc(inputArray.length + 4);
32         const arrayLengthView = new Uint32Array(memory.buffer, cArrayPointer, 1);
33     arrayLengthView[0] = inputArray.length;
34         const arrayMemoryView = new Uint8Array(memory.buffer, cArrayPointer + 4, inputArray.length);
35         arrayMemoryView.set(inputArray);
36         return cArrayPointer;
37 }
38
39 const encodeUint32Array = (inputArray) => {
40         const cArrayPointer = wasm.TS_malloc((inputArray.length + 1) * 4);
41         const arrayMemoryView = new Uint32Array(memory.buffer, cArrayPointer, inputArray.length);
42         arrayMemoryView.set(inputArray, 1);
43     arrayMemoryView[0] = inputArray.length;
44         return cArrayPointer;
45 }
46
47 const getArrayLength = (arrayPointer) => {
48         const arraySizeViewer = new Uint32Array(
49                 memory.buffer, // value
50                 arrayPointer, // offset
51                 1 // one int
52         );
53         return arraySizeViewer[0];
54 }
55 const decodeUint8Array = (arrayPointer, free = true) => {
56         const arraySize = getArrayLength(arrayPointer);
57         const actualArrayViewer = new Uint8Array(
58                 memory.buffer, // value
59                 arrayPointer + 4, // offset (ignoring length bytes)
60                 arraySize // uint8 count
61         );
62         // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
63         // will free the underlying memory when it becomes unreachable instead of copying here.
64         const actualArray = actualArrayViewer.slice(0, arraySize);
65         if (free) {
66                 wasm.TS_free(arrayPointer);
67         }
68         return actualArray;
69 }
70 const decodeUint32Array = (arrayPointer, free = true) => {
71         const arraySize = getArrayLength(arrayPointer);
72         const actualArrayViewer = new Uint32Array(
73                 memory.buffer, // value
74                 arrayPointer + 4, // offset (ignoring length bytes)
75                 arraySize // uint32 count
76         );
77         // Clone the contents, TODO: In the future we should wrap the Viewer in a class that
78         // will free the underlying memory when it becomes unreachable instead of copying here.
79         const actualArray = actualArrayViewer.slice(0, arraySize);
80         if (free) {
81                 wasm.TS_free(arrayPointer);
82         }
83         return actualArray;
84 }
85
86 const encodeString = (string) => {
87     // make malloc count divisible by 4
88     const memoryNeed = nextMultipleOfFour(string.length + 1);
89     const stringPointer = wasm.TS_malloc(memoryNeed);
90     const stringMemoryView = new Uint8Array(
91         memory.buffer, // value
92         stringPointer, // offset
93         string.length + 1 // length
94     );
95     for (let i = 0; i < string.length; i++) {
96         stringMemoryView[i] = string.charCodeAt(i);
97     }
98     stringMemoryView[string.length] = 0;
99     return stringPointer;
100 }
101
102 const decodeString = (stringPointer, free = true) => {
103     const memoryView = new Uint8Array(memory.buffer, stringPointer);
104     let cursor = 0;
105     let result = '';
106
107     while (memoryView[cursor] !== 0) {
108         result += String.fromCharCode(memoryView[cursor]);
109         cursor++;
110     }
111
112     if (free) {
113         wasm.wasm_free(stringPointer);
114     }
115
116     return result;
117 };
118
119 export class VecOrSliceDef {
120     public dataptr: number;
121     public datalen: number;
122     public stride: number;
123     public constructor(dataptr: number, datalen: number, stride: number) {
124         this.dataptr = dataptr;
125         this.datalen = datalen;
126         this.stride = stride;
127     }
128 }
129
130 /*
131 TODO: load WASM file
132 static {
133     System.loadLibrary("lightningjni");
134     init(java.lang.Enum.class, VecOrSliceDef.class);
135     init_class_cache();
136 }
137
138 static native void init(java.lang.Class c, java.lang.Class slicedef);
139 static native void init_class_cache();
140
141 public static native boolean deref_bool(long ptr);
142 public static native long deref_long(long ptr);
143 public static native void free_heap_ptr(long ptr);
144 public static native byte[] read_bytes(long ptr, long len);
145 public static native byte[] get_u8_slice_bytes(long slice_ptr);
146 public static native long bytes_to_u8_vec(byte[] bytes);
147 public static native long new_txpointer_copy_data(byte[] txdata);
148 public static native void txpointer_free(long ptr);
149 public static native byte[] txpointer_get_buffer(long ptr);
150 public static native long vec_slice_len(long vec);
151 public static native long new_empty_slice_vec();
152 */
153
154         public static native long LDKCVec_u8Z_new(number[] elems);
155         public static native boolean LDKCResult_SecretKeyErrorZ_result_ok(long arg);
156         public static native Uint8Array LDKCResult_SecretKeyErrorZ_get_ok(long arg);
157         public static native LDKSecp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
158         public static native boolean LDKCResult_PublicKeyErrorZ_result_ok(long arg);
159         public static native Uint8Array LDKCResult_PublicKeyErrorZ_get_ok(long arg);
160         public static native LDKSecp256k1Error LDKCResult_PublicKeyErrorZ_get_err(long arg);
161         public static native boolean LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(long arg);
162         public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(long arg);
163         public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_err(long arg);
164         public static native boolean LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(long arg);
165         public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(long arg);
166         public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(long arg);
167         public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
168         public static native number LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
169         public static native LDKSecp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
170         public static class LDKCOption_u32Z {
171                 private LDKCOption_u32Z() {}
172                 export class Some extends LDKCOption_u32Z {
173                         public number some;
174                         Some(number some) { this.some = some; }
175                 }
176                 export class None extends LDKCOption_u32Z {
177                         None() { }
178                 }
179                 static native void init();
180         }
181         static { LDKCOption_u32Z.init(); }
182         public static native LDKCOption_u32Z LDKCOption_u32Z_ref_from_ptr(long ptr);
183         public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
184         public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
185         public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
186         public static native boolean LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
187         public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
188         public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
189         public static native boolean LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
190         public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
191         public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
192         public static native boolean LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(long arg);
193         public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long arg);
194         public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long arg);
195         public static native boolean LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(long arg);
196         public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
197         public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
198         public static native boolean LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(long arg);
199         public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(long arg);
200         public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(long arg);
201         public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
202         public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
203         public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
204         public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
205         public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
206         public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
207         public static class LDKErrorAction {
208                 private LDKErrorAction() {}
209                 export class DisconnectPeer extends LDKErrorAction {
210                         public number msg;
211                         DisconnectPeer(number msg) { this.msg = msg; }
212                 }
213                 export class IgnoreError extends LDKErrorAction {
214                         IgnoreError() { }
215                 }
216                 export class SendErrorMessage extends LDKErrorAction {
217                         public number msg;
218                         SendErrorMessage(number msg) { this.msg = msg; }
219                 }
220                 static native void init();
221         }
222         static { LDKErrorAction.init(); }
223         public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
224         public static class LDKHTLCFailChannelUpdate {
225                 private LDKHTLCFailChannelUpdate() {}
226                 export class ChannelUpdateMessage extends LDKHTLCFailChannelUpdate {
227                         public number msg;
228                         ChannelUpdateMessage(number msg) { this.msg = msg; }
229                 }
230                 export class ChannelClosed extends LDKHTLCFailChannelUpdate {
231                         public number short_channel_id;
232                         public boolean is_permanent;
233                         ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
234                 }
235                 export class NodeFailure extends LDKHTLCFailChannelUpdate {
236                         public Uint8Array node_id;
237                         public boolean is_permanent;
238                         NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
239                 }
240                 static native void init();
241         }
242         static { LDKHTLCFailChannelUpdate.init(); }
243         public static native LDKHTLCFailChannelUpdate LDKHTLCFailChannelUpdate_ref_from_ptr(long ptr);
244         public static class LDKMessageSendEvent {
245                 private LDKMessageSendEvent() {}
246                 export class SendAcceptChannel extends LDKMessageSendEvent {
247                         public Uint8Array node_id;
248                         public number msg;
249                         SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
250                 }
251                 export class SendOpenChannel extends LDKMessageSendEvent {
252                         public Uint8Array node_id;
253                         public number msg;
254                         SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
255                 }
256                 export class SendFundingCreated extends LDKMessageSendEvent {
257                         public Uint8Array node_id;
258                         public number msg;
259                         SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
260                 }
261                 export class SendFundingSigned extends LDKMessageSendEvent {
262                         public Uint8Array node_id;
263                         public number msg;
264                         SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
265                 }
266                 export class SendFundingLocked extends LDKMessageSendEvent {
267                         public Uint8Array node_id;
268                         public number msg;
269                         SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
270                 }
271                 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
272                         public Uint8Array node_id;
273                         public number msg;
274                         SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
275                 }
276                 export class UpdateHTLCs extends LDKMessageSendEvent {
277                         public Uint8Array node_id;
278                         public number updates;
279                         UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
280                 }
281                 export class SendRevokeAndACK extends LDKMessageSendEvent {
282                         public Uint8Array node_id;
283                         public number msg;
284                         SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
285                 }
286                 export class SendClosingSigned extends LDKMessageSendEvent {
287                         public Uint8Array node_id;
288                         public number msg;
289                         SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
290                 }
291                 export class SendShutdown extends LDKMessageSendEvent {
292                         public Uint8Array node_id;
293                         public number msg;
294                         SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
295                 }
296                 export class SendChannelReestablish extends LDKMessageSendEvent {
297                         public Uint8Array node_id;
298                         public number msg;
299                         SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
300                 }
301                 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
302                         public number msg;
303                         public number update_msg;
304                         BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
305                 }
306                 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
307                         public number msg;
308                         BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
309                 }
310                 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
311                         public number msg;
312                         BroadcastChannelUpdate(number msg) { this.msg = msg; }
313                 }
314                 export class HandleError extends LDKMessageSendEvent {
315                         public Uint8Array node_id;
316                         public number action;
317                         HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
318                 }
319                 export class PaymentFailureNetworkUpdate extends LDKMessageSendEvent {
320                         public number update;
321                         PaymentFailureNetworkUpdate(number update) { this.update = update; }
322                 }
323                 export class SendChannelRangeQuery extends LDKMessageSendEvent {
324                         public Uint8Array node_id;
325                         public number msg;
326                         SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
327                 }
328                 export class SendShortIdsQuery extends LDKMessageSendEvent {
329                         public Uint8Array node_id;
330                         public number msg;
331                         SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
332                 }
333                 export class SendReplyChannelRange extends LDKMessageSendEvent {
334                         public Uint8Array node_id;
335                         public number msg;
336                         SendReplyChannelRange(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
337                 }
338                 static native void init();
339         }
340         static { LDKMessageSendEvent.init(); }
341         public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
342         public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
343         public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
344         public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
345         public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
346         public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
347         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
348         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
349         public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
350         public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
351         public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
352         public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
353         public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
354         public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
355         public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
356         public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
357         public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
358         public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
359         public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
360         public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
361         public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
362         public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
363         public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
364         public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
365         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
366         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
367         public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
368         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
369         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
370         public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
371         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
372         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
373         public static native boolean LDKCResult_InvoiceFeaturesDecodeErrorZ_result_ok(long arg);
374         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
375         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
376         public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
377         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
378         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
379         public static class LDKCOption_u64Z {
380                 private LDKCOption_u64Z() {}
381                 export class Some extends LDKCOption_u64Z {
382                         public number some;
383                         Some(number some) { this.some = some; }
384                 }
385                 export class None extends LDKCOption_u64Z {
386                         None() { }
387                 }
388                 static native void init();
389         }
390         static { LDKCOption_u64Z.init(); }
391         public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
392         public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
393         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
394         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
395         public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
396         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
397         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
398         public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
399         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
400         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
401         public static class LDKNetAddress {
402                 private LDKNetAddress() {}
403                 export class IPv4 extends LDKNetAddress {
404                         public Uint8Array addr;
405                         public number port;
406                         IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
407                 }
408                 export class IPv6 extends LDKNetAddress {
409                         public Uint8Array addr;
410                         public number port;
411                         IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
412                 }
413                 export class OnionV2 extends LDKNetAddress {
414                         public Uint8Array addr;
415                         public number port;
416                         OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
417                 }
418                 export class OnionV3 extends LDKNetAddress {
419                         public Uint8Array ed25519_pubkey;
420                         public number checksum;
421                         public number version;
422                         public number port;
423                         OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
424                 }
425                 static native void init();
426         }
427         static { LDKNetAddress.init(); }
428         public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
429         public static native long LDKCVec_NetAddressZ_new(number[] elems);
430         public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
431         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
432         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
433         public static native long LDKCVec_u64Z_new(number[] elems);
434         public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
435         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
436         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
437         public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
438         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
439         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
440         public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
441         public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
442         public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
443         public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
444         public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
445         public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
446         public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
447         public static class LDKMonitorEvent {
448                 private LDKMonitorEvent() {}
449                 export class HTLCEvent extends LDKMonitorEvent {
450                         public number htlc_event;
451                         HTLCEvent(number htlc_event) { this.htlc_event = htlc_event; }
452                 }
453                 export class CommitmentTxBroadcasted extends LDKMonitorEvent {
454                         public number commitment_tx_broadcasted;
455                         CommitmentTxBroadcasted(number commitment_tx_broadcasted) { this.commitment_tx_broadcasted = commitment_tx_broadcasted; }
456                 }
457                 static native void init();
458         }
459         static { LDKMonitorEvent.init(); }
460         public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
461         public static native long LDKCVec_MonitorEventZ_new(number[] elems);
462         public static class LDKSpendableOutputDescriptor {
463                 private LDKSpendableOutputDescriptor() {}
464                 export class StaticOutput extends LDKSpendableOutputDescriptor {
465                         public number outpoint;
466                         public number output;
467                         StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
468                 }
469                 export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
470                         public number delayed_payment_output;
471                         DelayedPaymentOutput(number delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
472                 }
473                 export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
474                         public number static_payment_output;
475                         StaticPaymentOutput(number static_payment_output) { this.static_payment_output = static_payment_output; }
476                 }
477                 static native void init();
478         }
479         static { LDKSpendableOutputDescriptor.init(); }
480         public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
481         public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
482         public static class LDKEvent {
483                 private LDKEvent() {}
484                 export class FundingGenerationReady extends LDKEvent {
485                         public Uint8Array temporary_channel_id;
486                         public number channel_value_satoshis;
487                         public Uint8Array output_script;
488                         public number user_channel_id;
489                         FundingGenerationReady(Uint8Array temporary_channel_id, number channel_value_satoshis, Uint8Array output_script, number 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; }
490                 }
491                 export class FundingBroadcastSafe extends LDKEvent {
492                         public number funding_txo;
493                         public number user_channel_id;
494                         FundingBroadcastSafe(number funding_txo, number user_channel_id) { this.funding_txo = funding_txo; this.user_channel_id = user_channel_id; }
495                 }
496                 export class PaymentReceived extends LDKEvent {
497                         public Uint8Array payment_hash;
498                         public Uint8Array payment_secret;
499                         public number amt;
500                         PaymentReceived(Uint8Array payment_hash, Uint8Array payment_secret, number amt) { this.payment_hash = payment_hash; this.payment_secret = payment_secret; this.amt = amt; }
501                 }
502                 export class PaymentSent extends LDKEvent {
503                         public Uint8Array payment_preimage;
504                         PaymentSent(Uint8Array payment_preimage) { this.payment_preimage = payment_preimage; }
505                 }
506                 export class PaymentFailed extends LDKEvent {
507                         public Uint8Array payment_hash;
508                         public boolean rejected_by_dest;
509                         PaymentFailed(Uint8Array payment_hash, boolean rejected_by_dest) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; }
510                 }
511                 export class PendingHTLCsForwardable extends LDKEvent {
512                         public number time_forwardable;
513                         PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
514                 }
515                 export class SpendableOutputs extends LDKEvent {
516                         public number[] outputs;
517                         SpendableOutputs(number[] outputs) { this.outputs = outputs; }
518                 }
519                 static native void init();
520         }
521         static { LDKEvent.init(); }
522         public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
523         public static native long LDKCVec_EventZ_new(number[] elems);
524         public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
525         public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
526         public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
527         public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
528         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
529         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
530         public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
531         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
532         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
533         public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
534         public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
535         public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
536         public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
537         public static native number LDKC2Tuple_OutPointScriptZ_get_a(long ptr);
538         public static native Uint8Array LDKC2Tuple_OutPointScriptZ_get_b(long ptr);
539         public static native long LDKC2Tuple_u32ScriptZ_new(number a, Uint8Array b);
540         public static native number LDKC2Tuple_u32ScriptZ_get_a(long ptr);
541         public static native Uint8Array LDKC2Tuple_u32ScriptZ_get_b(long ptr);
542         public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
543         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Uint8Array a, number[] b);
544         public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(long ptr);
545         public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(long ptr);
546         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
547         public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
548         public static native number LDKC2Tuple_u32TxOutZ_get_a(long ptr);
549         public static native number LDKC2Tuple_u32TxOutZ_get_b(long ptr);
550         public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
551         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
552         public static native Uint8Array LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(long ptr);
553         public static native number[] LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(long ptr);
554         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
555         public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
556         public static native Uint8Array LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(long ptr);
557         public static native Uint8Array[] LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(long ptr);
558         public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
559         public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
560         public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
561         public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
562         public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
563         public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
564
565
566
567 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
568
569                 export interface LDKSign {
570                         get_per_commitment_point (idx: number): Uint8Array;
571                         release_commitment_secret (idx: number): Uint8Array;
572                         channel_keys_id (): Uint8Array;
573                         sign_counterparty_commitment (commitment_tx: number): number;
574                         sign_holder_commitment_and_htlcs (commitment_tx: number): number;
575                         sign_justice_transaction (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
576                         sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
577                         sign_closing_transaction (closing_tx: Uint8Array): number;
578                         sign_channel_announcement (msg: number): number;
579                         ready_channel (channel_parameters: number): void;
580                         write (): Uint8Array;
581                 }
582
583                 export function LDKSign_new(impl: LDKSign, pubkeys: number): number {
584             throw new Error('unimplemented'); // TODO: bind to WASM
585         }
586
587 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
588
589
590         // LDKPublicKey Sign_get_per_commitment_point LDKSign *NONNULL_PTR this_arg, uint64_t idx
591         export function Sign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
592                 if(!isWasmInitialized) {
593                         throw new Error("initializeWasm() must be awaited first!");
594                 }
595                 const nativeResponseValue = wasm.Sign_get_per_commitment_point(this_arg, idx);
596                 return decodeArray(nativeResponseValue);
597         }
598         // LDKThirtyTwoBytes Sign_release_commitment_secret LDKSign *NONNULL_PTR this_arg, uint64_t idx
599         export function Sign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
600                 if(!isWasmInitialized) {
601                         throw new Error("initializeWasm() must be awaited first!");
602                 }
603                 const nativeResponseValue = wasm.Sign_release_commitment_secret(this_arg, idx);
604                 return decodeArray(nativeResponseValue);
605         }
606         // LDKThirtyTwoBytes Sign_channel_keys_id LDKSign *NONNULL_PTR this_arg
607         export function Sign_channel_keys_id(this_arg: number): Uint8Array {
608                 if(!isWasmInitialized) {
609                         throw new Error("initializeWasm() must be awaited first!");
610                 }
611                 const nativeResponseValue = wasm.Sign_channel_keys_id(this_arg);
612                 return decodeArray(nativeResponseValue);
613         }
614         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ Sign_sign_counterparty_commitment LDKSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
615         export function Sign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
616                 if(!isWasmInitialized) {
617                         throw new Error("initializeWasm() must be awaited first!");
618                 }
619                 const nativeResponseValue = wasm.Sign_sign_counterparty_commitment(this_arg, commitment_tx);
620                 return nativeResponseValue;
621         }
622         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ Sign_sign_holder_commitment_and_htlcs LDKSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
623         export function Sign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
624                 if(!isWasmInitialized) {
625                         throw new Error("initializeWasm() must be awaited first!");
626                 }
627                 const nativeResponseValue = wasm.Sign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
628                 return nativeResponseValue;
629         }
630         // LDKCResult_SignatureNoneZ Sign_sign_justice_transaction LDKSign *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
631         export function Sign_sign_justice_transaction(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
632                 if(!isWasmInitialized) {
633                         throw new Error("initializeWasm() must be awaited first!");
634                 }
635                 const nativeResponseValue = wasm.Sign_sign_justice_transaction(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
636                 return nativeResponseValue;
637         }
638         // LDKCResult_SignatureNoneZ Sign_sign_counterparty_htlc_transaction LDKSign *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
639         export function Sign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
640                 if(!isWasmInitialized) {
641                         throw new Error("initializeWasm() must be awaited first!");
642                 }
643                 const nativeResponseValue = wasm.Sign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
644                 return nativeResponseValue;
645         }
646         // LDKCResult_SignatureNoneZ Sign_sign_closing_transaction LDKSign *NONNULL_PTR this_arg, struct LDKTransaction closing_tx
647         export function Sign_sign_closing_transaction(this_arg: number, closing_tx: Uint8Array): number {
648                 if(!isWasmInitialized) {
649                         throw new Error("initializeWasm() must be awaited first!");
650                 }
651                 const nativeResponseValue = wasm.Sign_sign_closing_transaction(this_arg, encodeArray(closing_tx));
652                 return nativeResponseValue;
653         }
654         // LDKCResult_SignatureNoneZ Sign_sign_channel_announcement LDKSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
655         export function Sign_sign_channel_announcement(this_arg: number, msg: number): number {
656                 if(!isWasmInitialized) {
657                         throw new Error("initializeWasm() must be awaited first!");
658                 }
659                 const nativeResponseValue = wasm.Sign_sign_channel_announcement(this_arg, msg);
660                 return nativeResponseValue;
661         }
662         // void Sign_ready_channel LDKSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
663         export function Sign_ready_channel(this_arg: number, channel_parameters: number): void {
664                 if(!isWasmInitialized) {
665                         throw new Error("initializeWasm() must be awaited first!");
666                 }
667                 const nativeResponseValue = wasm.Sign_ready_channel(this_arg, channel_parameters);
668                 // debug statements here
669         }
670         // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
671         export function Sign_write(this_arg: number): Uint8Array {
672                 if(!isWasmInitialized) {
673                         throw new Error("initializeWasm() must be awaited first!");
674                 }
675                 const nativeResponseValue = wasm.Sign_write(this_arg);
676                 return decodeArray(nativeResponseValue);
677         }
678         // LDKChannelPublicKeys Sign_get_pubkeys LDKSign *NONNULL_PTR this_arg
679         export function Sign_get_pubkeys(this_arg: number): number {
680                 if(!isWasmInitialized) {
681                         throw new Error("initializeWasm() must be awaited first!");
682                 }
683                 const nativeResponseValue = wasm.Sign_get_pubkeys(this_arg);
684                 return nativeResponseValue;
685         }
686         public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
687         public static native Uint8Array LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
688         public static native number LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
689         public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
690         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
691         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
692         public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
693         public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
694         public static native LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
695         public static class LDKCOption_C2Tuple_usizeTransactionZZ {
696                 private LDKCOption_C2Tuple_usizeTransactionZZ() {}
697                 export class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
698                         public number some;
699                         Some(number some) { this.some = some; }
700                 }
701                 export class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
702                         None() { }
703                 }
704                 static native void init();
705         }
706         static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
707         public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
708         public static class LDKAPIError {
709                 private LDKAPIError() {}
710                 export class APIMisuseError extends LDKAPIError {
711                         public Uint8Array err;
712                         APIMisuseError(Uint8Array err) { this.err = err; }
713                 }
714                 export class FeeRateTooHigh extends LDKAPIError {
715                         public Uint8Array err;
716                         public number feerate;
717                         FeeRateTooHigh(Uint8Array err, number feerate) { this.err = err; this.feerate = feerate; }
718                 }
719                 export class RouteError extends LDKAPIError {
720                         public String err;
721                         RouteError(String err) { this.err = err; }
722                 }
723                 export class ChannelUnavailable extends LDKAPIError {
724                         public Uint8Array err;
725                         ChannelUnavailable(Uint8Array err) { this.err = err; }
726                 }
727                 export class MonitorUpdateFailed extends LDKAPIError {
728                         MonitorUpdateFailed() { }
729                 }
730                 static native void init();
731         }
732         static { LDKAPIError.init(); }
733         public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
734         public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
735         public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
736         public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
737         public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
738         public static native long LDKCVec_APIErrorZ_new(number[] elems);
739         public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
740         public static class LDKPaymentSendFailure {
741                 private LDKPaymentSendFailure() {}
742                 export class ParameterError extends LDKPaymentSendFailure {
743                         public number parameter_error;
744                         ParameterError(number parameter_error) { this.parameter_error = parameter_error; }
745                 }
746                 export class PathParameterError extends LDKPaymentSendFailure {
747                         public number[] path_parameter_error;
748                         PathParameterError(number[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
749                 }
750                 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
751                         public number[] all_failed_retry_safe;
752                         AllFailedRetrySafe(number[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
753                 }
754                 export class PartialFailure extends LDKPaymentSendFailure {
755                         public number[] partial_failure;
756                         PartialFailure(number[] partial_failure) { this.partial_failure = partial_failure; }
757                 }
758                 static native void init();
759         }
760         static { LDKPaymentSendFailure.init(); }
761         public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
762         public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
763         public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
764         public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
765         public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
766
767
768
769 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
770
771                 export interface LDKWatch {
772                         watch_channel (funding_txo: number, monitor: number): number;
773                         update_channel (funding_txo: number, update: number): number;
774                         release_pending_monitor_events (): number[];
775                 }
776
777                 export function LDKWatch_new(impl: LDKWatch): number {
778             throw new Error('unimplemented'); // TODO: bind to WASM
779         }
780
781 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
782
783
784         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
785         export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
786                 if(!isWasmInitialized) {
787                         throw new Error("initializeWasm() must be awaited first!");
788                 }
789                 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
790                 return nativeResponseValue;
791         }
792         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
793         export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
794                 if(!isWasmInitialized) {
795                         throw new Error("initializeWasm() must be awaited first!");
796                 }
797                 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
798                 return nativeResponseValue;
799         }
800         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
801         export function Watch_release_pending_monitor_events(this_arg: number): number[] {
802                 if(!isWasmInitialized) {
803                         throw new Error("initializeWasm() must be awaited first!");
804                 }
805                 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
806                 return nativeResponseValue;
807         }
808
809
810
811 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
812
813                 export interface LDKBroadcasterInterface {
814                         broadcast_transaction (tx: Uint8Array): void;
815                 }
816
817                 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
818             throw new Error('unimplemented'); // TODO: bind to WASM
819         }
820
821 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
822
823
824         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
825         export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
826                 if(!isWasmInitialized) {
827                         throw new Error("initializeWasm() must be awaited first!");
828                 }
829                 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
830                 // debug statements here
831         }
832         public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
833         public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
834         public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
835
836
837
838 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
839
840                 export interface LDKKeysInterface {
841                         get_node_secret (): Uint8Array;
842                         get_destination_script (): Uint8Array;
843                         get_shutdown_pubkey (): Uint8Array;
844                         get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
845                         get_secure_random_bytes (): Uint8Array;
846                         read_chan_signer (reader: Uint8Array): number;
847                 }
848
849                 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
850             throw new Error('unimplemented'); // TODO: bind to WASM
851         }
852
853 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
854
855
856         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
857         export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
858                 if(!isWasmInitialized) {
859                         throw new Error("initializeWasm() must be awaited first!");
860                 }
861                 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
862                 return decodeArray(nativeResponseValue);
863         }
864         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
865         export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
866                 if(!isWasmInitialized) {
867                         throw new Error("initializeWasm() must be awaited first!");
868                 }
869                 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
870                 return decodeArray(nativeResponseValue);
871         }
872         // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface *NONNULL_PTR this_arg
873         export function KeysInterface_get_shutdown_pubkey(this_arg: number): Uint8Array {
874                 if(!isWasmInitialized) {
875                         throw new Error("initializeWasm() must be awaited first!");
876                 }
877                 const nativeResponseValue = wasm.KeysInterface_get_shutdown_pubkey(this_arg);
878                 return decodeArray(nativeResponseValue);
879         }
880         // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
881         export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
882                 if(!isWasmInitialized) {
883                         throw new Error("initializeWasm() must be awaited first!");
884                 }
885                 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
886                 return nativeResponseValue;
887         }
888         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
889         export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
890                 if(!isWasmInitialized) {
891                         throw new Error("initializeWasm() must be awaited first!");
892                 }
893                 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
894                 return decodeArray(nativeResponseValue);
895         }
896         // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
897         export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
898                 if(!isWasmInitialized) {
899                         throw new Error("initializeWasm() must be awaited first!");
900                 }
901                 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
902                 return nativeResponseValue;
903         }
904
905
906
907 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
908
909                 export interface LDKFeeEstimator {
910                         get_est_sat_per_1000_weight (confirmation_target: LDKConfirmationTarget): number;
911                 }
912
913                 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
914             throw new Error('unimplemented'); // TODO: bind to WASM
915         }
916
917 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
918
919
920         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
921         export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: LDKConfirmationTarget): number {
922                 if(!isWasmInitialized) {
923                         throw new Error("initializeWasm() must be awaited first!");
924                 }
925                 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
926                 return nativeResponseValue;
927         }
928
929
930
931 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
932
933                 export interface LDKLogger {
934                         log (record: String): void;
935                 }
936
937                 export function LDKLogger_new(impl: LDKLogger): number {
938             throw new Error('unimplemented'); // TODO: bind to WASM
939         }
940
941 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
942
943
944         public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
945         public static native Uint8Array LDKC2Tuple_BlockHashChannelManagerZ_get_a(long ptr);
946         public static native number LDKC2Tuple_BlockHashChannelManagerZ_get_b(long ptr);
947         public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
948         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
949         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
950         public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
951         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
952         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
953         public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
954         public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
955         public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
956         public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
957         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
958         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
959         public static native long LDKCVec_TxOutZ_new(number[] elems);
960         public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
961         public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
962         public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
963         public static native long LDKCVec_RouteHopZ_new(number[] elems);
964         public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
965         public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
966         public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
967         public static native long LDKCVec_RouteHintZ_new(number[] elems);
968         public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
969         public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
970         public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
971         public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
972         public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
973         public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
974         public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
975         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
976         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
977         public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
978         public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
979         public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
980         public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
981         public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
982         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
983         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
984         public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
985         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
986         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
987         public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
988         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
989         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
990         public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
991         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
992         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
993         public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
994         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
995         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
996         public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
997         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
998         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
999         public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
1000         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
1001         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
1002         public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
1003         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
1004         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
1005         public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
1006         public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
1007         public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
1008         public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
1009         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
1010         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
1011         public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
1012         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
1013         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
1014         public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
1015         public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
1016         public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
1017         public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
1018         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
1019         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
1020         public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
1021         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
1022         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
1023         public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
1024         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
1025         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
1026         public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
1027         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
1028         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
1029         public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
1030         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
1031         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
1032         public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
1033         public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
1034         public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
1035         public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
1036         public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
1037         public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
1038         public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1039         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1040         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
1041         public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1042         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1043         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
1044         public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
1045         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
1046         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
1047         public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
1048         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
1049         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
1050         public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
1051         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
1052         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
1053         public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
1054         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
1055         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
1056         public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
1057         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
1058         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
1059         public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
1060         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
1061         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
1062         public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
1063         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1064         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1065         public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
1066         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1067         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1068         public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
1069         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1070         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1071         public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
1072         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1073         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1074
1075
1076
1077 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1078
1079                 export interface LDKMessageSendEventsProvider {
1080                         get_and_clear_pending_msg_events (): number[];
1081                 }
1082
1083                 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1084             throw new Error('unimplemented'); // TODO: bind to WASM
1085         }
1086
1087 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1088
1089
1090         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1091         export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1092                 if(!isWasmInitialized) {
1093                         throw new Error("initializeWasm() must be awaited first!");
1094                 }
1095                 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1096                 return nativeResponseValue;
1097         }
1098
1099
1100
1101 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1102
1103                 export interface LDKEventsProvider {
1104                         get_and_clear_pending_events (): number[];
1105                 }
1106
1107                 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1108             throw new Error('unimplemented'); // TODO: bind to WASM
1109         }
1110
1111 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1112
1113
1114         // LDKCVec_EventZ EventsProvider_get_and_clear_pending_events LDKEventsProvider *NONNULL_PTR this_arg
1115         export function EventsProvider_get_and_clear_pending_events(this_arg: number): number[] {
1116                 if(!isWasmInitialized) {
1117                         throw new Error("initializeWasm() must be awaited first!");
1118                 }
1119                 const nativeResponseValue = wasm.EventsProvider_get_and_clear_pending_events(this_arg);
1120                 return nativeResponseValue;
1121         }
1122
1123
1124
1125 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1126
1127                 export interface LDKAccess {
1128                         get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1129                 }
1130
1131                 export function LDKAccess_new(impl: LDKAccess): number {
1132             throw new Error('unimplemented'); // TODO: bind to WASM
1133         }
1134
1135 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1136
1137
1138         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1139         export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1140                 if(!isWasmInitialized) {
1141                         throw new Error("initializeWasm() must be awaited first!");
1142                 }
1143                 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1144                 return nativeResponseValue;
1145         }
1146
1147
1148
1149 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1150
1151                 export interface LDKListen {
1152                         block_connected (block: Uint8Array, height: number): void;
1153                         block_disconnected (header: Uint8Array, height: number): void;
1154                 }
1155
1156                 export function LDKListen_new(impl: LDKListen): number {
1157             throw new Error('unimplemented'); // TODO: bind to WASM
1158         }
1159
1160 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1161
1162
1163         // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1164         export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1165                 if(!isWasmInitialized) {
1166                         throw new Error("initializeWasm() must be awaited first!");
1167                 }
1168                 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1169                 // debug statements here
1170         }
1171         // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1172         export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1173                 if(!isWasmInitialized) {
1174                         throw new Error("initializeWasm() must be awaited first!");
1175                 }
1176                 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1177                 // debug statements here
1178         }
1179
1180
1181
1182 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1183
1184                 export interface LDKFilter {
1185                         register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1186                         register_output (output: number): number;
1187                 }
1188
1189                 export function LDKFilter_new(impl: LDKFilter): number {
1190             throw new Error('unimplemented'); // TODO: bind to WASM
1191         }
1192
1193 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1194
1195
1196         // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1197         export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1198                 if(!isWasmInitialized) {
1199                         throw new Error("initializeWasm() must be awaited first!");
1200                 }
1201                 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1202                 // debug statements here
1203         }
1204         // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
1205         export function Filter_register_output(this_arg: number, output: number): number {
1206                 if(!isWasmInitialized) {
1207                         throw new Error("initializeWasm() must be awaited first!");
1208                 }
1209                 const nativeResponseValue = wasm.Filter_register_output(this_arg, output);
1210                 return nativeResponseValue;
1211         }
1212
1213
1214
1215 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1216
1217                 export interface LDKPersist {
1218                         persist_new_channel (id: number, data: number): number;
1219                         update_persisted_channel (id: number, update: number, data: number): number;
1220                 }
1221
1222                 export function LDKPersist_new(impl: LDKPersist): number {
1223             throw new Error('unimplemented'); // TODO: bind to WASM
1224         }
1225
1226 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1227
1228
1229         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1230         export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1231                 if(!isWasmInitialized) {
1232                         throw new Error("initializeWasm() must be awaited first!");
1233                 }
1234                 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1235                 return nativeResponseValue;
1236         }
1237         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_update_persisted_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitorUpdate *NONNULL_PTR update, const struct LDKChannelMonitor *NONNULL_PTR data
1238         export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1239                 if(!isWasmInitialized) {
1240                         throw new Error("initializeWasm() must be awaited first!");
1241                 }
1242                 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1243                 return nativeResponseValue;
1244         }
1245
1246
1247
1248 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1249
1250                 export interface LDKChannelMessageHandler {
1251                         handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1252                         handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1253                         handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1254                         handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1255                         handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1256                         handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1257                         handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1258                         handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1259                         handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1260                         handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1261                         handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1262                         handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1263                         handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1264                         handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1265                         handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1266                         peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1267                         peer_connected (their_node_id: Uint8Array, msg: number): void;
1268                         handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1269                         handle_channel_update (their_node_id: Uint8Array, msg: number): void;
1270                         handle_error (their_node_id: Uint8Array, msg: number): void;
1271                 }
1272
1273                 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1274             throw new Error('unimplemented'); // TODO: bind to WASM
1275         }
1276
1277 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1278
1279
1280         // 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
1281         export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1282                 if(!isWasmInitialized) {
1283                         throw new Error("initializeWasm() must be awaited first!");
1284                 }
1285                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1286                 // debug statements here
1287         }
1288         // 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
1289         export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1290                 if(!isWasmInitialized) {
1291                         throw new Error("initializeWasm() must be awaited first!");
1292                 }
1293                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1294                 // debug statements here
1295         }
1296         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1297         export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1298                 if(!isWasmInitialized) {
1299                         throw new Error("initializeWasm() must be awaited first!");
1300                 }
1301                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1302                 // debug statements here
1303         }
1304         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1305         export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1306                 if(!isWasmInitialized) {
1307                         throw new Error("initializeWasm() must be awaited first!");
1308                 }
1309                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1310                 // debug statements here
1311         }
1312         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1313         export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1314                 if(!isWasmInitialized) {
1315                         throw new Error("initializeWasm() must be awaited first!");
1316                 }
1317                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1318                 // debug statements here
1319         }
1320         // 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
1321         export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1322                 if(!isWasmInitialized) {
1323                         throw new Error("initializeWasm() must be awaited first!");
1324                 }
1325                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
1326                 // debug statements here
1327         }
1328         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1329         export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1330                 if(!isWasmInitialized) {
1331                         throw new Error("initializeWasm() must be awaited first!");
1332                 }
1333                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1334                 // debug statements here
1335         }
1336         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1337         export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1338                 if(!isWasmInitialized) {
1339                         throw new Error("initializeWasm() must be awaited first!");
1340                 }
1341                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1342                 // debug statements here
1343         }
1344         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1345         export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1346                 if(!isWasmInitialized) {
1347                         throw new Error("initializeWasm() must be awaited first!");
1348                 }
1349                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1350                 // debug statements here
1351         }
1352         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1353         export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1354                 if(!isWasmInitialized) {
1355                         throw new Error("initializeWasm() must be awaited first!");
1356                 }
1357                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1358                 // debug statements here
1359         }
1360         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
1361         export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1362                 if(!isWasmInitialized) {
1363                         throw new Error("initializeWasm() must be awaited first!");
1364                 }
1365                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
1366                 // debug statements here
1367         }
1368         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
1369         export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1370                 if(!isWasmInitialized) {
1371                         throw new Error("initializeWasm() must be awaited first!");
1372                 }
1373                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
1374                 // debug statements here
1375         }
1376         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
1377         export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1378                 if(!isWasmInitialized) {
1379                         throw new Error("initializeWasm() must be awaited first!");
1380                 }
1381                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
1382                 // debug statements here
1383         }
1384         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
1385         export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1386                 if(!isWasmInitialized) {
1387                         throw new Error("initializeWasm() must be awaited first!");
1388                 }
1389                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
1390                 // debug statements here
1391         }
1392         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
1393         export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1394                 if(!isWasmInitialized) {
1395                         throw new Error("initializeWasm() must be awaited first!");
1396                 }
1397                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
1398                 // debug statements here
1399         }
1400         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
1401         export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
1402                 if(!isWasmInitialized) {
1403                         throw new Error("initializeWasm() must be awaited first!");
1404                 }
1405                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
1406                 // debug statements here
1407         }
1408         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
1409         export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1410                 if(!isWasmInitialized) {
1411                         throw new Error("initializeWasm() must be awaited first!");
1412                 }
1413                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
1414                 // debug statements here
1415         }
1416         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
1417         export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1418                 if(!isWasmInitialized) {
1419                         throw new Error("initializeWasm() must be awaited first!");
1420                 }
1421                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
1422                 // debug statements here
1423         }
1424         // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
1425         export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1426                 if(!isWasmInitialized) {
1427                         throw new Error("initializeWasm() must be awaited first!");
1428                 }
1429                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_update(this_arg, encodeArray(their_node_id), msg);
1430                 // debug statements here
1431         }
1432         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
1433         export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1434                 if(!isWasmInitialized) {
1435                         throw new Error("initializeWasm() must be awaited first!");
1436                 }
1437                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
1438                 // debug statements here
1439         }
1440
1441
1442
1443 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1444
1445                 export interface LDKRoutingMessageHandler {
1446                         handle_node_announcement (msg: number): number;
1447                         handle_channel_announcement (msg: number): number;
1448                         handle_channel_update (msg: number): number;
1449                         handle_htlc_fail_channel_update (update: number): void;
1450                         get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
1451                         get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
1452                         sync_routing_table (their_node_id: Uint8Array, init: number): void;
1453                         handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
1454                         handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
1455                         handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
1456                         handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
1457                 }
1458
1459                 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1460             throw new Error('unimplemented'); // TODO: bind to WASM
1461         }
1462
1463 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1464
1465
1466         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
1467         export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
1468                 if(!isWasmInitialized) {
1469                         throw new Error("initializeWasm() must be awaited first!");
1470                 }
1471                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
1472                 return nativeResponseValue;
1473         }
1474         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
1475         export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
1476                 if(!isWasmInitialized) {
1477                         throw new Error("initializeWasm() must be awaited first!");
1478                 }
1479                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
1480                 return nativeResponseValue;
1481         }
1482         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
1483         export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
1484                 if(!isWasmInitialized) {
1485                         throw new Error("initializeWasm() must be awaited first!");
1486                 }
1487                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
1488                 return nativeResponseValue;
1489         }
1490         // void RoutingMessageHandler_handle_htlc_fail_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKHTLCFailChannelUpdate *NONNULL_PTR update
1491         export function RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg: number, update: number): void {
1492                 if(!isWasmInitialized) {
1493                         throw new Error("initializeWasm() must be awaited first!");
1494                 }
1495                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_htlc_fail_channel_update(this_arg, update);
1496                 // debug statements here
1497         }
1498         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
1499         export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
1500                 if(!isWasmInitialized) {
1501                         throw new Error("initializeWasm() must be awaited first!");
1502                 }
1503                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
1504                 return nativeResponseValue;
1505         }
1506         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
1507         export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
1508                 if(!isWasmInitialized) {
1509                         throw new Error("initializeWasm() must be awaited first!");
1510                 }
1511                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
1512                 return nativeResponseValue;
1513         }
1514         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
1515         export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
1516                 if(!isWasmInitialized) {
1517                         throw new Error("initializeWasm() must be awaited first!");
1518                 }
1519                 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
1520                 // debug statements here
1521         }
1522         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
1523         export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1524                 if(!isWasmInitialized) {
1525                         throw new Error("initializeWasm() must be awaited first!");
1526                 }
1527                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
1528                 return nativeResponseValue;
1529         }
1530         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
1531         export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1532                 if(!isWasmInitialized) {
1533                         throw new Error("initializeWasm() must be awaited first!");
1534                 }
1535                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
1536                 return nativeResponseValue;
1537         }
1538         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
1539         export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1540                 if(!isWasmInitialized) {
1541                         throw new Error("initializeWasm() must be awaited first!");
1542                 }
1543                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
1544                 return nativeResponseValue;
1545         }
1546         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
1547         export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
1548                 if(!isWasmInitialized) {
1549                         throw new Error("initializeWasm() must be awaited first!");
1550                 }
1551                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
1552                 return nativeResponseValue;
1553         }
1554
1555
1556
1557 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1558
1559                 export interface LDKSocketDescriptor {
1560                         send_data (data: Uint8Array, resume_read: boolean): number;
1561                         disconnect_socket (): void;
1562                         eq (other_arg: number): boolean;
1563                         hash (): number;
1564                 }
1565
1566                 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
1567             throw new Error('unimplemented'); // TODO: bind to WASM
1568         }
1569
1570 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1571
1572
1573         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
1574         export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
1575                 if(!isWasmInitialized) {
1576                         throw new Error("initializeWasm() must be awaited first!");
1577                 }
1578                 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
1579                 return nativeResponseValue;
1580         }
1581         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
1582         export function SocketDescriptor_disconnect_socket(this_arg: number): void {
1583                 if(!isWasmInitialized) {
1584                         throw new Error("initializeWasm() must be awaited first!");
1585                 }
1586                 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
1587                 // debug statements here
1588         }
1589         // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
1590         export function SocketDescriptor_hash(this_arg: number): number {
1591                 if(!isWasmInitialized) {
1592                         throw new Error("initializeWasm() must be awaited first!");
1593                 }
1594                 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
1595                 return nativeResponseValue;
1596         }
1597         // void Transaction_free(struct LDKTransaction _res);
1598         export function Transaction_free(_res: Uint8Array): void {
1599                 if(!isWasmInitialized) {
1600                         throw new Error("initializeWasm() must be awaited first!");
1601                 }
1602                 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
1603                 // debug statements here
1604         }
1605         // void TxOut_free(struct LDKTxOut _res);
1606         export function TxOut_free(_res: number): void {
1607                 if(!isWasmInitialized) {
1608                         throw new Error("initializeWasm() must be awaited first!");
1609                 }
1610                 const nativeResponseValue = wasm.TxOut_free(_res);
1611                 // debug statements here
1612         }
1613         // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
1614         export function TxOut_clone(orig: number): number {
1615                 if(!isWasmInitialized) {
1616                         throw new Error("initializeWasm() must be awaited first!");
1617                 }
1618                 const nativeResponseValue = wasm.TxOut_clone(orig);
1619                 return nativeResponseValue;
1620         }
1621         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
1622         export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
1623                 if(!isWasmInitialized) {
1624                         throw new Error("initializeWasm() must be awaited first!");
1625                 }
1626                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
1627                 return nativeResponseValue;
1628         }
1629         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
1630         export function CResult_SecretKeyErrorZ_err(e: LDKSecp256k1Error): number {
1631                 if(!isWasmInitialized) {
1632                         throw new Error("initializeWasm() must be awaited first!");
1633                 }
1634                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
1635                 return nativeResponseValue;
1636         }
1637         // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
1638         export function CResult_SecretKeyErrorZ_free(_res: number): void {
1639                 if(!isWasmInitialized) {
1640                         throw new Error("initializeWasm() must be awaited first!");
1641                 }
1642                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
1643                 // debug statements here
1644         }
1645         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
1646         export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
1647                 if(!isWasmInitialized) {
1648                         throw new Error("initializeWasm() must be awaited first!");
1649                 }
1650                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
1651                 return nativeResponseValue;
1652         }
1653         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
1654         export function CResult_PublicKeyErrorZ_err(e: LDKSecp256k1Error): number {
1655                 if(!isWasmInitialized) {
1656                         throw new Error("initializeWasm() must be awaited first!");
1657                 }
1658                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
1659                 return nativeResponseValue;
1660         }
1661         // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
1662         export function CResult_PublicKeyErrorZ_free(_res: number): void {
1663                 if(!isWasmInitialized) {
1664                         throw new Error("initializeWasm() must be awaited first!");
1665                 }
1666                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
1667                 // debug statements here
1668         }
1669         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
1670         export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
1671                 if(!isWasmInitialized) {
1672                         throw new Error("initializeWasm() must be awaited first!");
1673                 }
1674                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
1675                 return nativeResponseValue;
1676         }
1677         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
1678         export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
1679                 if(!isWasmInitialized) {
1680                         throw new Error("initializeWasm() must be awaited first!");
1681                 }
1682                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
1683                 return nativeResponseValue;
1684         }
1685         // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
1686         export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
1687                 if(!isWasmInitialized) {
1688                         throw new Error("initializeWasm() must be awaited first!");
1689                 }
1690                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
1691                 // debug statements here
1692         }
1693         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
1694         export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
1695                 if(!isWasmInitialized) {
1696                         throw new Error("initializeWasm() must be awaited first!");
1697                 }
1698                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
1699                 return nativeResponseValue;
1700         }
1701         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
1702         export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
1703                 if(!isWasmInitialized) {
1704                         throw new Error("initializeWasm() must be awaited first!");
1705                 }
1706                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
1707                 return nativeResponseValue;
1708         }
1709         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
1710         export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
1711                 if(!isWasmInitialized) {
1712                         throw new Error("initializeWasm() must be awaited first!");
1713                 }
1714                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
1715                 return nativeResponseValue;
1716         }
1717         // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
1718         export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
1719                 if(!isWasmInitialized) {
1720                         throw new Error("initializeWasm() must be awaited first!");
1721                 }
1722                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
1723                 // debug statements here
1724         }
1725         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
1726         export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
1727                 if(!isWasmInitialized) {
1728                         throw new Error("initializeWasm() must be awaited first!");
1729                 }
1730                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
1731                 return nativeResponseValue;
1732         }
1733         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
1734         export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
1735                 if(!isWasmInitialized) {
1736                         throw new Error("initializeWasm() must be awaited first!");
1737                 }
1738                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
1739                 return nativeResponseValue;
1740         }
1741         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
1742         export function CResult_TxCreationKeysErrorZ_err(e: LDKSecp256k1Error): number {
1743                 if(!isWasmInitialized) {
1744                         throw new Error("initializeWasm() must be awaited first!");
1745                 }
1746                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
1747                 return nativeResponseValue;
1748         }
1749         // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
1750         export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
1751                 if(!isWasmInitialized) {
1752                         throw new Error("initializeWasm() must be awaited first!");
1753                 }
1754                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
1755                 // debug statements here
1756         }
1757         // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
1758         export function COption_u32Z_some(o: number): number {
1759                 if(!isWasmInitialized) {
1760                         throw new Error("initializeWasm() must be awaited first!");
1761                 }
1762                 const nativeResponseValue = wasm.COption_u32Z_some(o);
1763                 return nativeResponseValue;
1764         }
1765         // struct LDKCOption_u32Z COption_u32Z_none(void);
1766         export function COption_u32Z_none(): number {
1767                 if(!isWasmInitialized) {
1768                         throw new Error("initializeWasm() must be awaited first!");
1769                 }
1770                 const nativeResponseValue = wasm.COption_u32Z_none();
1771                 return nativeResponseValue;
1772         }
1773         // void COption_u32Z_free(struct LDKCOption_u32Z _res);
1774         export function COption_u32Z_free(_res: number): void {
1775                 if(!isWasmInitialized) {
1776                         throw new Error("initializeWasm() must be awaited first!");
1777                 }
1778                 const nativeResponseValue = wasm.COption_u32Z_free(_res);
1779                 // debug statements here
1780         }
1781         // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
1782         export function COption_u32Z_clone(orig: number): number {
1783                 if(!isWasmInitialized) {
1784                         throw new Error("initializeWasm() must be awaited first!");
1785                 }
1786                 const nativeResponseValue = wasm.COption_u32Z_clone(orig);
1787                 return nativeResponseValue;
1788         }
1789         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
1790         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
1791                 if(!isWasmInitialized) {
1792                         throw new Error("initializeWasm() must be awaited first!");
1793                 }
1794                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
1795                 return nativeResponseValue;
1796         }
1797         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
1798         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
1799                 if(!isWasmInitialized) {
1800                         throw new Error("initializeWasm() must be awaited first!");
1801                 }
1802                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
1803                 return nativeResponseValue;
1804         }
1805         // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
1806         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
1807                 if(!isWasmInitialized) {
1808                         throw new Error("initializeWasm() must be awaited first!");
1809                 }
1810                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
1811                 // debug statements here
1812         }
1813         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
1814         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
1815                 if(!isWasmInitialized) {
1816                         throw new Error("initializeWasm() must be awaited first!");
1817                 }
1818                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
1819                 return nativeResponseValue;
1820         }
1821         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
1822         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
1823                 if(!isWasmInitialized) {
1824                         throw new Error("initializeWasm() must be awaited first!");
1825                 }
1826                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
1827                 return nativeResponseValue;
1828         }
1829         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1830         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
1831                 if(!isWasmInitialized) {
1832                         throw new Error("initializeWasm() must be awaited first!");
1833                 }
1834                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
1835                 return nativeResponseValue;
1836         }
1837         // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
1838         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
1839                 if(!isWasmInitialized) {
1840                         throw new Error("initializeWasm() must be awaited first!");
1841                 }
1842                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
1843                 // debug statements here
1844         }
1845         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1846         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
1847                 if(!isWasmInitialized) {
1848                         throw new Error("initializeWasm() must be awaited first!");
1849                 }
1850                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
1851                 return nativeResponseValue;
1852         }
1853         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
1854         export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
1855                 if(!isWasmInitialized) {
1856                         throw new Error("initializeWasm() must be awaited first!");
1857                 }
1858                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
1859                 return nativeResponseValue;
1860         }
1861         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
1862         export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
1863                 if(!isWasmInitialized) {
1864                         throw new Error("initializeWasm() must be awaited first!");
1865                 }
1866                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
1867                 return nativeResponseValue;
1868         }
1869         // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
1870         export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
1871                 if(!isWasmInitialized) {
1872                         throw new Error("initializeWasm() must be awaited first!");
1873                 }
1874                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
1875                 // debug statements here
1876         }
1877         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
1878         export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
1879                 if(!isWasmInitialized) {
1880                         throw new Error("initializeWasm() must be awaited first!");
1881                 }
1882                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
1883                 return nativeResponseValue;
1884         }
1885         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
1886         export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
1887                 if(!isWasmInitialized) {
1888                         throw new Error("initializeWasm() must be awaited first!");
1889                 }
1890                 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
1891                 // debug statements here
1892         }
1893         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
1894         export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
1895                 if(!isWasmInitialized) {
1896                         throw new Error("initializeWasm() must be awaited first!");
1897                 }
1898                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
1899                 return nativeResponseValue;
1900         }
1901         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1902         export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
1903                 if(!isWasmInitialized) {
1904                         throw new Error("initializeWasm() must be awaited first!");
1905                 }
1906                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
1907                 return nativeResponseValue;
1908         }
1909         // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
1910         export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
1911                 if(!isWasmInitialized) {
1912                         throw new Error("initializeWasm() must be awaited first!");
1913                 }
1914                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
1915                 // debug statements here
1916         }
1917         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1918         export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1919                 if(!isWasmInitialized) {
1920                         throw new Error("initializeWasm() must be awaited first!");
1921                 }
1922                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
1923                 return nativeResponseValue;
1924         }
1925         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
1926         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
1927                 if(!isWasmInitialized) {
1928                         throw new Error("initializeWasm() must be awaited first!");
1929                 }
1930                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
1931                 return nativeResponseValue;
1932         }
1933         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1934         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
1935                 if(!isWasmInitialized) {
1936                         throw new Error("initializeWasm() must be awaited first!");
1937                 }
1938                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
1939                 return nativeResponseValue;
1940         }
1941         // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
1942         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
1943                 if(!isWasmInitialized) {
1944                         throw new Error("initializeWasm() must be awaited first!");
1945                 }
1946                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
1947                 // debug statements here
1948         }
1949         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1950         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1951                 if(!isWasmInitialized) {
1952                         throw new Error("initializeWasm() must be awaited first!");
1953                 }
1954                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
1955                 return nativeResponseValue;
1956         }
1957         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
1958         export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
1959                 if(!isWasmInitialized) {
1960                         throw new Error("initializeWasm() must be awaited first!");
1961                 }
1962                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
1963                 return nativeResponseValue;
1964         }
1965         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
1966         export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
1967                 if(!isWasmInitialized) {
1968                         throw new Error("initializeWasm() must be awaited first!");
1969                 }
1970                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
1971                 return nativeResponseValue;
1972         }
1973         // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
1974         export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
1975                 if(!isWasmInitialized) {
1976                         throw new Error("initializeWasm() must be awaited first!");
1977                 }
1978                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
1979                 // debug statements here
1980         }
1981         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
1982         export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
1983                 if(!isWasmInitialized) {
1984                         throw new Error("initializeWasm() must be awaited first!");
1985                 }
1986                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
1987                 return nativeResponseValue;
1988         }
1989         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
1990         export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
1991                 if(!isWasmInitialized) {
1992                         throw new Error("initializeWasm() must be awaited first!");
1993                 }
1994                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
1995                 return nativeResponseValue;
1996         }
1997         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
1998         export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
1999                 if(!isWasmInitialized) {
2000                         throw new Error("initializeWasm() must be awaited first!");
2001                 }
2002                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
2003                 return nativeResponseValue;
2004         }
2005         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
2006         export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
2007                 if(!isWasmInitialized) {
2008                         throw new Error("initializeWasm() must be awaited first!");
2009                 }
2010                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
2011                 // debug statements here
2012         }
2013         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
2014         export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
2015                 if(!isWasmInitialized) {
2016                         throw new Error("initializeWasm() must be awaited first!");
2017                 }
2018                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
2019                 return nativeResponseValue;
2020         }
2021         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
2022         export function CResult_CVec_SignatureZNoneZ_err(): number {
2023                 if(!isWasmInitialized) {
2024                         throw new Error("initializeWasm() must be awaited first!");
2025                 }
2026                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
2027                 return nativeResponseValue;
2028         }
2029         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
2030         export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
2031                 if(!isWasmInitialized) {
2032                         throw new Error("initializeWasm() must be awaited first!");
2033                 }
2034                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
2035                 // debug statements here
2036         }
2037         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
2038         export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
2039                 if(!isWasmInitialized) {
2040                         throw new Error("initializeWasm() must be awaited first!");
2041                 }
2042                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
2043                 return nativeResponseValue;
2044         }
2045         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
2046         export function CVec_MessageSendEventZ_free(_res: number[]): void {
2047                 if(!isWasmInitialized) {
2048                         throw new Error("initializeWasm() must be awaited first!");
2049                 }
2050                 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
2051                 // debug statements here
2052         }
2053         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
2054         export function CResult_boolLightningErrorZ_ok(o: boolean): number {
2055                 if(!isWasmInitialized) {
2056                         throw new Error("initializeWasm() must be awaited first!");
2057                 }
2058                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
2059                 return nativeResponseValue;
2060         }
2061         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
2062         export function CResult_boolLightningErrorZ_err(e: number): number {
2063                 if(!isWasmInitialized) {
2064                         throw new Error("initializeWasm() must be awaited first!");
2065                 }
2066                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
2067                 return nativeResponseValue;
2068         }
2069         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
2070         export function CResult_boolLightningErrorZ_free(_res: number): void {
2071                 if(!isWasmInitialized) {
2072                         throw new Error("initializeWasm() must be awaited first!");
2073                 }
2074                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
2075                 // debug statements here
2076         }
2077         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
2078         export function CResult_boolLightningErrorZ_clone(orig: number): number {
2079                 if(!isWasmInitialized) {
2080                         throw new Error("initializeWasm() must be awaited first!");
2081                 }
2082                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
2083                 return nativeResponseValue;
2084         }
2085         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
2086         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
2087                 if(!isWasmInitialized) {
2088                         throw new Error("initializeWasm() must be awaited first!");
2089                 }
2090                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
2091                 return nativeResponseValue;
2092         }
2093         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
2094         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
2095                 if(!isWasmInitialized) {
2096                         throw new Error("initializeWasm() must be awaited first!");
2097                 }
2098                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
2099                 return nativeResponseValue;
2100         }
2101         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
2102         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
2103                 if(!isWasmInitialized) {
2104                         throw new Error("initializeWasm() must be awaited first!");
2105                 }
2106                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
2107                 // debug statements here
2108         }
2109         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
2110         export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
2111                 if(!isWasmInitialized) {
2112                         throw new Error("initializeWasm() must be awaited first!");
2113                 }
2114                 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
2115                 // debug statements here
2116         }
2117         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
2118         export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
2119                 if(!isWasmInitialized) {
2120                         throw new Error("initializeWasm() must be awaited first!");
2121                 }
2122                 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
2123                 // debug statements here
2124         }
2125         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
2126         export function CResult_NoneLightningErrorZ_ok(): number {
2127                 if(!isWasmInitialized) {
2128                         throw new Error("initializeWasm() must be awaited first!");
2129                 }
2130                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
2131                 return nativeResponseValue;
2132         }
2133         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
2134         export function CResult_NoneLightningErrorZ_err(e: number): number {
2135                 if(!isWasmInitialized) {
2136                         throw new Error("initializeWasm() must be awaited first!");
2137                 }
2138                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
2139                 return nativeResponseValue;
2140         }
2141         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
2142         export function CResult_NoneLightningErrorZ_free(_res: number): void {
2143                 if(!isWasmInitialized) {
2144                         throw new Error("initializeWasm() must be awaited first!");
2145                 }
2146                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
2147                 // debug statements here
2148         }
2149         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
2150         export function CResult_NoneLightningErrorZ_clone(orig: number): number {
2151                 if(!isWasmInitialized) {
2152                         throw new Error("initializeWasm() must be awaited first!");
2153                 }
2154                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
2155                 return nativeResponseValue;
2156         }
2157         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
2158         export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
2159                 if(!isWasmInitialized) {
2160                         throw new Error("initializeWasm() must be awaited first!");
2161                 }
2162                 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
2163                 // debug statements here
2164         }
2165         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
2166         export function CVec_u8Z_free(_res: Uint8Array): void {
2167                 if(!isWasmInitialized) {
2168                         throw new Error("initializeWasm() must be awaited first!");
2169                 }
2170                 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
2171                 // debug statements here
2172         }
2173         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
2174         export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
2175                 if(!isWasmInitialized) {
2176                         throw new Error("initializeWasm() must be awaited first!");
2177                 }
2178                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
2179                 return nativeResponseValue;
2180         }
2181         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2182         export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
2183                 if(!isWasmInitialized) {
2184                         throw new Error("initializeWasm() must be awaited first!");
2185                 }
2186                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
2187                 return nativeResponseValue;
2188         }
2189         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
2190         export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
2191                 if(!isWasmInitialized) {
2192                         throw new Error("initializeWasm() must be awaited first!");
2193                 }
2194                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
2195                 // debug statements here
2196         }
2197         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
2198         export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
2199                 if(!isWasmInitialized) {
2200                         throw new Error("initializeWasm() must be awaited first!");
2201                 }
2202                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
2203                 return nativeResponseValue;
2204         }
2205         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
2206         export function CResult_NonePeerHandleErrorZ_ok(): number {
2207                 if(!isWasmInitialized) {
2208                         throw new Error("initializeWasm() must be awaited first!");
2209                 }
2210                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
2211                 return nativeResponseValue;
2212         }
2213         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
2214         export function CResult_NonePeerHandleErrorZ_err(e: number): number {
2215                 if(!isWasmInitialized) {
2216                         throw new Error("initializeWasm() must be awaited first!");
2217                 }
2218                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
2219                 return nativeResponseValue;
2220         }
2221         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
2222         export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
2223                 if(!isWasmInitialized) {
2224                         throw new Error("initializeWasm() must be awaited first!");
2225                 }
2226                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
2227                 // debug statements here
2228         }
2229         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
2230         export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
2231                 if(!isWasmInitialized) {
2232                         throw new Error("initializeWasm() must be awaited first!");
2233                 }
2234                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
2235                 return nativeResponseValue;
2236         }
2237         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
2238         export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
2239                 if(!isWasmInitialized) {
2240                         throw new Error("initializeWasm() must be awaited first!");
2241                 }
2242                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
2243                 return nativeResponseValue;
2244         }
2245         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
2246         export function CResult_boolPeerHandleErrorZ_err(e: number): number {
2247                 if(!isWasmInitialized) {
2248                         throw new Error("initializeWasm() must be awaited first!");
2249                 }
2250                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
2251                 return nativeResponseValue;
2252         }
2253         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
2254         export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
2255                 if(!isWasmInitialized) {
2256                         throw new Error("initializeWasm() must be awaited first!");
2257                 }
2258                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
2259                 // debug statements here
2260         }
2261         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
2262         export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
2263                 if(!isWasmInitialized) {
2264                         throw new Error("initializeWasm() must be awaited first!");
2265                 }
2266                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
2267                 return nativeResponseValue;
2268         }
2269         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
2270         export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
2271                 if(!isWasmInitialized) {
2272                         throw new Error("initializeWasm() must be awaited first!");
2273                 }
2274                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
2275                 return nativeResponseValue;
2276         }
2277         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2278         export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
2279                 if(!isWasmInitialized) {
2280                         throw new Error("initializeWasm() must be awaited first!");
2281                 }
2282                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
2283                 return nativeResponseValue;
2284         }
2285         // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
2286         export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
2287                 if(!isWasmInitialized) {
2288                         throw new Error("initializeWasm() must be awaited first!");
2289                 }
2290                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
2291                 // debug statements here
2292         }
2293         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
2294         export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
2295                 if(!isWasmInitialized) {
2296                         throw new Error("initializeWasm() must be awaited first!");
2297                 }
2298                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
2299                 return nativeResponseValue;
2300         }
2301         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2302         export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
2303                 if(!isWasmInitialized) {
2304                         throw new Error("initializeWasm() must be awaited first!");
2305                 }
2306                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
2307                 return nativeResponseValue;
2308         }
2309         // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
2310         export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
2311                 if(!isWasmInitialized) {
2312                         throw new Error("initializeWasm() must be awaited first!");
2313                 }
2314                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
2315                 // debug statements here
2316         }
2317         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
2318         export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
2319                 if(!isWasmInitialized) {
2320                         throw new Error("initializeWasm() must be awaited first!");
2321                 }
2322                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
2323                 return nativeResponseValue;
2324         }
2325         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2326         export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
2327                 if(!isWasmInitialized) {
2328                         throw new Error("initializeWasm() must be awaited first!");
2329                 }
2330                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
2331                 return nativeResponseValue;
2332         }
2333         // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
2334         export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
2335                 if(!isWasmInitialized) {
2336                         throw new Error("initializeWasm() must be awaited first!");
2337                 }
2338                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
2339                 // debug statements here
2340         }
2341         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
2342         export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
2343                 if(!isWasmInitialized) {
2344                         throw new Error("initializeWasm() must be awaited first!");
2345                 }
2346                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
2347                 return nativeResponseValue;
2348         }
2349         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
2350         export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
2351                 if(!isWasmInitialized) {
2352                         throw new Error("initializeWasm() must be awaited first!");
2353                 }
2354                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
2355                 return nativeResponseValue;
2356         }
2357         // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
2358         export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
2359                 if(!isWasmInitialized) {
2360                         throw new Error("initializeWasm() must be awaited first!");
2361                 }
2362                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
2363                 // debug statements here
2364         }
2365         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
2366         export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
2367                 if(!isWasmInitialized) {
2368                         throw new Error("initializeWasm() must be awaited first!");
2369                 }
2370                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
2371                 return nativeResponseValue;
2372         }
2373         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
2374         export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
2375                 if(!isWasmInitialized) {
2376                         throw new Error("initializeWasm() must be awaited first!");
2377                 }
2378                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
2379                 return nativeResponseValue;
2380         }
2381         // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
2382         export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
2383                 if(!isWasmInitialized) {
2384                         throw new Error("initializeWasm() must be awaited first!");
2385                 }
2386                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
2387                 // debug statements here
2388         }
2389         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
2390         export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
2391                 if(!isWasmInitialized) {
2392                         throw new Error("initializeWasm() must be awaited first!");
2393                 }
2394                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
2395                 return nativeResponseValue;
2396         }
2397         // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
2398         export function COption_u64Z_some(o: number): number {
2399                 if(!isWasmInitialized) {
2400                         throw new Error("initializeWasm() must be awaited first!");
2401                 }
2402                 const nativeResponseValue = wasm.COption_u64Z_some(o);
2403                 return nativeResponseValue;
2404         }
2405         // struct LDKCOption_u64Z COption_u64Z_none(void);
2406         export function COption_u64Z_none(): number {
2407                 if(!isWasmInitialized) {
2408                         throw new Error("initializeWasm() must be awaited first!");
2409                 }
2410                 const nativeResponseValue = wasm.COption_u64Z_none();
2411                 return nativeResponseValue;
2412         }
2413         // void COption_u64Z_free(struct LDKCOption_u64Z _res);
2414         export function COption_u64Z_free(_res: number): void {
2415                 if(!isWasmInitialized) {
2416                         throw new Error("initializeWasm() must be awaited first!");
2417                 }
2418                 const nativeResponseValue = wasm.COption_u64Z_free(_res);
2419                 // debug statements here
2420         }
2421         // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
2422         export function COption_u64Z_clone(orig: number): number {
2423                 if(!isWasmInitialized) {
2424                         throw new Error("initializeWasm() must be awaited first!");
2425                 }
2426                 const nativeResponseValue = wasm.COption_u64Z_clone(orig);
2427                 return nativeResponseValue;
2428         }
2429         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
2430         export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
2431                 if(!isWasmInitialized) {
2432                         throw new Error("initializeWasm() must be awaited first!");
2433                 }
2434                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
2435                 return nativeResponseValue;
2436         }
2437         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2438         export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
2439                 if(!isWasmInitialized) {
2440                         throw new Error("initializeWasm() must be awaited first!");
2441                 }
2442                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
2443                 return nativeResponseValue;
2444         }
2445         // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
2446         export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
2447                 if(!isWasmInitialized) {
2448                         throw new Error("initializeWasm() must be awaited first!");
2449                 }
2450                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
2451                 // debug statements here
2452         }
2453         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2454         export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
2455                 if(!isWasmInitialized) {
2456                         throw new Error("initializeWasm() must be awaited first!");
2457                 }
2458                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
2459                 return nativeResponseValue;
2460         }
2461         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
2462         export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
2463                 if(!isWasmInitialized) {
2464                         throw new Error("initializeWasm() must be awaited first!");
2465                 }
2466                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
2467                 return nativeResponseValue;
2468         }
2469         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
2470         export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
2471                 if(!isWasmInitialized) {
2472                         throw new Error("initializeWasm() must be awaited first!");
2473                 }
2474                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
2475                 return nativeResponseValue;
2476         }
2477         // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
2478         export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
2479                 if(!isWasmInitialized) {
2480                         throw new Error("initializeWasm() must be awaited first!");
2481                 }
2482                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
2483                 // debug statements here
2484         }
2485         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
2486         export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
2487                 if(!isWasmInitialized) {
2488                         throw new Error("initializeWasm() must be awaited first!");
2489                 }
2490                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
2491                 return nativeResponseValue;
2492         }
2493         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
2494         export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
2495                 if(!isWasmInitialized) {
2496                         throw new Error("initializeWasm() must be awaited first!");
2497                 }
2498                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
2499                 return nativeResponseValue;
2500         }
2501         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
2502         export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
2503                 if(!isWasmInitialized) {
2504                         throw new Error("initializeWasm() must be awaited first!");
2505                 }
2506                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
2507                 return nativeResponseValue;
2508         }
2509         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
2510         export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
2511                 if(!isWasmInitialized) {
2512                         throw new Error("initializeWasm() must be awaited first!");
2513                 }
2514                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
2515                 // debug statements here
2516         }
2517         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
2518         export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
2519                 if(!isWasmInitialized) {
2520                         throw new Error("initializeWasm() must be awaited first!");
2521                 }
2522                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
2523                 return nativeResponseValue;
2524         }
2525         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
2526         export function CVec_NetAddressZ_free(_res: number[]): void {
2527                 if(!isWasmInitialized) {
2528                         throw new Error("initializeWasm() must be awaited first!");
2529                 }
2530                 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
2531                 // debug statements here
2532         }
2533         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
2534         export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
2535                 if(!isWasmInitialized) {
2536                         throw new Error("initializeWasm() must be awaited first!");
2537                 }
2538                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
2539                 return nativeResponseValue;
2540         }
2541         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
2542         export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
2543                 if(!isWasmInitialized) {
2544                         throw new Error("initializeWasm() must be awaited first!");
2545                 }
2546                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
2547                 return nativeResponseValue;
2548         }
2549         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
2550         export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
2551                 if(!isWasmInitialized) {
2552                         throw new Error("initializeWasm() must be awaited first!");
2553                 }
2554                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
2555                 // debug statements here
2556         }
2557         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
2558         export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
2559                 if(!isWasmInitialized) {
2560                         throw new Error("initializeWasm() must be awaited first!");
2561                 }
2562                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
2563                 return nativeResponseValue;
2564         }
2565         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
2566         export function CVec_u64Z_free(_res: number[]): void {
2567                 if(!isWasmInitialized) {
2568                         throw new Error("initializeWasm() must be awaited first!");
2569                 }
2570                 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
2571                 // debug statements here
2572         }
2573         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
2574         export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
2575                 if(!isWasmInitialized) {
2576                         throw new Error("initializeWasm() must be awaited first!");
2577                 }
2578                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
2579                 return nativeResponseValue;
2580         }
2581         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
2582         export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
2583                 if(!isWasmInitialized) {
2584                         throw new Error("initializeWasm() must be awaited first!");
2585                 }
2586                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
2587                 return nativeResponseValue;
2588         }
2589         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
2590         export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
2591                 if(!isWasmInitialized) {
2592                         throw new Error("initializeWasm() must be awaited first!");
2593                 }
2594                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
2595                 // debug statements here
2596         }
2597         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
2598         export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
2599                 if(!isWasmInitialized) {
2600                         throw new Error("initializeWasm() must be awaited first!");
2601                 }
2602                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
2603                 return nativeResponseValue;
2604         }
2605         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
2606         export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
2607                 if(!isWasmInitialized) {
2608                         throw new Error("initializeWasm() must be awaited first!");
2609                 }
2610                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
2611                 return nativeResponseValue;
2612         }
2613         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
2614         export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
2615                 if(!isWasmInitialized) {
2616                         throw new Error("initializeWasm() must be awaited first!");
2617                 }
2618                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
2619                 return nativeResponseValue;
2620         }
2621         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
2622         export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
2623                 if(!isWasmInitialized) {
2624                         throw new Error("initializeWasm() must be awaited first!");
2625                 }
2626                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
2627                 // debug statements here
2628         }
2629         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
2630         export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
2631                 if(!isWasmInitialized) {
2632                         throw new Error("initializeWasm() must be awaited first!");
2633                 }
2634                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
2635                 return nativeResponseValue;
2636         }
2637         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
2638         export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
2639                 if(!isWasmInitialized) {
2640                         throw new Error("initializeWasm() must be awaited first!");
2641                 }
2642                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
2643                 return nativeResponseValue;
2644         }
2645         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
2646         export function C2Tuple_usizeTransactionZ_free(_res: number): void {
2647                 if(!isWasmInitialized) {
2648                         throw new Error("initializeWasm() must be awaited first!");
2649                 }
2650                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
2651                 // debug statements here
2652         }
2653         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
2654         export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
2655                 if(!isWasmInitialized) {
2656                         throw new Error("initializeWasm() must be awaited first!");
2657                 }
2658                 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
2659                 // debug statements here
2660         }
2661         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
2662         export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
2663                 if(!isWasmInitialized) {
2664                         throw new Error("initializeWasm() must be awaited first!");
2665                 }
2666                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
2667                 return nativeResponseValue;
2668         }
2669         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
2670         export function CResult_NoneChannelMonitorUpdateErrZ_err(e: LDKChannelMonitorUpdateErr): number {
2671                 if(!isWasmInitialized) {
2672                         throw new Error("initializeWasm() must be awaited first!");
2673                 }
2674                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
2675                 return nativeResponseValue;
2676         }
2677         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
2678         export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
2679                 if(!isWasmInitialized) {
2680                         throw new Error("initializeWasm() must be awaited first!");
2681                 }
2682                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
2683                 // debug statements here
2684         }
2685         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
2686         export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
2687                 if(!isWasmInitialized) {
2688                         throw new Error("initializeWasm() must be awaited first!");
2689                 }
2690                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
2691                 return nativeResponseValue;
2692         }
2693         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
2694         export function CVec_MonitorEventZ_free(_res: number[]): void {
2695                 if(!isWasmInitialized) {
2696                         throw new Error("initializeWasm() must be awaited first!");
2697                 }
2698                 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
2699                 // debug statements here
2700         }
2701         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
2702         export function CVec_EventZ_free(_res: number[]): void {
2703                 if(!isWasmInitialized) {
2704                         throw new Error("initializeWasm() must be awaited first!");
2705                 }
2706                 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
2707                 // debug statements here
2708         }
2709         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
2710         export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
2711                 if(!isWasmInitialized) {
2712                         throw new Error("initializeWasm() must be awaited first!");
2713                 }
2714                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
2715                 return nativeResponseValue;
2716         }
2717         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
2718         export function CResult_OutPointDecodeErrorZ_err(e: number): number {
2719                 if(!isWasmInitialized) {
2720                         throw new Error("initializeWasm() must be awaited first!");
2721                 }
2722                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
2723                 return nativeResponseValue;
2724         }
2725         // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
2726         export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
2727                 if(!isWasmInitialized) {
2728                         throw new Error("initializeWasm() must be awaited first!");
2729                 }
2730                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
2731                 // debug statements here
2732         }
2733         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
2734         export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
2735                 if(!isWasmInitialized) {
2736                         throw new Error("initializeWasm() must be awaited first!");
2737                 }
2738                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
2739                 return nativeResponseValue;
2740         }
2741         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
2742         export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
2743                 if(!isWasmInitialized) {
2744                         throw new Error("initializeWasm() must be awaited first!");
2745                 }
2746                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
2747                 return nativeResponseValue;
2748         }
2749         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2750         export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
2751                 if(!isWasmInitialized) {
2752                         throw new Error("initializeWasm() must be awaited first!");
2753                 }
2754                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
2755                 return nativeResponseValue;
2756         }
2757         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
2758         export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
2759                 if(!isWasmInitialized) {
2760                         throw new Error("initializeWasm() must be awaited first!");
2761                 }
2762                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
2763                 // debug statements here
2764         }
2765         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
2766         export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
2767                 if(!isWasmInitialized) {
2768                         throw new Error("initializeWasm() must be awaited first!");
2769                 }
2770                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
2771                 return nativeResponseValue;
2772         }
2773         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
2774         export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
2775                 if(!isWasmInitialized) {
2776                         throw new Error("initializeWasm() must be awaited first!");
2777                 }
2778                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
2779                 return nativeResponseValue;
2780         }
2781         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
2782         export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
2783                 if(!isWasmInitialized) {
2784                         throw new Error("initializeWasm() must be awaited first!");
2785                 }
2786                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
2787                 return nativeResponseValue;
2788         }
2789         // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
2790         export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
2791                 if(!isWasmInitialized) {
2792                         throw new Error("initializeWasm() must be awaited first!");
2793                 }
2794                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
2795                 // debug statements here
2796         }
2797         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
2798         export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
2799                 if(!isWasmInitialized) {
2800                         throw new Error("initializeWasm() must be awaited first!");
2801                 }
2802                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
2803                 return nativeResponseValue;
2804         }
2805         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
2806         export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
2807                 if(!isWasmInitialized) {
2808                         throw new Error("initializeWasm() must be awaited first!");
2809                 }
2810                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
2811                 return nativeResponseValue;
2812         }
2813         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
2814         export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
2815                 if(!isWasmInitialized) {
2816                         throw new Error("initializeWasm() must be awaited first!");
2817                 }
2818                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
2819                 return nativeResponseValue;
2820         }
2821         // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
2822         export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
2823                 if(!isWasmInitialized) {
2824                         throw new Error("initializeWasm() must be awaited first!");
2825                 }
2826                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
2827                 // debug statements here
2828         }
2829         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
2830         export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
2831                 if(!isWasmInitialized) {
2832                         throw new Error("initializeWasm() must be awaited first!");
2833                 }
2834                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
2835                 return nativeResponseValue;
2836         }
2837         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
2838         export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
2839                 if(!isWasmInitialized) {
2840                         throw new Error("initializeWasm() must be awaited first!");
2841                 }
2842                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
2843                 return nativeResponseValue;
2844         }
2845         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
2846         export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
2847                 if(!isWasmInitialized) {
2848                         throw new Error("initializeWasm() must be awaited first!");
2849                 }
2850                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
2851                 return nativeResponseValue;
2852         }
2853         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
2854         export function C2Tuple_OutPointScriptZ_free(_res: number): void {
2855                 if(!isWasmInitialized) {
2856                         throw new Error("initializeWasm() must be awaited first!");
2857                 }
2858                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
2859                 // debug statements here
2860         }
2861         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
2862         export function C2Tuple_u32ScriptZ_clone(orig: number): number {
2863                 if(!isWasmInitialized) {
2864                         throw new Error("initializeWasm() must be awaited first!");
2865                 }
2866                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone(orig);
2867                 return nativeResponseValue;
2868         }
2869         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
2870         export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
2871                 if(!isWasmInitialized) {
2872                         throw new Error("initializeWasm() must be awaited first!");
2873                 }
2874                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
2875                 return nativeResponseValue;
2876         }
2877         // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
2878         export function C2Tuple_u32ScriptZ_free(_res: number): void {
2879                 if(!isWasmInitialized) {
2880                         throw new Error("initializeWasm() must be awaited first!");
2881                 }
2882                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
2883                 // debug statements here
2884         }
2885         // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
2886         export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
2887                 if(!isWasmInitialized) {
2888                         throw new Error("initializeWasm() must be awaited first!");
2889                 }
2890                 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
2891                 // debug statements here
2892         }
2893         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
2894         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
2895                 if(!isWasmInitialized) {
2896                         throw new Error("initializeWasm() must be awaited first!");
2897                 }
2898                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
2899                 return nativeResponseValue;
2900         }
2901         // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
2902         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
2903                 if(!isWasmInitialized) {
2904                         throw new Error("initializeWasm() must be awaited first!");
2905                 }
2906                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
2907                 // debug statements here
2908         }
2909         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
2910         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
2911                 if(!isWasmInitialized) {
2912                         throw new Error("initializeWasm() must be awaited first!");
2913                 }
2914                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
2915                 // debug statements here
2916         }
2917         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
2918         export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
2919                 if(!isWasmInitialized) {
2920                         throw new Error("initializeWasm() must be awaited first!");
2921                 }
2922                 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
2923                 // debug statements here
2924         }
2925         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
2926         export function C2Tuple_u32TxOutZ_clone(orig: number): number {
2927                 if(!isWasmInitialized) {
2928                         throw new Error("initializeWasm() must be awaited first!");
2929                 }
2930                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
2931                 return nativeResponseValue;
2932         }
2933         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
2934         export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
2935                 if(!isWasmInitialized) {
2936                         throw new Error("initializeWasm() must be awaited first!");
2937                 }
2938                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
2939                 return nativeResponseValue;
2940         }
2941         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
2942         export function C2Tuple_u32TxOutZ_free(_res: number): void {
2943                 if(!isWasmInitialized) {
2944                         throw new Error("initializeWasm() must be awaited first!");
2945                 }
2946                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
2947                 // debug statements here
2948         }
2949         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
2950         export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
2951                 if(!isWasmInitialized) {
2952                         throw new Error("initializeWasm() must be awaited first!");
2953                 }
2954                 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
2955                 // debug statements here
2956         }
2957         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
2958         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
2959                 if(!isWasmInitialized) {
2960                         throw new Error("initializeWasm() must be awaited first!");
2961                 }
2962                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
2963                 return nativeResponseValue;
2964         }
2965         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
2966         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
2967                 if(!isWasmInitialized) {
2968                         throw new Error("initializeWasm() must be awaited first!");
2969                 }
2970                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
2971                 // debug statements here
2972         }
2973         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
2974         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
2975                 if(!isWasmInitialized) {
2976                         throw new Error("initializeWasm() must be awaited first!");
2977                 }
2978                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
2979                 // debug statements here
2980         }
2981         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
2982         export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
2983                 if(!isWasmInitialized) {
2984                         throw new Error("initializeWasm() must be awaited first!");
2985                 }
2986                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
2987                 return nativeResponseValue;
2988         }
2989         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
2990         export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
2991                 if(!isWasmInitialized) {
2992                         throw new Error("initializeWasm() must be awaited first!");
2993                 }
2994                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
2995                 // debug statements here
2996         }
2997         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
2998         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
2999                 if(!isWasmInitialized) {
3000                         throw new Error("initializeWasm() must be awaited first!");
3001                 }
3002                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
3003                 return nativeResponseValue;
3004         }
3005         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
3006         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
3007                 if(!isWasmInitialized) {
3008                         throw new Error("initializeWasm() must be awaited first!");
3009                 }
3010                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
3011                 return nativeResponseValue;
3012         }
3013         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
3014         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
3015                 if(!isWasmInitialized) {
3016                         throw new Error("initializeWasm() must be awaited first!");
3017                 }
3018                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
3019                 // debug statements here
3020         }
3021         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
3022         export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
3023                 if(!isWasmInitialized) {
3024                         throw new Error("initializeWasm() must be awaited first!");
3025                 }
3026                 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
3027                 // debug statements here
3028         }
3029         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
3030         export function CResult_TxOutAccessErrorZ_ok(o: number): number {
3031                 if(!isWasmInitialized) {
3032                         throw new Error("initializeWasm() must be awaited first!");
3033                 }
3034                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
3035                 return nativeResponseValue;
3036         }
3037         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
3038         export function CResult_TxOutAccessErrorZ_err(e: LDKAccessError): number {
3039                 if(!isWasmInitialized) {
3040                         throw new Error("initializeWasm() must be awaited first!");
3041                 }
3042                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
3043                 return nativeResponseValue;
3044         }
3045         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
3046         export function CResult_TxOutAccessErrorZ_free(_res: number): void {
3047                 if(!isWasmInitialized) {
3048                         throw new Error("initializeWasm() must be awaited first!");
3049                 }
3050                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
3051                 // debug statements here
3052         }
3053         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
3054         export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
3055                 if(!isWasmInitialized) {
3056                         throw new Error("initializeWasm() must be awaited first!");
3057                 }
3058                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
3059                 return nativeResponseValue;
3060         }
3061         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
3062         export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
3063                 if(!isWasmInitialized) {
3064                         throw new Error("initializeWasm() must be awaited first!");
3065                 }
3066                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
3067                 return nativeResponseValue;
3068         }
3069         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
3070         export function COption_C2Tuple_usizeTransactionZZ_none(): number {
3071                 if(!isWasmInitialized) {
3072                         throw new Error("initializeWasm() must be awaited first!");
3073                 }
3074                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
3075                 return nativeResponseValue;
3076         }
3077         // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
3078         export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
3079                 if(!isWasmInitialized) {
3080                         throw new Error("initializeWasm() must be awaited first!");
3081                 }
3082                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
3083                 // debug statements here
3084         }
3085         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
3086         export function CResult_NoneAPIErrorZ_ok(): number {
3087                 if(!isWasmInitialized) {
3088                         throw new Error("initializeWasm() must be awaited first!");
3089                 }
3090                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
3091                 return nativeResponseValue;
3092         }
3093         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
3094         export function CResult_NoneAPIErrorZ_err(e: number): number {
3095                 if(!isWasmInitialized) {
3096                         throw new Error("initializeWasm() must be awaited first!");
3097                 }
3098                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
3099                 return nativeResponseValue;
3100         }
3101         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
3102         export function CResult_NoneAPIErrorZ_free(_res: number): void {
3103                 if(!isWasmInitialized) {
3104                         throw new Error("initializeWasm() must be awaited first!");
3105                 }
3106                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
3107                 // debug statements here
3108         }
3109         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
3110         export function CResult_NoneAPIErrorZ_clone(orig: number): number {
3111                 if(!isWasmInitialized) {
3112                         throw new Error("initializeWasm() must be awaited first!");
3113                 }
3114                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
3115                 return nativeResponseValue;
3116         }
3117         // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
3118         export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
3119                 if(!isWasmInitialized) {
3120                         throw new Error("initializeWasm() must be awaited first!");
3121                 }
3122                 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
3123                 // debug statements here
3124         }
3125         // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
3126         export function CVec_APIErrorZ_free(_res: number[]): void {
3127                 if(!isWasmInitialized) {
3128                         throw new Error("initializeWasm() must be awaited first!");
3129                 }
3130                 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
3131                 // debug statements here
3132         }
3133         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
3134         export function CVec_ChannelDetailsZ_free(_res: number[]): void {
3135                 if(!isWasmInitialized) {
3136                         throw new Error("initializeWasm() must be awaited first!");
3137                 }
3138                 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
3139                 // debug statements here
3140         }
3141         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
3142         export function CResult_NonePaymentSendFailureZ_ok(): number {
3143                 if(!isWasmInitialized) {
3144                         throw new Error("initializeWasm() must be awaited first!");
3145                 }
3146                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
3147                 return nativeResponseValue;
3148         }
3149         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
3150         export function CResult_NonePaymentSendFailureZ_err(e: number): number {
3151                 if(!isWasmInitialized) {
3152                         throw new Error("initializeWasm() must be awaited first!");
3153                 }
3154                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
3155                 return nativeResponseValue;
3156         }
3157         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
3158         export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
3159                 if(!isWasmInitialized) {
3160                         throw new Error("initializeWasm() must be awaited first!");
3161                 }
3162                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
3163                 // debug statements here
3164         }
3165         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
3166         export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
3167                 if(!isWasmInitialized) {
3168                         throw new Error("initializeWasm() must be awaited first!");
3169                 }
3170                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
3171                 return nativeResponseValue;
3172         }
3173         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
3174         export function CVec_ChannelMonitorZ_free(_res: number[]): void {
3175                 if(!isWasmInitialized) {
3176                         throw new Error("initializeWasm() must be awaited first!");
3177                 }
3178                 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
3179                 // debug statements here
3180         }
3181         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
3182         export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
3183                 if(!isWasmInitialized) {
3184                         throw new Error("initializeWasm() must be awaited first!");
3185                 }
3186                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
3187                 return nativeResponseValue;
3188         }
3189         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
3190         export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
3191                 if(!isWasmInitialized) {
3192                         throw new Error("initializeWasm() must be awaited first!");
3193                 }
3194                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
3195                 // debug statements here
3196         }
3197         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
3198         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
3199                 if(!isWasmInitialized) {
3200                         throw new Error("initializeWasm() must be awaited first!");
3201                 }
3202                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
3203                 return nativeResponseValue;
3204         }
3205         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
3206         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
3207                 if(!isWasmInitialized) {
3208                         throw new Error("initializeWasm() must be awaited first!");
3209                 }
3210                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
3211                 return nativeResponseValue;
3212         }
3213         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
3214         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
3215                 if(!isWasmInitialized) {
3216                         throw new Error("initializeWasm() must be awaited first!");
3217                 }
3218                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
3219                 // debug statements here
3220         }
3221         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
3222         export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
3223                 if(!isWasmInitialized) {
3224                         throw new Error("initializeWasm() must be awaited first!");
3225                 }
3226                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
3227                 return nativeResponseValue;
3228         }
3229         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3230         export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
3231                 if(!isWasmInitialized) {
3232                         throw new Error("initializeWasm() must be awaited first!");
3233                 }
3234                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
3235                 return nativeResponseValue;
3236         }
3237         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
3238         export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
3239                 if(!isWasmInitialized) {
3240                         throw new Error("initializeWasm() must be awaited first!");
3241                 }
3242                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
3243                 // debug statements here
3244         }
3245         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3246         export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3247                 if(!isWasmInitialized) {
3248                         throw new Error("initializeWasm() must be awaited first!");
3249                 }
3250                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
3251                 return nativeResponseValue;
3252         }
3253         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
3254         export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
3255                 if(!isWasmInitialized) {
3256                         throw new Error("initializeWasm() must be awaited first!");
3257                 }
3258                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
3259                 return nativeResponseValue;
3260         }
3261         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
3262         export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
3263                 if(!isWasmInitialized) {
3264                         throw new Error("initializeWasm() must be awaited first!");
3265                 }
3266                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
3267                 return nativeResponseValue;
3268         }
3269         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
3270         export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
3271                 if(!isWasmInitialized) {
3272                         throw new Error("initializeWasm() must be awaited first!");
3273                 }
3274                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
3275                 // debug statements here
3276         }
3277         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
3278         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
3279                 if(!isWasmInitialized) {
3280                         throw new Error("initializeWasm() must be awaited first!");
3281                 }
3282                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
3283                 return nativeResponseValue;
3284         }
3285         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
3286         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
3287                 if(!isWasmInitialized) {
3288                         throw new Error("initializeWasm() must be awaited first!");
3289                 }
3290                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
3291                 return nativeResponseValue;
3292         }
3293         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
3294         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
3295                 if(!isWasmInitialized) {
3296                         throw new Error("initializeWasm() must be awaited first!");
3297                 }
3298                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
3299                 // debug statements here
3300         }
3301         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
3302         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
3303                 if(!isWasmInitialized) {
3304                         throw new Error("initializeWasm() must be awaited first!");
3305                 }
3306                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
3307                 return nativeResponseValue;
3308         }
3309         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
3310         export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
3311                 if(!isWasmInitialized) {
3312                         throw new Error("initializeWasm() must be awaited first!");
3313                 }
3314                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
3315                 return nativeResponseValue;
3316         }
3317         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
3318         export function CResult_SignatureNoneZ_err(): number {
3319                 if(!isWasmInitialized) {
3320                         throw new Error("initializeWasm() must be awaited first!");
3321                 }
3322                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
3323                 return nativeResponseValue;
3324         }
3325         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
3326         export function CResult_SignatureNoneZ_free(_res: number): void {
3327                 if(!isWasmInitialized) {
3328                         throw new Error("initializeWasm() must be awaited first!");
3329                 }
3330                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
3331                 // debug statements here
3332         }
3333         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
3334         export function CResult_SignatureNoneZ_clone(orig: number): number {
3335                 if(!isWasmInitialized) {
3336                         throw new Error("initializeWasm() must be awaited first!");
3337                 }
3338                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
3339                 return nativeResponseValue;
3340         }
3341         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
3342         export function CResult_SignDecodeErrorZ_ok(o: number): number {
3343                 if(!isWasmInitialized) {
3344                         throw new Error("initializeWasm() must be awaited first!");
3345                 }
3346                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
3347                 return nativeResponseValue;
3348         }
3349         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
3350         export function CResult_SignDecodeErrorZ_err(e: number): number {
3351                 if(!isWasmInitialized) {
3352                         throw new Error("initializeWasm() must be awaited first!");
3353                 }
3354                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
3355                 return nativeResponseValue;
3356         }
3357         // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
3358         export function CResult_SignDecodeErrorZ_free(_res: number): void {
3359                 if(!isWasmInitialized) {
3360                         throw new Error("initializeWasm() must be awaited first!");
3361                 }
3362                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
3363                 // debug statements here
3364         }
3365         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
3366         export function CResult_SignDecodeErrorZ_clone(orig: number): number {
3367                 if(!isWasmInitialized) {
3368                         throw new Error("initializeWasm() must be awaited first!");
3369                 }
3370                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
3371                 return nativeResponseValue;
3372         }
3373         // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
3374         export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
3375                 if(!isWasmInitialized) {
3376                         throw new Error("initializeWasm() must be awaited first!");
3377                 }
3378                 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
3379                 // debug statements here
3380         }
3381         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
3382         export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
3383                 if(!isWasmInitialized) {
3384                         throw new Error("initializeWasm() must be awaited first!");
3385                 }
3386                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
3387                 return nativeResponseValue;
3388         }
3389         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
3390         export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
3391                 if(!isWasmInitialized) {
3392                         throw new Error("initializeWasm() must be awaited first!");
3393                 }
3394                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
3395                 return nativeResponseValue;
3396         }
3397         // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
3398         export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
3399                 if(!isWasmInitialized) {
3400                         throw new Error("initializeWasm() must be awaited first!");
3401                 }
3402                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
3403                 // debug statements here
3404         }
3405         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
3406         export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
3407                 if(!isWasmInitialized) {
3408                         throw new Error("initializeWasm() must be awaited first!");
3409                 }
3410                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
3411                 return nativeResponseValue;
3412         }
3413         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
3414         export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
3415                 if(!isWasmInitialized) {
3416                         throw new Error("initializeWasm() must be awaited first!");
3417                 }
3418                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
3419                 return nativeResponseValue;
3420         }
3421         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
3422         export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
3423                 if(!isWasmInitialized) {
3424                         throw new Error("initializeWasm() must be awaited first!");
3425                 }
3426                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
3427                 return nativeResponseValue;
3428         }
3429         // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
3430         export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
3431                 if(!isWasmInitialized) {
3432                         throw new Error("initializeWasm() must be awaited first!");
3433                 }
3434                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
3435                 // debug statements here
3436         }
3437         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
3438         export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
3439                 if(!isWasmInitialized) {
3440                         throw new Error("initializeWasm() must be awaited first!");
3441                 }
3442                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
3443                 return nativeResponseValue;
3444         }
3445         // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
3446         export function CVec_TxOutZ_free(_res: number[]): void {
3447                 if(!isWasmInitialized) {
3448                         throw new Error("initializeWasm() must be awaited first!");
3449                 }
3450                 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
3451                 // debug statements here
3452         }
3453         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
3454         export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
3455                 if(!isWasmInitialized) {
3456                         throw new Error("initializeWasm() must be awaited first!");
3457                 }
3458                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
3459                 return nativeResponseValue;
3460         }
3461         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
3462         export function CResult_TransactionNoneZ_err(): number {
3463                 if(!isWasmInitialized) {
3464                         throw new Error("initializeWasm() must be awaited first!");
3465                 }
3466                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
3467                 return nativeResponseValue;
3468         }
3469         // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
3470         export function CResult_TransactionNoneZ_free(_res: number): void {
3471                 if(!isWasmInitialized) {
3472                         throw new Error("initializeWasm() must be awaited first!");
3473                 }
3474                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
3475                 // debug statements here
3476         }
3477         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
3478         export function CVec_RouteHopZ_free(_res: number[]): void {
3479                 if(!isWasmInitialized) {
3480                         throw new Error("initializeWasm() must be awaited first!");
3481                 }
3482                 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
3483                 // debug statements here
3484         }
3485         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
3486         export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
3487                 if(!isWasmInitialized) {
3488                         throw new Error("initializeWasm() must be awaited first!");
3489                 }
3490                 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
3491                 // debug statements here
3492         }
3493         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
3494         export function CResult_RouteDecodeErrorZ_ok(o: number): number {
3495                 if(!isWasmInitialized) {
3496                         throw new Error("initializeWasm() must be awaited first!");
3497                 }
3498                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
3499                 return nativeResponseValue;
3500         }
3501         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
3502         export function CResult_RouteDecodeErrorZ_err(e: number): number {
3503                 if(!isWasmInitialized) {
3504                         throw new Error("initializeWasm() must be awaited first!");
3505                 }
3506                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
3507                 return nativeResponseValue;
3508         }
3509         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
3510         export function CResult_RouteDecodeErrorZ_free(_res: number): void {
3511                 if(!isWasmInitialized) {
3512                         throw new Error("initializeWasm() must be awaited first!");
3513                 }
3514                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
3515                 // debug statements here
3516         }
3517         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
3518         export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
3519                 if(!isWasmInitialized) {
3520                         throw new Error("initializeWasm() must be awaited first!");
3521                 }
3522                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
3523                 return nativeResponseValue;
3524         }
3525         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
3526         export function CVec_RouteHintZ_free(_res: number[]): void {
3527                 if(!isWasmInitialized) {
3528                         throw new Error("initializeWasm() must be awaited first!");
3529                 }
3530                 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
3531                 // debug statements here
3532         }
3533         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
3534         export function CResult_RouteLightningErrorZ_ok(o: number): number {
3535                 if(!isWasmInitialized) {
3536                         throw new Error("initializeWasm() must be awaited first!");
3537                 }
3538                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
3539                 return nativeResponseValue;
3540         }
3541         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
3542         export function CResult_RouteLightningErrorZ_err(e: number): number {
3543                 if(!isWasmInitialized) {
3544                         throw new Error("initializeWasm() must be awaited first!");
3545                 }
3546                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
3547                 return nativeResponseValue;
3548         }
3549         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
3550         export function CResult_RouteLightningErrorZ_free(_res: number): void {
3551                 if(!isWasmInitialized) {
3552                         throw new Error("initializeWasm() must be awaited first!");
3553                 }
3554                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
3555                 // debug statements here
3556         }
3557         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
3558         export function CResult_RouteLightningErrorZ_clone(orig: number): number {
3559                 if(!isWasmInitialized) {
3560                         throw new Error("initializeWasm() must be awaited first!");
3561                 }
3562                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
3563                 return nativeResponseValue;
3564         }
3565         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
3566         export function CResult_NetAddressu8Z_ok(o: number): number {
3567                 if(!isWasmInitialized) {
3568                         throw new Error("initializeWasm() must be awaited first!");
3569                 }
3570                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
3571                 return nativeResponseValue;
3572         }
3573         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
3574         export function CResult_NetAddressu8Z_err(e: number): number {
3575                 if(!isWasmInitialized) {
3576                         throw new Error("initializeWasm() must be awaited first!");
3577                 }
3578                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
3579                 return nativeResponseValue;
3580         }
3581         // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
3582         export function CResult_NetAddressu8Z_free(_res: number): void {
3583                 if(!isWasmInitialized) {
3584                         throw new Error("initializeWasm() must be awaited first!");
3585                 }
3586                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
3587                 // debug statements here
3588         }
3589         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
3590         export function CResult_NetAddressu8Z_clone(orig: number): number {
3591                 if(!isWasmInitialized) {
3592                         throw new Error("initializeWasm() must be awaited first!");
3593                 }
3594                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
3595                 return nativeResponseValue;
3596         }
3597         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
3598         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
3599                 if(!isWasmInitialized) {
3600                         throw new Error("initializeWasm() must be awaited first!");
3601                 }
3602                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
3603                 return nativeResponseValue;
3604         }
3605         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
3606         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
3607                 if(!isWasmInitialized) {
3608                         throw new Error("initializeWasm() must be awaited first!");
3609                 }
3610                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
3611                 return nativeResponseValue;
3612         }
3613         // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
3614         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
3615                 if(!isWasmInitialized) {
3616                         throw new Error("initializeWasm() must be awaited first!");
3617                 }
3618                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
3619                 // debug statements here
3620         }
3621         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
3622         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
3623                 if(!isWasmInitialized) {
3624                         throw new Error("initializeWasm() must be awaited first!");
3625                 }
3626                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
3627                 return nativeResponseValue;
3628         }
3629         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
3630         export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
3631                 if(!isWasmInitialized) {
3632                         throw new Error("initializeWasm() must be awaited first!");
3633                 }
3634                 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
3635                 // debug statements here
3636         }
3637         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
3638         export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
3639                 if(!isWasmInitialized) {
3640                         throw new Error("initializeWasm() must be awaited first!");
3641                 }
3642                 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
3643                 // debug statements here
3644         }
3645         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
3646         export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
3647                 if(!isWasmInitialized) {
3648                         throw new Error("initializeWasm() must be awaited first!");
3649                 }
3650                 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
3651                 // debug statements here
3652         }
3653         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
3654         export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
3655                 if(!isWasmInitialized) {
3656                         throw new Error("initializeWasm() must be awaited first!");
3657                 }
3658                 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
3659                 // debug statements here
3660         }
3661         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
3662         export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
3663                 if(!isWasmInitialized) {
3664                         throw new Error("initializeWasm() must be awaited first!");
3665                 }
3666                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
3667                 return nativeResponseValue;
3668         }
3669         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
3670         export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
3671                 if(!isWasmInitialized) {
3672                         throw new Error("initializeWasm() must be awaited first!");
3673                 }
3674                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
3675                 return nativeResponseValue;
3676         }
3677         // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
3678         export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
3679                 if(!isWasmInitialized) {
3680                         throw new Error("initializeWasm() must be awaited first!");
3681                 }
3682                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
3683                 // debug statements here
3684         }
3685         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
3686         export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
3687                 if(!isWasmInitialized) {
3688                         throw new Error("initializeWasm() must be awaited first!");
3689                 }
3690                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
3691                 return nativeResponseValue;
3692         }
3693         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
3694         export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
3695                 if(!isWasmInitialized) {
3696                         throw new Error("initializeWasm() must be awaited first!");
3697                 }
3698                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
3699                 return nativeResponseValue;
3700         }
3701         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
3702         export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
3703                 if(!isWasmInitialized) {
3704                         throw new Error("initializeWasm() must be awaited first!");
3705                 }
3706                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
3707                 return nativeResponseValue;
3708         }
3709         // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
3710         export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
3711                 if(!isWasmInitialized) {
3712                         throw new Error("initializeWasm() must be awaited first!");
3713                 }
3714                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
3715                 // debug statements here
3716         }
3717         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
3718         export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
3719                 if(!isWasmInitialized) {
3720                         throw new Error("initializeWasm() must be awaited first!");
3721                 }
3722                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
3723                 return nativeResponseValue;
3724         }
3725         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
3726         export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
3727                 if(!isWasmInitialized) {
3728                         throw new Error("initializeWasm() must be awaited first!");
3729                 }
3730                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
3731                 return nativeResponseValue;
3732         }
3733         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
3734         export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
3735                 if(!isWasmInitialized) {
3736                         throw new Error("initializeWasm() must be awaited first!");
3737                 }
3738                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
3739                 return nativeResponseValue;
3740         }
3741         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
3742         export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
3743                 if(!isWasmInitialized) {
3744                         throw new Error("initializeWasm() must be awaited first!");
3745                 }
3746                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
3747                 // debug statements here
3748         }
3749         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
3750         export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
3751                 if(!isWasmInitialized) {
3752                         throw new Error("initializeWasm() must be awaited first!");
3753                 }
3754                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
3755                 return nativeResponseValue;
3756         }
3757         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
3758         export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
3759                 if(!isWasmInitialized) {
3760                         throw new Error("initializeWasm() must be awaited first!");
3761                 }
3762                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
3763                 return nativeResponseValue;
3764         }
3765         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3766         export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
3767                 if(!isWasmInitialized) {
3768                         throw new Error("initializeWasm() must be awaited first!");
3769                 }
3770                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
3771                 return nativeResponseValue;
3772         }
3773         // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
3774         export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
3775                 if(!isWasmInitialized) {
3776                         throw new Error("initializeWasm() must be awaited first!");
3777                 }
3778                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
3779                 // debug statements here
3780         }
3781         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
3782         export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
3783                 if(!isWasmInitialized) {
3784                         throw new Error("initializeWasm() must be awaited first!");
3785                 }
3786                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
3787                 return nativeResponseValue;
3788         }
3789         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
3790         export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
3791                 if(!isWasmInitialized) {
3792                         throw new Error("initializeWasm() must be awaited first!");
3793                 }
3794                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
3795                 return nativeResponseValue;
3796         }
3797         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
3798         export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
3799                 if(!isWasmInitialized) {
3800                         throw new Error("initializeWasm() must be awaited first!");
3801                 }
3802                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
3803                 return nativeResponseValue;
3804         }
3805         // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
3806         export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
3807                 if(!isWasmInitialized) {
3808                         throw new Error("initializeWasm() must be awaited first!");
3809                 }
3810                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
3811                 // debug statements here
3812         }
3813         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
3814         export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
3815                 if(!isWasmInitialized) {
3816                         throw new Error("initializeWasm() must be awaited first!");
3817                 }
3818                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
3819                 return nativeResponseValue;
3820         }
3821         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
3822         export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
3823                 if(!isWasmInitialized) {
3824                         throw new Error("initializeWasm() must be awaited first!");
3825                 }
3826                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
3827                 return nativeResponseValue;
3828         }
3829         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
3830         export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
3831                 if(!isWasmInitialized) {
3832                         throw new Error("initializeWasm() must be awaited first!");
3833                 }
3834                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
3835                 return nativeResponseValue;
3836         }
3837         // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
3838         export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
3839                 if(!isWasmInitialized) {
3840                         throw new Error("initializeWasm() must be awaited first!");
3841                 }
3842                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
3843                 // debug statements here
3844         }
3845         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
3846         export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
3847                 if(!isWasmInitialized) {
3848                         throw new Error("initializeWasm() must be awaited first!");
3849                 }
3850                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
3851                 return nativeResponseValue;
3852         }
3853         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
3854         export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
3855                 if(!isWasmInitialized) {
3856                         throw new Error("initializeWasm() must be awaited first!");
3857                 }
3858                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
3859                 return nativeResponseValue;
3860         }
3861         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
3862         export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
3863                 if(!isWasmInitialized) {
3864                         throw new Error("initializeWasm() must be awaited first!");
3865                 }
3866                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
3867                 return nativeResponseValue;
3868         }
3869         // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
3870         export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
3871                 if(!isWasmInitialized) {
3872                         throw new Error("initializeWasm() must be awaited first!");
3873                 }
3874                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
3875                 // debug statements here
3876         }
3877         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
3878         export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
3879                 if(!isWasmInitialized) {
3880                         throw new Error("initializeWasm() must be awaited first!");
3881                 }
3882                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
3883                 return nativeResponseValue;
3884         }
3885         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
3886         export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
3887                 if(!isWasmInitialized) {
3888                         throw new Error("initializeWasm() must be awaited first!");
3889                 }
3890                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
3891                 return nativeResponseValue;
3892         }
3893         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
3894         export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
3895                 if(!isWasmInitialized) {
3896                         throw new Error("initializeWasm() must be awaited first!");
3897                 }
3898                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
3899                 return nativeResponseValue;
3900         }
3901         // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
3902         export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
3903                 if(!isWasmInitialized) {
3904                         throw new Error("initializeWasm() must be awaited first!");
3905                 }
3906                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
3907                 // debug statements here
3908         }
3909         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
3910         export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
3911                 if(!isWasmInitialized) {
3912                         throw new Error("initializeWasm() must be awaited first!");
3913                 }
3914                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
3915                 return nativeResponseValue;
3916         }
3917         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
3918         export function CResult_InitDecodeErrorZ_ok(o: number): number {
3919                 if(!isWasmInitialized) {
3920                         throw new Error("initializeWasm() must be awaited first!");
3921                 }
3922                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
3923                 return nativeResponseValue;
3924         }
3925         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
3926         export function CResult_InitDecodeErrorZ_err(e: number): number {
3927                 if(!isWasmInitialized) {
3928                         throw new Error("initializeWasm() must be awaited first!");
3929                 }
3930                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
3931                 return nativeResponseValue;
3932         }
3933         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
3934         export function CResult_InitDecodeErrorZ_free(_res: number): void {
3935                 if(!isWasmInitialized) {
3936                         throw new Error("initializeWasm() must be awaited first!");
3937                 }
3938                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
3939                 // debug statements here
3940         }
3941         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
3942         export function CResult_InitDecodeErrorZ_clone(orig: number): number {
3943                 if(!isWasmInitialized) {
3944                         throw new Error("initializeWasm() must be awaited first!");
3945                 }
3946                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
3947                 return nativeResponseValue;
3948         }
3949         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
3950         export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
3951                 if(!isWasmInitialized) {
3952                         throw new Error("initializeWasm() must be awaited first!");
3953                 }
3954                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
3955                 return nativeResponseValue;
3956         }
3957         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
3958         export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
3959                 if(!isWasmInitialized) {
3960                         throw new Error("initializeWasm() must be awaited first!");
3961                 }
3962                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
3963                 return nativeResponseValue;
3964         }
3965         // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
3966         export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
3967                 if(!isWasmInitialized) {
3968                         throw new Error("initializeWasm() must be awaited first!");
3969                 }
3970                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
3971                 // debug statements here
3972         }
3973         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
3974         export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
3975                 if(!isWasmInitialized) {
3976                         throw new Error("initializeWasm() must be awaited first!");
3977                 }
3978                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
3979                 return nativeResponseValue;
3980         }
3981         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
3982         export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
3983                 if(!isWasmInitialized) {
3984                         throw new Error("initializeWasm() must be awaited first!");
3985                 }
3986                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
3987                 return nativeResponseValue;
3988         }
3989         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
3990         export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
3991                 if(!isWasmInitialized) {
3992                         throw new Error("initializeWasm() must be awaited first!");
3993                 }
3994                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
3995                 return nativeResponseValue;
3996         }
3997         // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
3998         export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
3999                 if(!isWasmInitialized) {
4000                         throw new Error("initializeWasm() must be awaited first!");
4001                 }
4002                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
4003                 // debug statements here
4004         }
4005         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
4006         export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
4007                 if(!isWasmInitialized) {
4008                         throw new Error("initializeWasm() must be awaited first!");
4009                 }
4010                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
4011                 return nativeResponseValue;
4012         }
4013         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
4014         export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
4015                 if(!isWasmInitialized) {
4016                         throw new Error("initializeWasm() must be awaited first!");
4017                 }
4018                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
4019                 return nativeResponseValue;
4020         }
4021         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
4022         export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
4023                 if(!isWasmInitialized) {
4024                         throw new Error("initializeWasm() must be awaited first!");
4025                 }
4026                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
4027                 return nativeResponseValue;
4028         }
4029         // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
4030         export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
4031                 if(!isWasmInitialized) {
4032                         throw new Error("initializeWasm() must be awaited first!");
4033                 }
4034                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
4035                 // debug statements here
4036         }
4037         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
4038         export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
4039                 if(!isWasmInitialized) {
4040                         throw new Error("initializeWasm() must be awaited first!");
4041                 }
4042                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
4043                 return nativeResponseValue;
4044         }
4045         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
4046         export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
4047                 if(!isWasmInitialized) {
4048                         throw new Error("initializeWasm() must be awaited first!");
4049                 }
4050                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
4051                 return nativeResponseValue;
4052         }
4053         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
4054         export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
4055                 if(!isWasmInitialized) {
4056                         throw new Error("initializeWasm() must be awaited first!");
4057                 }
4058                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
4059                 return nativeResponseValue;
4060         }
4061         // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
4062         export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
4063                 if(!isWasmInitialized) {
4064                         throw new Error("initializeWasm() must be awaited first!");
4065                 }
4066                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
4067                 // debug statements here
4068         }
4069         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
4070         export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
4071                 if(!isWasmInitialized) {
4072                         throw new Error("initializeWasm() must be awaited first!");
4073                 }
4074                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
4075                 return nativeResponseValue;
4076         }
4077         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
4078         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
4079                 if(!isWasmInitialized) {
4080                         throw new Error("initializeWasm() must be awaited first!");
4081                 }
4082                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
4083                 return nativeResponseValue;
4084         }
4085         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
4086         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
4087                 if(!isWasmInitialized) {
4088                         throw new Error("initializeWasm() must be awaited first!");
4089                 }
4090                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
4091                 return nativeResponseValue;
4092         }
4093         // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
4094         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
4095                 if(!isWasmInitialized) {
4096                         throw new Error("initializeWasm() must be awaited first!");
4097                 }
4098                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
4099                 // debug statements here
4100         }
4101         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
4102         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
4103                 if(!isWasmInitialized) {
4104                         throw new Error("initializeWasm() must be awaited first!");
4105                 }
4106                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
4107                 return nativeResponseValue;
4108         }
4109         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
4110         export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
4111                 if(!isWasmInitialized) {
4112                         throw new Error("initializeWasm() must be awaited first!");
4113                 }
4114                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
4115                 return nativeResponseValue;
4116         }
4117         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
4118         export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
4119                 if(!isWasmInitialized) {
4120                         throw new Error("initializeWasm() must be awaited first!");
4121                 }
4122                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
4123                 return nativeResponseValue;
4124         }
4125         // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
4126         export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
4127                 if(!isWasmInitialized) {
4128                         throw new Error("initializeWasm() must be awaited first!");
4129                 }
4130                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
4131                 // debug statements here
4132         }
4133         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
4134         export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
4135                 if(!isWasmInitialized) {
4136                         throw new Error("initializeWasm() must be awaited first!");
4137                 }
4138                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
4139                 return nativeResponseValue;
4140         }
4141         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
4142         export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
4143                 if(!isWasmInitialized) {
4144                         throw new Error("initializeWasm() must be awaited first!");
4145                 }
4146                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
4147                 return nativeResponseValue;
4148         }
4149         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
4150         export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
4151                 if(!isWasmInitialized) {
4152                         throw new Error("initializeWasm() must be awaited first!");
4153                 }
4154                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
4155                 return nativeResponseValue;
4156         }
4157         // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
4158         export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
4159                 if(!isWasmInitialized) {
4160                         throw new Error("initializeWasm() must be awaited first!");
4161                 }
4162                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
4163                 // debug statements here
4164         }
4165         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
4166         export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
4167                 if(!isWasmInitialized) {
4168                         throw new Error("initializeWasm() must be awaited first!");
4169                 }
4170                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
4171                 return nativeResponseValue;
4172         }
4173         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
4174         export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
4175                 if(!isWasmInitialized) {
4176                         throw new Error("initializeWasm() must be awaited first!");
4177                 }
4178                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
4179                 return nativeResponseValue;
4180         }
4181         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
4182         export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
4183                 if(!isWasmInitialized) {
4184                         throw new Error("initializeWasm() must be awaited first!");
4185                 }
4186                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
4187                 return nativeResponseValue;
4188         }
4189         // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
4190         export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
4191                 if(!isWasmInitialized) {
4192                         throw new Error("initializeWasm() must be awaited first!");
4193                 }
4194                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
4195                 // debug statements here
4196         }
4197         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
4198         export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
4199                 if(!isWasmInitialized) {
4200                         throw new Error("initializeWasm() must be awaited first!");
4201                 }
4202                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
4203                 return nativeResponseValue;
4204         }
4205         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
4206         export function CResult_PingDecodeErrorZ_ok(o: number): number {
4207                 if(!isWasmInitialized) {
4208                         throw new Error("initializeWasm() must be awaited first!");
4209                 }
4210                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
4211                 return nativeResponseValue;
4212         }
4213         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
4214         export function CResult_PingDecodeErrorZ_err(e: number): number {
4215                 if(!isWasmInitialized) {
4216                         throw new Error("initializeWasm() must be awaited first!");
4217                 }
4218                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
4219                 return nativeResponseValue;
4220         }
4221         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
4222         export function CResult_PingDecodeErrorZ_free(_res: number): void {
4223                 if(!isWasmInitialized) {
4224                         throw new Error("initializeWasm() must be awaited first!");
4225                 }
4226                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
4227                 // debug statements here
4228         }
4229         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
4230         export function CResult_PingDecodeErrorZ_clone(orig: number): number {
4231                 if(!isWasmInitialized) {
4232                         throw new Error("initializeWasm() must be awaited first!");
4233                 }
4234                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
4235                 return nativeResponseValue;
4236         }
4237         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
4238         export function CResult_PongDecodeErrorZ_ok(o: number): number {
4239                 if(!isWasmInitialized) {
4240                         throw new Error("initializeWasm() must be awaited first!");
4241                 }
4242                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
4243                 return nativeResponseValue;
4244         }
4245         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
4246         export function CResult_PongDecodeErrorZ_err(e: number): number {
4247                 if(!isWasmInitialized) {
4248                         throw new Error("initializeWasm() must be awaited first!");
4249                 }
4250                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
4251                 return nativeResponseValue;
4252         }
4253         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
4254         export function CResult_PongDecodeErrorZ_free(_res: number): void {
4255                 if(!isWasmInitialized) {
4256                         throw new Error("initializeWasm() must be awaited first!");
4257                 }
4258                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
4259                 // debug statements here
4260         }
4261         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
4262         export function CResult_PongDecodeErrorZ_clone(orig: number): number {
4263                 if(!isWasmInitialized) {
4264                         throw new Error("initializeWasm() must be awaited first!");
4265                 }
4266                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
4267                 return nativeResponseValue;
4268         }
4269         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
4270         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
4271                 if(!isWasmInitialized) {
4272                         throw new Error("initializeWasm() must be awaited first!");
4273                 }
4274                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
4275                 return nativeResponseValue;
4276         }
4277         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4278         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
4279                 if(!isWasmInitialized) {
4280                         throw new Error("initializeWasm() must be awaited first!");
4281                 }
4282                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
4283                 return nativeResponseValue;
4284         }
4285         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
4286         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
4287                 if(!isWasmInitialized) {
4288                         throw new Error("initializeWasm() must be awaited first!");
4289                 }
4290                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
4291                 // debug statements here
4292         }
4293         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4294         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
4295                 if(!isWasmInitialized) {
4296                         throw new Error("initializeWasm() must be awaited first!");
4297                 }
4298                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
4299                 return nativeResponseValue;
4300         }
4301         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
4302         export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
4303                 if(!isWasmInitialized) {
4304                         throw new Error("initializeWasm() must be awaited first!");
4305                 }
4306                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
4307                 return nativeResponseValue;
4308         }
4309         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4310         export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
4311                 if(!isWasmInitialized) {
4312                         throw new Error("initializeWasm() must be awaited first!");
4313                 }
4314                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
4315                 return nativeResponseValue;
4316         }
4317         // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
4318         export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
4319                 if(!isWasmInitialized) {
4320                         throw new Error("initializeWasm() must be awaited first!");
4321                 }
4322                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
4323                 // debug statements here
4324         }
4325         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4326         export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
4327                 if(!isWasmInitialized) {
4328                         throw new Error("initializeWasm() must be awaited first!");
4329                 }
4330                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
4331                 return nativeResponseValue;
4332         }
4333         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
4334         export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
4335                 if(!isWasmInitialized) {
4336                         throw new Error("initializeWasm() must be awaited first!");
4337                 }
4338                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
4339                 return nativeResponseValue;
4340         }
4341         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4342         export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
4343                 if(!isWasmInitialized) {
4344                         throw new Error("initializeWasm() must be awaited first!");
4345                 }
4346                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
4347                 return nativeResponseValue;
4348         }
4349         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
4350         export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
4351                 if(!isWasmInitialized) {
4352                         throw new Error("initializeWasm() must be awaited first!");
4353                 }
4354                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
4355                 // debug statements here
4356         }
4357         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
4358         export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
4359                 if(!isWasmInitialized) {
4360                         throw new Error("initializeWasm() must be awaited first!");
4361                 }
4362                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
4363                 return nativeResponseValue;
4364         }
4365         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
4366         export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
4367                 if(!isWasmInitialized) {
4368                         throw new Error("initializeWasm() must be awaited first!");
4369                 }
4370                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
4371                 return nativeResponseValue;
4372         }
4373         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4374         export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
4375                 if(!isWasmInitialized) {
4376                         throw new Error("initializeWasm() must be awaited first!");
4377                 }
4378                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
4379                 return nativeResponseValue;
4380         }
4381         // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
4382         export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
4383                 if(!isWasmInitialized) {
4384                         throw new Error("initializeWasm() must be awaited first!");
4385                 }
4386                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
4387                 // debug statements here
4388         }
4389         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
4390         export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
4391                 if(!isWasmInitialized) {
4392                         throw new Error("initializeWasm() must be awaited first!");
4393                 }
4394                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
4395                 return nativeResponseValue;
4396         }
4397         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
4398         export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
4399                 if(!isWasmInitialized) {
4400                         throw new Error("initializeWasm() must be awaited first!");
4401                 }
4402                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
4403                 return nativeResponseValue;
4404         }
4405         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
4406         export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
4407                 if(!isWasmInitialized) {
4408                         throw new Error("initializeWasm() must be awaited first!");
4409                 }
4410                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
4411                 return nativeResponseValue;
4412         }
4413         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
4414         export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
4415                 if(!isWasmInitialized) {
4416                         throw new Error("initializeWasm() must be awaited first!");
4417                 }
4418                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
4419                 // debug statements here
4420         }
4421         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
4422         export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
4423                 if(!isWasmInitialized) {
4424                         throw new Error("initializeWasm() must be awaited first!");
4425                 }
4426                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
4427                 return nativeResponseValue;
4428         }
4429         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
4430         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
4431                 if(!isWasmInitialized) {
4432                         throw new Error("initializeWasm() must be awaited first!");
4433                 }
4434                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
4435                 return nativeResponseValue;
4436         }
4437         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4438         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
4439                 if(!isWasmInitialized) {
4440                         throw new Error("initializeWasm() must be awaited first!");
4441                 }
4442                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
4443                 return nativeResponseValue;
4444         }
4445         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
4446         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
4447                 if(!isWasmInitialized) {
4448                         throw new Error("initializeWasm() must be awaited first!");
4449                 }
4450                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
4451                 // debug statements here
4452         }
4453         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4454         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
4455                 if(!isWasmInitialized) {
4456                         throw new Error("initializeWasm() must be awaited first!");
4457                 }
4458                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
4459                 return nativeResponseValue;
4460         }
4461         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
4462         export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
4463                 if(!isWasmInitialized) {
4464                         throw new Error("initializeWasm() must be awaited first!");
4465                 }
4466                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
4467                 return nativeResponseValue;
4468         }
4469         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
4470         export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
4471                 if(!isWasmInitialized) {
4472                         throw new Error("initializeWasm() must be awaited first!");
4473                 }
4474                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
4475                 return nativeResponseValue;
4476         }
4477         // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
4478         export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
4479                 if(!isWasmInitialized) {
4480                         throw new Error("initializeWasm() must be awaited first!");
4481                 }
4482                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
4483                 // debug statements here
4484         }
4485         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
4486         export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
4487                 if(!isWasmInitialized) {
4488                         throw new Error("initializeWasm() must be awaited first!");
4489                 }
4490                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
4491                 return nativeResponseValue;
4492         }
4493         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
4494         export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
4495                 if(!isWasmInitialized) {
4496                         throw new Error("initializeWasm() must be awaited first!");
4497                 }
4498                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
4499                 return nativeResponseValue;
4500         }
4501         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
4502         export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
4503                 if(!isWasmInitialized) {
4504                         throw new Error("initializeWasm() must be awaited first!");
4505                 }
4506                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
4507                 return nativeResponseValue;
4508         }
4509         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
4510         export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
4511                 if(!isWasmInitialized) {
4512                         throw new Error("initializeWasm() must be awaited first!");
4513                 }
4514                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
4515                 // debug statements here
4516         }
4517         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
4518         export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
4519                 if(!isWasmInitialized) {
4520                         throw new Error("initializeWasm() must be awaited first!");
4521                 }
4522                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
4523                 return nativeResponseValue;
4524         }
4525         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
4526         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
4527                 if(!isWasmInitialized) {
4528                         throw new Error("initializeWasm() must be awaited first!");
4529                 }
4530                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
4531                 return nativeResponseValue;
4532         }
4533         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
4534         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
4535                 if(!isWasmInitialized) {
4536                         throw new Error("initializeWasm() must be awaited first!");
4537                 }
4538                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
4539                 return nativeResponseValue;
4540         }
4541         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
4542         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
4543                 if(!isWasmInitialized) {
4544                         throw new Error("initializeWasm() must be awaited first!");
4545                 }
4546                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
4547                 // debug statements here
4548         }
4549         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
4550         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
4551                 if(!isWasmInitialized) {
4552                         throw new Error("initializeWasm() must be awaited first!");
4553                 }
4554                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
4555                 return nativeResponseValue;
4556         }
4557         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
4558         export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
4559                 if(!isWasmInitialized) {
4560                         throw new Error("initializeWasm() must be awaited first!");
4561                 }
4562                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
4563                 return nativeResponseValue;
4564         }
4565         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
4566         export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
4567                 if(!isWasmInitialized) {
4568                         throw new Error("initializeWasm() must be awaited first!");
4569                 }
4570                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
4571                 return nativeResponseValue;
4572         }
4573         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
4574         export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
4575                 if(!isWasmInitialized) {
4576                         throw new Error("initializeWasm() must be awaited first!");
4577                 }
4578                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
4579                 // debug statements here
4580         }
4581         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
4582         export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
4583                 if(!isWasmInitialized) {
4584                         throw new Error("initializeWasm() must be awaited first!");
4585                 }
4586                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
4587                 return nativeResponseValue;
4588         }
4589         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
4590         export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
4591                 if(!isWasmInitialized) {
4592                         throw new Error("initializeWasm() must be awaited first!");
4593                 }
4594                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
4595                 return nativeResponseValue;
4596         }
4597         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
4598         export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
4599                 if(!isWasmInitialized) {
4600                         throw new Error("initializeWasm() must be awaited first!");
4601                 }
4602                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
4603                 return nativeResponseValue;
4604         }
4605         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
4606         export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
4607                 if(!isWasmInitialized) {
4608                         throw new Error("initializeWasm() must be awaited first!");
4609                 }
4610                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
4611                 // debug statements here
4612         }
4613         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
4614         export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
4615                 if(!isWasmInitialized) {
4616                         throw new Error("initializeWasm() must be awaited first!");
4617                 }
4618                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
4619                 return nativeResponseValue;
4620         }
4621         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
4622         export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
4623                 if(!isWasmInitialized) {
4624                         throw new Error("initializeWasm() must be awaited first!");
4625                 }
4626                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
4627                 return nativeResponseValue;
4628         }
4629         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
4630         export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
4631                 if(!isWasmInitialized) {
4632                         throw new Error("initializeWasm() must be awaited first!");
4633                 }
4634                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
4635                 return nativeResponseValue;
4636         }
4637         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
4638         export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
4639                 if(!isWasmInitialized) {
4640                         throw new Error("initializeWasm() must be awaited first!");
4641                 }
4642                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
4643                 // debug statements here
4644         }
4645         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
4646         export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
4647                 if(!isWasmInitialized) {
4648                         throw new Error("initializeWasm() must be awaited first!");
4649                 }
4650                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
4651                 return nativeResponseValue;
4652         }
4653         // void Event_free(struct LDKEvent this_ptr);
4654         export function Event_free(this_ptr: number): void {
4655                 if(!isWasmInitialized) {
4656                         throw new Error("initializeWasm() must be awaited first!");
4657                 }
4658                 const nativeResponseValue = wasm.Event_free(this_ptr);
4659                 // debug statements here
4660         }
4661         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
4662         export function Event_clone(orig: number): number {
4663                 if(!isWasmInitialized) {
4664                         throw new Error("initializeWasm() must be awaited first!");
4665                 }
4666                 const nativeResponseValue = wasm.Event_clone(orig);
4667                 return nativeResponseValue;
4668         }
4669         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
4670         export function Event_write(obj: number): Uint8Array {
4671                 if(!isWasmInitialized) {
4672                         throw new Error("initializeWasm() must be awaited first!");
4673                 }
4674                 const nativeResponseValue = wasm.Event_write(obj);
4675                 return decodeArray(nativeResponseValue);
4676         }
4677         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
4678         export function MessageSendEvent_free(this_ptr: number): void {
4679                 if(!isWasmInitialized) {
4680                         throw new Error("initializeWasm() must be awaited first!");
4681                 }
4682                 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
4683                 // debug statements here
4684         }
4685         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
4686         export function MessageSendEvent_clone(orig: number): number {
4687                 if(!isWasmInitialized) {
4688                         throw new Error("initializeWasm() must be awaited first!");
4689                 }
4690                 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
4691                 return nativeResponseValue;
4692         }
4693         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
4694         export function MessageSendEventsProvider_free(this_ptr: number): void {
4695                 if(!isWasmInitialized) {
4696                         throw new Error("initializeWasm() must be awaited first!");
4697                 }
4698                 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
4699                 // debug statements here
4700         }
4701         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
4702         export function EventsProvider_free(this_ptr: number): void {
4703                 if(!isWasmInitialized) {
4704                         throw new Error("initializeWasm() must be awaited first!");
4705                 }
4706                 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
4707                 // debug statements here
4708         }
4709         // void APIError_free(struct LDKAPIError this_ptr);
4710         export function APIError_free(this_ptr: number): void {
4711                 if(!isWasmInitialized) {
4712                         throw new Error("initializeWasm() must be awaited first!");
4713                 }
4714                 const nativeResponseValue = wasm.APIError_free(this_ptr);
4715                 // debug statements here
4716         }
4717         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
4718         export function APIError_clone(orig: number): number {
4719                 if(!isWasmInitialized) {
4720                         throw new Error("initializeWasm() must be awaited first!");
4721                 }
4722                 const nativeResponseValue = wasm.APIError_clone(orig);
4723                 return nativeResponseValue;
4724         }
4725         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
4726         export function Level_clone(orig: number): LDKLevel {
4727                 if(!isWasmInitialized) {
4728                         throw new Error("initializeWasm() must be awaited first!");
4729                 }
4730                 const nativeResponseValue = wasm.Level_clone(orig);
4731                 return nativeResponseValue;
4732         }
4733         // MUST_USE_RES enum LDKLevel Level_max(void);
4734         export function Level_max(): LDKLevel {
4735                 if(!isWasmInitialized) {
4736                         throw new Error("initializeWasm() must be awaited first!");
4737                 }
4738                 const nativeResponseValue = wasm.Level_max();
4739                 return nativeResponseValue;
4740         }
4741         // void Logger_free(struct LDKLogger this_ptr);
4742         export function Logger_free(this_ptr: number): void {
4743                 if(!isWasmInitialized) {
4744                         throw new Error("initializeWasm() must be awaited first!");
4745                 }
4746                 const nativeResponseValue = wasm.Logger_free(this_ptr);
4747                 // debug statements here
4748         }
4749         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
4750         export function ChannelHandshakeConfig_free(this_obj: number): void {
4751                 if(!isWasmInitialized) {
4752                         throw new Error("initializeWasm() must be awaited first!");
4753                 }
4754                 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
4755                 // debug statements here
4756         }
4757         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4758         export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
4759                 if(!isWasmInitialized) {
4760                         throw new Error("initializeWasm() must be awaited first!");
4761                 }
4762                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
4763                 return nativeResponseValue;
4764         }
4765         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
4766         export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
4767                 if(!isWasmInitialized) {
4768                         throw new Error("initializeWasm() must be awaited first!");
4769                 }
4770                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
4771                 // debug statements here
4772         }
4773         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4774         export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
4775                 if(!isWasmInitialized) {
4776                         throw new Error("initializeWasm() must be awaited first!");
4777                 }
4778                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
4779                 return nativeResponseValue;
4780         }
4781         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
4782         export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
4783                 if(!isWasmInitialized) {
4784                         throw new Error("initializeWasm() must be awaited first!");
4785                 }
4786                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
4787                 // debug statements here
4788         }
4789         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
4790         export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
4791                 if(!isWasmInitialized) {
4792                         throw new Error("initializeWasm() must be awaited first!");
4793                 }
4794                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
4795                 return nativeResponseValue;
4796         }
4797         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
4798         export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
4799                 if(!isWasmInitialized) {
4800                         throw new Error("initializeWasm() must be awaited first!");
4801                 }
4802                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
4803                 // debug statements here
4804         }
4805         // 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);
4806         export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
4807                 if(!isWasmInitialized) {
4808                         throw new Error("initializeWasm() must be awaited first!");
4809                 }
4810                 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
4811                 return nativeResponseValue;
4812         }
4813         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
4814         export function ChannelHandshakeConfig_clone(orig: number): number {
4815                 if(!isWasmInitialized) {
4816                         throw new Error("initializeWasm() must be awaited first!");
4817                 }
4818                 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
4819                 return nativeResponseValue;
4820         }
4821         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
4822         export function ChannelHandshakeConfig_default(): number {
4823                 if(!isWasmInitialized) {
4824                         throw new Error("initializeWasm() must be awaited first!");
4825                 }
4826                 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
4827                 return nativeResponseValue;
4828         }
4829         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
4830         export function ChannelHandshakeLimits_free(this_obj: number): void {
4831                 if(!isWasmInitialized) {
4832                         throw new Error("initializeWasm() must be awaited first!");
4833                 }
4834                 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
4835                 // debug statements here
4836         }
4837         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4838         export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
4839                 if(!isWasmInitialized) {
4840                         throw new Error("initializeWasm() must be awaited first!");
4841                 }
4842                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
4843                 return nativeResponseValue;
4844         }
4845         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4846         export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
4847                 if(!isWasmInitialized) {
4848                         throw new Error("initializeWasm() must be awaited first!");
4849                 }
4850                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
4851                 // debug statements here
4852         }
4853         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4854         export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
4855                 if(!isWasmInitialized) {
4856                         throw new Error("initializeWasm() must be awaited first!");
4857                 }
4858                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
4859                 return nativeResponseValue;
4860         }
4861         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4862         export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
4863                 if(!isWasmInitialized) {
4864                         throw new Error("initializeWasm() must be awaited first!");
4865                 }
4866                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
4867                 // debug statements here
4868         }
4869         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4870         export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
4871                 if(!isWasmInitialized) {
4872                         throw new Error("initializeWasm() must be awaited first!");
4873                 }
4874                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
4875                 return nativeResponseValue;
4876         }
4877         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4878         export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
4879                 if(!isWasmInitialized) {
4880                         throw new Error("initializeWasm() must be awaited first!");
4881                 }
4882                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
4883                 // debug statements here
4884         }
4885         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4886         export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
4887                 if(!isWasmInitialized) {
4888                         throw new Error("initializeWasm() must be awaited first!");
4889                 }
4890                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
4891                 return nativeResponseValue;
4892         }
4893         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4894         export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
4895                 if(!isWasmInitialized) {
4896                         throw new Error("initializeWasm() must be awaited first!");
4897                 }
4898                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
4899                 // debug statements here
4900         }
4901         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4902         export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
4903                 if(!isWasmInitialized) {
4904                         throw new Error("initializeWasm() must be awaited first!");
4905                 }
4906                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
4907                 return nativeResponseValue;
4908         }
4909         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
4910         export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
4911                 if(!isWasmInitialized) {
4912                         throw new Error("initializeWasm() must be awaited first!");
4913                 }
4914                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
4915                 // debug statements here
4916         }
4917         // uint64_t ChannelHandshakeLimits_get_min_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4918         export function ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr: number): number {
4919                 if(!isWasmInitialized) {
4920                         throw new Error("initializeWasm() must be awaited first!");
4921                 }
4922                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptr);
4923                 return nativeResponseValue;
4924         }
4925         // void ChannelHandshakeLimits_set_min_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4926         export function ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr: number, val: number): void {
4927                 if(!isWasmInitialized) {
4928                         throw new Error("initializeWasm() must be awaited first!");
4929                 }
4930                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptr, val);
4931                 // debug statements here
4932         }
4933         // uint64_t ChannelHandshakeLimits_get_max_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4934         export function ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr: number): number {
4935                 if(!isWasmInitialized) {
4936                         throw new Error("initializeWasm() must be awaited first!");
4937                 }
4938                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptr);
4939                 return nativeResponseValue;
4940         }
4941         // void ChannelHandshakeLimits_set_max_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
4942         export function ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr: number, val: number): void {
4943                 if(!isWasmInitialized) {
4944                         throw new Error("initializeWasm() must be awaited first!");
4945                 }
4946                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptr, val);
4947                 // debug statements here
4948         }
4949         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4950         export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
4951                 if(!isWasmInitialized) {
4952                         throw new Error("initializeWasm() must be awaited first!");
4953                 }
4954                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
4955                 return nativeResponseValue;
4956         }
4957         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
4958         export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
4959                 if(!isWasmInitialized) {
4960                         throw new Error("initializeWasm() must be awaited first!");
4961                 }
4962                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
4963                 // debug statements here
4964         }
4965         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4966         export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
4967                 if(!isWasmInitialized) {
4968                         throw new Error("initializeWasm() must be awaited first!");
4969                 }
4970                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
4971                 return nativeResponseValue;
4972         }
4973         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
4974         export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
4975                 if(!isWasmInitialized) {
4976                         throw new Error("initializeWasm() must be awaited first!");
4977                 }
4978                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
4979                 // debug statements here
4980         }
4981         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
4982         export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
4983                 if(!isWasmInitialized) {
4984                         throw new Error("initializeWasm() must be awaited first!");
4985                 }
4986                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
4987                 return nativeResponseValue;
4988         }
4989         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
4990         export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
4991                 if(!isWasmInitialized) {
4992                         throw new Error("initializeWasm() must be awaited first!");
4993                 }
4994                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
4995                 // debug statements here
4996         }
4997         // 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, uint64_t min_dust_limit_satoshis_arg, uint64_t max_dust_limit_satoshis_arg, uint32_t max_minimum_depth_arg, bool force_announced_channel_preference_arg, uint16_t their_to_self_delay_arg);
4998         export function ChannelHandshakeLimits_new(min_funding_satoshis_arg: number, max_htlc_minimum_msat_arg: number, min_max_htlc_value_in_flight_msat_arg: number, max_channel_reserve_satoshis_arg: number, min_max_accepted_htlcs_arg: number, min_dust_limit_satoshis_arg: number, max_dust_limit_satoshis_arg: number, max_minimum_depth_arg: number, force_announced_channel_preference_arg: boolean, their_to_self_delay_arg: number): number {
4999                 if(!isWasmInitialized) {
5000                         throw new Error("initializeWasm() must be awaited first!");
5001                 }
5002                 const nativeResponseValue = wasm.ChannelHandshakeLimits_new(min_funding_satoshis_arg, max_htlc_minimum_msat_arg, min_max_htlc_value_in_flight_msat_arg, max_channel_reserve_satoshis_arg, min_max_accepted_htlcs_arg, min_dust_limit_satoshis_arg, max_dust_limit_satoshis_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg);
5003                 return nativeResponseValue;
5004         }
5005         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
5006         export function ChannelHandshakeLimits_clone(orig: number): number {
5007                 if(!isWasmInitialized) {
5008                         throw new Error("initializeWasm() must be awaited first!");
5009                 }
5010                 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
5011                 return nativeResponseValue;
5012         }
5013         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
5014         export function ChannelHandshakeLimits_default(): number {
5015                 if(!isWasmInitialized) {
5016                         throw new Error("initializeWasm() must be awaited first!");
5017                 }
5018                 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
5019                 return nativeResponseValue;
5020         }
5021         // void ChannelConfig_free(struct LDKChannelConfig this_obj);
5022         export function ChannelConfig_free(this_obj: number): void {
5023                 if(!isWasmInitialized) {
5024                         throw new Error("initializeWasm() must be awaited first!");
5025                 }
5026                 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
5027                 // debug statements here
5028         }
5029         // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
5030         export function ChannelConfig_get_fee_proportional_millionths(this_ptr: number): number {
5031                 if(!isWasmInitialized) {
5032                         throw new Error("initializeWasm() must be awaited first!");
5033                 }
5034                 const nativeResponseValue = wasm.ChannelConfig_get_fee_proportional_millionths(this_ptr);
5035                 return nativeResponseValue;
5036         }
5037         // void ChannelConfig_set_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
5038         export function ChannelConfig_set_fee_proportional_millionths(this_ptr: number, val: number): void {
5039                 if(!isWasmInitialized) {
5040                         throw new Error("initializeWasm() must be awaited first!");
5041                 }
5042                 const nativeResponseValue = wasm.ChannelConfig_set_fee_proportional_millionths(this_ptr, val);
5043                 // debug statements here
5044         }
5045         // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
5046         export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
5047                 if(!isWasmInitialized) {
5048                         throw new Error("initializeWasm() must be awaited first!");
5049                 }
5050                 const nativeResponseValue = wasm.ChannelConfig_get_cltv_expiry_delta(this_ptr);
5051                 return nativeResponseValue;
5052         }
5053         // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
5054         export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
5055                 if(!isWasmInitialized) {
5056                         throw new Error("initializeWasm() must be awaited first!");
5057                 }
5058                 const nativeResponseValue = wasm.ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
5059                 // debug statements here
5060         }
5061         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
5062         export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
5063                 if(!isWasmInitialized) {
5064                         throw new Error("initializeWasm() must be awaited first!");
5065                 }
5066                 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
5067                 return nativeResponseValue;
5068         }
5069         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
5070         export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
5071                 if(!isWasmInitialized) {
5072                         throw new Error("initializeWasm() must be awaited first!");
5073                 }
5074                 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
5075                 // debug statements here
5076         }
5077         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
5078         export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
5079                 if(!isWasmInitialized) {
5080                         throw new Error("initializeWasm() must be awaited first!");
5081                 }
5082                 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
5083                 return nativeResponseValue;
5084         }
5085         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
5086         export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
5087                 if(!isWasmInitialized) {
5088                         throw new Error("initializeWasm() must be awaited first!");
5089                 }
5090                 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
5091                 // debug statements here
5092         }
5093         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t fee_proportional_millionths_arg, uint16_t cltv_expiry_delta_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
5094         export function ChannelConfig_new(fee_proportional_millionths_arg: number, cltv_expiry_delta_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean): number {
5095                 if(!isWasmInitialized) {
5096                         throw new Error("initializeWasm() must be awaited first!");
5097                 }
5098                 const nativeResponseValue = wasm.ChannelConfig_new(fee_proportional_millionths_arg, cltv_expiry_delta_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
5099                 return nativeResponseValue;
5100         }
5101         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
5102         export function ChannelConfig_clone(orig: number): number {
5103                 if(!isWasmInitialized) {
5104                         throw new Error("initializeWasm() must be awaited first!");
5105                 }
5106                 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
5107                 return nativeResponseValue;
5108         }
5109         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
5110         export function ChannelConfig_default(): number {
5111                 if(!isWasmInitialized) {
5112                         throw new Error("initializeWasm() must be awaited first!");
5113                 }
5114                 const nativeResponseValue = wasm.ChannelConfig_default();
5115                 return nativeResponseValue;
5116         }
5117         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
5118         export function ChannelConfig_write(obj: number): Uint8Array {
5119                 if(!isWasmInitialized) {
5120                         throw new Error("initializeWasm() must be awaited first!");
5121                 }
5122                 const nativeResponseValue = wasm.ChannelConfig_write(obj);
5123                 return decodeArray(nativeResponseValue);
5124         }
5125         // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
5126         export function ChannelConfig_read(ser: Uint8Array): number {
5127                 if(!isWasmInitialized) {
5128                         throw new Error("initializeWasm() must be awaited first!");
5129                 }
5130                 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
5131                 return nativeResponseValue;
5132         }
5133         // void UserConfig_free(struct LDKUserConfig this_obj);
5134         export function UserConfig_free(this_obj: number): void {
5135                 if(!isWasmInitialized) {
5136                         throw new Error("initializeWasm() must be awaited first!");
5137                 }
5138                 const nativeResponseValue = wasm.UserConfig_free(this_obj);
5139                 // debug statements here
5140         }
5141         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
5142         export function UserConfig_get_own_channel_config(this_ptr: number): number {
5143                 if(!isWasmInitialized) {
5144                         throw new Error("initializeWasm() must be awaited first!");
5145                 }
5146                 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
5147                 return nativeResponseValue;
5148         }
5149         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
5150         export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
5151                 if(!isWasmInitialized) {
5152                         throw new Error("initializeWasm() must be awaited first!");
5153                 }
5154                 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
5155                 // debug statements here
5156         }
5157         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
5158         export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
5159                 if(!isWasmInitialized) {
5160                         throw new Error("initializeWasm() must be awaited first!");
5161                 }
5162                 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
5163                 return nativeResponseValue;
5164         }
5165         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
5166         export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
5167                 if(!isWasmInitialized) {
5168                         throw new Error("initializeWasm() must be awaited first!");
5169                 }
5170                 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
5171                 // debug statements here
5172         }
5173         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
5174         export function UserConfig_get_channel_options(this_ptr: number): number {
5175                 if(!isWasmInitialized) {
5176                         throw new Error("initializeWasm() must be awaited first!");
5177                 }
5178                 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
5179                 return nativeResponseValue;
5180         }
5181         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
5182         export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
5183                 if(!isWasmInitialized) {
5184                         throw new Error("initializeWasm() must be awaited first!");
5185                 }
5186                 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
5187                 // debug statements here
5188         }
5189         // 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);
5190         export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number): number {
5191                 if(!isWasmInitialized) {
5192                         throw new Error("initializeWasm() must be awaited first!");
5193                 }
5194                 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg);
5195                 return nativeResponseValue;
5196         }
5197         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
5198         export function UserConfig_clone(orig: number): number {
5199                 if(!isWasmInitialized) {
5200                         throw new Error("initializeWasm() must be awaited first!");
5201                 }
5202                 const nativeResponseValue = wasm.UserConfig_clone(orig);
5203                 return nativeResponseValue;
5204         }
5205         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
5206         export function UserConfig_default(): number {
5207                 if(!isWasmInitialized) {
5208                         throw new Error("initializeWasm() must be awaited first!");
5209                 }
5210                 const nativeResponseValue = wasm.UserConfig_default();
5211                 return nativeResponseValue;
5212         }
5213         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
5214         export function AccessError_clone(orig: number): LDKAccessError {
5215                 if(!isWasmInitialized) {
5216                         throw new Error("initializeWasm() must be awaited first!");
5217                 }
5218                 const nativeResponseValue = wasm.AccessError_clone(orig);
5219                 return nativeResponseValue;
5220         }
5221         // void Access_free(struct LDKAccess this_ptr);
5222         export function Access_free(this_ptr: number): void {
5223                 if(!isWasmInitialized) {
5224                         throw new Error("initializeWasm() must be awaited first!");
5225                 }
5226                 const nativeResponseValue = wasm.Access_free(this_ptr);
5227                 // debug statements here
5228         }
5229         // void Listen_free(struct LDKListen this_ptr);
5230         export function Listen_free(this_ptr: number): void {
5231                 if(!isWasmInitialized) {
5232                         throw new Error("initializeWasm() must be awaited first!");
5233                 }
5234                 const nativeResponseValue = wasm.Listen_free(this_ptr);
5235                 // debug statements here
5236         }
5237         // void Watch_free(struct LDKWatch this_ptr);
5238         export function Watch_free(this_ptr: number): void {
5239                 if(!isWasmInitialized) {
5240                         throw new Error("initializeWasm() must be awaited first!");
5241                 }
5242                 const nativeResponseValue = wasm.Watch_free(this_ptr);
5243                 // debug statements here
5244         }
5245         // void Filter_free(struct LDKFilter this_ptr);
5246         export function Filter_free(this_ptr: number): void {
5247                 if(!isWasmInitialized) {
5248                         throw new Error("initializeWasm() must be awaited first!");
5249                 }
5250                 const nativeResponseValue = wasm.Filter_free(this_ptr);
5251                 // debug statements here
5252         }
5253         // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
5254         export function WatchedOutput_free(this_obj: number): void {
5255                 if(!isWasmInitialized) {
5256                         throw new Error("initializeWasm() must be awaited first!");
5257                 }
5258                 const nativeResponseValue = wasm.WatchedOutput_free(this_obj);
5259                 // debug statements here
5260         }
5261         // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
5262         export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
5263                 if(!isWasmInitialized) {
5264                         throw new Error("initializeWasm() must be awaited first!");
5265                 }
5266                 const nativeResponseValue = wasm.WatchedOutput_get_block_hash(this_ptr);
5267                 return decodeArray(nativeResponseValue);
5268         }
5269         // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5270         export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
5271                 if(!isWasmInitialized) {
5272                         throw new Error("initializeWasm() must be awaited first!");
5273                 }
5274                 const nativeResponseValue = wasm.WatchedOutput_set_block_hash(this_ptr, encodeArray(val));
5275                 // debug statements here
5276         }
5277         // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
5278         export function WatchedOutput_get_outpoint(this_ptr: number): number {
5279                 if(!isWasmInitialized) {
5280                         throw new Error("initializeWasm() must be awaited first!");
5281                 }
5282                 const nativeResponseValue = wasm.WatchedOutput_get_outpoint(this_ptr);
5283                 return nativeResponseValue;
5284         }
5285         // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5286         export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
5287                 if(!isWasmInitialized) {
5288                         throw new Error("initializeWasm() must be awaited first!");
5289                 }
5290                 const nativeResponseValue = wasm.WatchedOutput_set_outpoint(this_ptr, val);
5291                 // debug statements here
5292         }
5293         // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
5294         export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
5295                 if(!isWasmInitialized) {
5296                         throw new Error("initializeWasm() must be awaited first!");
5297                 }
5298                 const nativeResponseValue = wasm.WatchedOutput_get_script_pubkey(this_ptr);
5299                 return decodeArray(nativeResponseValue);
5300         }
5301         // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
5302         export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
5303                 if(!isWasmInitialized) {
5304                         throw new Error("initializeWasm() must be awaited first!");
5305                 }
5306                 const nativeResponseValue = wasm.WatchedOutput_set_script_pubkey(this_ptr, encodeArray(val));
5307                 // debug statements here
5308         }
5309         // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
5310         export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
5311                 if(!isWasmInitialized) {
5312                         throw new Error("initializeWasm() must be awaited first!");
5313                 }
5314                 const nativeResponseValue = wasm.WatchedOutput_new(encodeArray(block_hash_arg), outpoint_arg, encodeArray(script_pubkey_arg));
5315                 return nativeResponseValue;
5316         }
5317         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
5318         export function BroadcasterInterface_free(this_ptr: number): void {
5319                 if(!isWasmInitialized) {
5320                         throw new Error("initializeWasm() must be awaited first!");
5321                 }
5322                 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
5323                 // debug statements here
5324         }
5325         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
5326         export function ConfirmationTarget_clone(orig: number): LDKConfirmationTarget {
5327                 if(!isWasmInitialized) {
5328                         throw new Error("initializeWasm() must be awaited first!");
5329                 }
5330                 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
5331                 return nativeResponseValue;
5332         }
5333         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
5334         export function FeeEstimator_free(this_ptr: number): void {
5335                 if(!isWasmInitialized) {
5336                         throw new Error("initializeWasm() must be awaited first!");
5337                 }
5338                 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
5339                 // debug statements here
5340         }
5341         // void ChainMonitor_free(struct LDKChainMonitor this_obj);
5342         export function ChainMonitor_free(this_obj: number): void {
5343                 if(!isWasmInitialized) {
5344                         throw new Error("initializeWasm() must be awaited first!");
5345                 }
5346                 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
5347                 // debug statements here
5348         }
5349         // void ChainMonitor_block_connected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
5350         export function ChainMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
5351                 if(!isWasmInitialized) {
5352                         throw new Error("initializeWasm() must be awaited first!");
5353                 }
5354                 const nativeResponseValue = wasm.ChainMonitor_block_connected(this_arg, encodeArray(header), txdata, height);
5355                 // debug statements here
5356         }
5357         // void ChainMonitor_block_disconnected(const struct LDKChainMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t disconnected_height);
5358         export function ChainMonitor_block_disconnected(this_arg: number, header: Uint8Array, disconnected_height: number): void {
5359                 if(!isWasmInitialized) {
5360                         throw new Error("initializeWasm() must be awaited first!");
5361                 }
5362                 const nativeResponseValue = wasm.ChainMonitor_block_disconnected(this_arg, encodeArray(header), disconnected_height);
5363                 // debug statements here
5364         }
5365         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKFilter *chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
5366         export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
5367                 if(!isWasmInitialized) {
5368                         throw new Error("initializeWasm() must be awaited first!");
5369                 }
5370                 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
5371                 return nativeResponseValue;
5372         }
5373         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
5374         export function ChainMonitor_as_Watch(this_arg: number): number {
5375                 if(!isWasmInitialized) {
5376                         throw new Error("initializeWasm() must be awaited first!");
5377                 }
5378                 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
5379                 return nativeResponseValue;
5380         }
5381         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
5382         export function ChainMonitor_as_EventsProvider(this_arg: number): number {
5383                 if(!isWasmInitialized) {
5384                         throw new Error("initializeWasm() must be awaited first!");
5385                 }
5386                 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
5387                 return nativeResponseValue;
5388         }
5389         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
5390         export function ChannelMonitorUpdate_free(this_obj: number): void {
5391                 if(!isWasmInitialized) {
5392                         throw new Error("initializeWasm() must be awaited first!");
5393                 }
5394                 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
5395                 // debug statements here
5396         }
5397         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
5398         export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
5399                 if(!isWasmInitialized) {
5400                         throw new Error("initializeWasm() must be awaited first!");
5401                 }
5402                 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
5403                 return nativeResponseValue;
5404         }
5405         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
5406         export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
5407                 if(!isWasmInitialized) {
5408                         throw new Error("initializeWasm() must be awaited first!");
5409                 }
5410                 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
5411                 // debug statements here
5412         }
5413         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
5414         export function ChannelMonitorUpdate_clone(orig: number): number {
5415                 if(!isWasmInitialized) {
5416                         throw new Error("initializeWasm() must be awaited first!");
5417                 }
5418                 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
5419                 return nativeResponseValue;
5420         }
5421         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
5422         export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
5423                 if(!isWasmInitialized) {
5424                         throw new Error("initializeWasm() must be awaited first!");
5425                 }
5426                 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
5427                 return decodeArray(nativeResponseValue);
5428         }
5429         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
5430         export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
5431                 if(!isWasmInitialized) {
5432                         throw new Error("initializeWasm() must be awaited first!");
5433                 }
5434                 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
5435                 return nativeResponseValue;
5436         }
5437         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
5438         export function ChannelMonitorUpdateErr_clone(orig: number): LDKChannelMonitorUpdateErr {
5439                 if(!isWasmInitialized) {
5440                         throw new Error("initializeWasm() must be awaited first!");
5441                 }
5442                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
5443                 return nativeResponseValue;
5444         }
5445         // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
5446         export function MonitorUpdateError_free(this_obj: number): void {
5447                 if(!isWasmInitialized) {
5448                         throw new Error("initializeWasm() must be awaited first!");
5449                 }
5450                 const nativeResponseValue = wasm.MonitorUpdateError_free(this_obj);
5451                 // debug statements here
5452         }
5453         // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
5454         export function MonitorUpdateError_clone(orig: number): number {
5455                 if(!isWasmInitialized) {
5456                         throw new Error("initializeWasm() must be awaited first!");
5457                 }
5458                 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
5459                 return nativeResponseValue;
5460         }
5461         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
5462         export function MonitorEvent_free(this_ptr: number): void {
5463                 if(!isWasmInitialized) {
5464                         throw new Error("initializeWasm() must be awaited first!");
5465                 }
5466                 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
5467                 // debug statements here
5468         }
5469         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
5470         export function MonitorEvent_clone(orig: number): number {
5471                 if(!isWasmInitialized) {
5472                         throw new Error("initializeWasm() must be awaited first!");
5473                 }
5474                 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
5475                 return nativeResponseValue;
5476         }
5477         // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
5478         export function HTLCUpdate_free(this_obj: number): void {
5479                 if(!isWasmInitialized) {
5480                         throw new Error("initializeWasm() must be awaited first!");
5481                 }
5482                 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
5483                 // debug statements here
5484         }
5485         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
5486         export function HTLCUpdate_clone(orig: number): number {
5487                 if(!isWasmInitialized) {
5488                         throw new Error("initializeWasm() must be awaited first!");
5489                 }
5490                 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
5491                 return nativeResponseValue;
5492         }
5493         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
5494         export function HTLCUpdate_write(obj: number): Uint8Array {
5495                 if(!isWasmInitialized) {
5496                         throw new Error("initializeWasm() must be awaited first!");
5497                 }
5498                 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
5499                 return decodeArray(nativeResponseValue);
5500         }
5501         // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
5502         export function HTLCUpdate_read(ser: Uint8Array): number {
5503                 if(!isWasmInitialized) {
5504                         throw new Error("initializeWasm() must be awaited first!");
5505                 }
5506                 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
5507                 return nativeResponseValue;
5508         }
5509         // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
5510         export function ChannelMonitor_free(this_obj: number): void {
5511                 if(!isWasmInitialized) {
5512                         throw new Error("initializeWasm() must be awaited first!");
5513                 }
5514                 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
5515                 // debug statements here
5516         }
5517         // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
5518         export function ChannelMonitor_clone(orig: number): number {
5519                 if(!isWasmInitialized) {
5520                         throw new Error("initializeWasm() must be awaited first!");
5521                 }
5522                 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
5523                 return nativeResponseValue;
5524         }
5525         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
5526         export function ChannelMonitor_write(obj: number): Uint8Array {
5527                 if(!isWasmInitialized) {
5528                         throw new Error("initializeWasm() must be awaited first!");
5529                 }
5530                 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
5531                 return decodeArray(nativeResponseValue);
5532         }
5533         // MUST_USE_RES struct LDKCResult_NoneMonitorUpdateErrorZ ChannelMonitor_update_monitor(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKChannelMonitorUpdate *NONNULL_PTR updates, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
5534         export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
5535                 if(!isWasmInitialized) {
5536                         throw new Error("initializeWasm() must be awaited first!");
5537                 }
5538                 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
5539                 return nativeResponseValue;
5540         }
5541         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5542         export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
5543                 if(!isWasmInitialized) {
5544                         throw new Error("initializeWasm() must be awaited first!");
5545                 }
5546                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
5547                 return nativeResponseValue;
5548         }
5549         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5550         export function ChannelMonitor_get_funding_txo(this_arg: number): number {
5551                 if(!isWasmInitialized) {
5552                         throw new Error("initializeWasm() must be awaited first!");
5553                 }
5554                 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
5555                 return nativeResponseValue;
5556         }
5557         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5558         export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
5559                 if(!isWasmInitialized) {
5560                         throw new Error("initializeWasm() must be awaited first!");
5561                 }
5562                 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
5563                 return nativeResponseValue;
5564         }
5565         // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
5566         export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
5567                 if(!isWasmInitialized) {
5568                         throw new Error("initializeWasm() must be awaited first!");
5569                 }
5570                 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
5571                 // debug statements here
5572         }
5573         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5574         export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
5575                 if(!isWasmInitialized) {
5576                         throw new Error("initializeWasm() must be awaited first!");
5577                 }
5578                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
5579                 return nativeResponseValue;
5580         }
5581         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
5582         export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
5583                 if(!isWasmInitialized) {
5584                         throw new Error("initializeWasm() must be awaited first!");
5585                 }
5586                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
5587                 return nativeResponseValue;
5588         }
5589         // 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);
5590         export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
5591                 if(!isWasmInitialized) {
5592                         throw new Error("initializeWasm() must be awaited first!");
5593                 }
5594                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
5595                 return nativeResponseValue;
5596         }
5597         // 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);
5598         export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
5599                 if(!isWasmInitialized) {
5600                         throw new Error("initializeWasm() must be awaited first!");
5601                 }
5602                 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
5603                 return nativeResponseValue;
5604         }
5605         // 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);
5606         export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
5607                 if(!isWasmInitialized) {
5608                         throw new Error("initializeWasm() must be awaited first!");
5609                 }
5610                 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
5611                 // debug statements here
5612         }
5613         // void Persist_free(struct LDKPersist this_ptr);
5614         export function Persist_free(this_ptr: number): void {
5615                 if(!isWasmInitialized) {
5616                         throw new Error("initializeWasm() must be awaited first!");
5617                 }
5618                 const nativeResponseValue = wasm.Persist_free(this_ptr);
5619                 // debug statements here
5620         }
5621         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
5622         export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
5623                 if(!isWasmInitialized) {
5624                         throw new Error("initializeWasm() must be awaited first!");
5625                 }
5626                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
5627                 return nativeResponseValue;
5628         }
5629         // void OutPoint_free(struct LDKOutPoint this_obj);
5630         export function OutPoint_free(this_obj: number): void {
5631                 if(!isWasmInitialized) {
5632                         throw new Error("initializeWasm() must be awaited first!");
5633                 }
5634                 const nativeResponseValue = wasm.OutPoint_free(this_obj);
5635                 // debug statements here
5636         }
5637         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
5638         export function OutPoint_get_txid(this_ptr: number): Uint8Array {
5639                 if(!isWasmInitialized) {
5640                         throw new Error("initializeWasm() must be awaited first!");
5641                 }
5642                 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
5643                 return decodeArray(nativeResponseValue);
5644         }
5645         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5646         export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
5647                 if(!isWasmInitialized) {
5648                         throw new Error("initializeWasm() must be awaited first!");
5649                 }
5650                 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
5651                 // debug statements here
5652         }
5653         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
5654         export function OutPoint_get_index(this_ptr: number): number {
5655                 if(!isWasmInitialized) {
5656                         throw new Error("initializeWasm() must be awaited first!");
5657                 }
5658                 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
5659                 return nativeResponseValue;
5660         }
5661         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
5662         export function OutPoint_set_index(this_ptr: number, val: number): void {
5663                 if(!isWasmInitialized) {
5664                         throw new Error("initializeWasm() must be awaited first!");
5665                 }
5666                 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
5667                 // debug statements here
5668         }
5669         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
5670         export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
5671                 if(!isWasmInitialized) {
5672                         throw new Error("initializeWasm() must be awaited first!");
5673                 }
5674                 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
5675                 return nativeResponseValue;
5676         }
5677         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
5678         export function OutPoint_clone(orig: number): number {
5679                 if(!isWasmInitialized) {
5680                         throw new Error("initializeWasm() must be awaited first!");
5681                 }
5682                 const nativeResponseValue = wasm.OutPoint_clone(orig);
5683                 return nativeResponseValue;
5684         }
5685         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
5686         export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
5687                 if(!isWasmInitialized) {
5688                         throw new Error("initializeWasm() must be awaited first!");
5689                 }
5690                 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
5691                 return decodeArray(nativeResponseValue);
5692         }
5693         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
5694         export function OutPoint_write(obj: number): Uint8Array {
5695                 if(!isWasmInitialized) {
5696                         throw new Error("initializeWasm() must be awaited first!");
5697                 }
5698                 const nativeResponseValue = wasm.OutPoint_write(obj);
5699                 return decodeArray(nativeResponseValue);
5700         }
5701         // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
5702         export function OutPoint_read(ser: Uint8Array): number {
5703                 if(!isWasmInitialized) {
5704                         throw new Error("initializeWasm() must be awaited first!");
5705                 }
5706                 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
5707                 return nativeResponseValue;
5708         }
5709         // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
5710         export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
5711                 if(!isWasmInitialized) {
5712                         throw new Error("initializeWasm() must be awaited first!");
5713                 }
5714                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
5715                 // debug statements here
5716         }
5717         // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5718         export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
5719                 if(!isWasmInitialized) {
5720                         throw new Error("initializeWasm() must be awaited first!");
5721                 }
5722                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
5723                 return nativeResponseValue;
5724         }
5725         // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5726         export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
5727                 if(!isWasmInitialized) {
5728                         throw new Error("initializeWasm() must be awaited first!");
5729                 }
5730                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
5731                 // debug statements here
5732         }
5733         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5734         export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
5735                 if(!isWasmInitialized) {
5736                         throw new Error("initializeWasm() must be awaited first!");
5737                 }
5738                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
5739                 return decodeArray(nativeResponseValue);
5740         }
5741         // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5742         export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
5743                 if(!isWasmInitialized) {
5744                         throw new Error("initializeWasm() must be awaited first!");
5745                 }
5746                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
5747                 // debug statements here
5748         }
5749         // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5750         export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
5751                 if(!isWasmInitialized) {
5752                         throw new Error("initializeWasm() must be awaited first!");
5753                 }
5754                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
5755                 return nativeResponseValue;
5756         }
5757         // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
5758         export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
5759                 if(!isWasmInitialized) {
5760                         throw new Error("initializeWasm() must be awaited first!");
5761                 }
5762                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
5763                 // debug statements here
5764         }
5765         // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
5766         export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
5767                 if(!isWasmInitialized) {
5768                         throw new Error("initializeWasm() must be awaited first!");
5769                 }
5770                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
5771                 // debug statements here
5772         }
5773         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5774         export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
5775                 if(!isWasmInitialized) {
5776                         throw new Error("initializeWasm() must be awaited first!");
5777                 }
5778                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
5779                 return decodeArray(nativeResponseValue);
5780         }
5781         // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
5782         export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
5783                 if(!isWasmInitialized) {
5784                         throw new Error("initializeWasm() must be awaited first!");
5785                 }
5786                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
5787                 // debug statements here
5788         }
5789         // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
5790         export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
5791                 if(!isWasmInitialized) {
5792                         throw new Error("initializeWasm() must be awaited first!");
5793                 }
5794                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
5795                 return decodeArray(nativeResponseValue);
5796         }
5797         // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5798         export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
5799                 if(!isWasmInitialized) {
5800                         throw new Error("initializeWasm() must be awaited first!");
5801                 }
5802                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
5803                 // debug statements here
5804         }
5805         // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5806         export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
5807                 if(!isWasmInitialized) {
5808                         throw new Error("initializeWasm() must be awaited first!");
5809                 }
5810                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
5811                 return nativeResponseValue;
5812         }
5813         // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
5814         export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
5815                 if(!isWasmInitialized) {
5816                         throw new Error("initializeWasm() must be awaited first!");
5817                 }
5818                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
5819                 // debug statements here
5820         }
5821         // 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);
5822         export function DelayedPaymentOutputDescriptor_new(outpoint_arg: number, per_commitment_point_arg: Uint8Array, to_self_delay_arg: number, output_arg: number, revocation_pubkey_arg: Uint8Array, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
5823                 if(!isWasmInitialized) {
5824                         throw new Error("initializeWasm() must be awaited first!");
5825                 }
5826                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_new(outpoint_arg, encodeArray(per_commitment_point_arg), to_self_delay_arg, output_arg, encodeArray(revocation_pubkey_arg), encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
5827                 return nativeResponseValue;
5828         }
5829         // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
5830         export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
5831                 if(!isWasmInitialized) {
5832                         throw new Error("initializeWasm() must be awaited first!");
5833                 }
5834                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
5835                 return nativeResponseValue;
5836         }
5837         // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
5838         export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
5839                 if(!isWasmInitialized) {
5840                         throw new Error("initializeWasm() must be awaited first!");
5841                 }
5842                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
5843                 // debug statements here
5844         }
5845         // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5846         export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
5847                 if(!isWasmInitialized) {
5848                         throw new Error("initializeWasm() must be awaited first!");
5849                 }
5850                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
5851                 return nativeResponseValue;
5852         }
5853         // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
5854         export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
5855                 if(!isWasmInitialized) {
5856                         throw new Error("initializeWasm() must be awaited first!");
5857                 }
5858                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
5859                 // debug statements here
5860         }
5861         // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
5862         export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
5863                 if(!isWasmInitialized) {
5864                         throw new Error("initializeWasm() must be awaited first!");
5865                 }
5866                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
5867                 // debug statements here
5868         }
5869         // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
5870         export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
5871                 if(!isWasmInitialized) {
5872                         throw new Error("initializeWasm() must be awaited first!");
5873                 }
5874                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
5875                 return decodeArray(nativeResponseValue);
5876         }
5877         // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
5878         export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
5879                 if(!isWasmInitialized) {
5880                         throw new Error("initializeWasm() must be awaited first!");
5881                 }
5882                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
5883                 // debug statements here
5884         }
5885         // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
5886         export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
5887                 if(!isWasmInitialized) {
5888                         throw new Error("initializeWasm() must be awaited first!");
5889                 }
5890                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
5891                 return nativeResponseValue;
5892         }
5893         // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
5894         export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
5895                 if(!isWasmInitialized) {
5896                         throw new Error("initializeWasm() must be awaited first!");
5897                 }
5898                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
5899                 // debug statements here
5900         }
5901         // 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);
5902         export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
5903                 if(!isWasmInitialized) {
5904                         throw new Error("initializeWasm() must be awaited first!");
5905                 }
5906                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
5907                 return nativeResponseValue;
5908         }
5909         // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
5910         export function StaticPaymentOutputDescriptor_clone(orig: number): number {
5911                 if(!isWasmInitialized) {
5912                         throw new Error("initializeWasm() must be awaited first!");
5913                 }
5914                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
5915                 return nativeResponseValue;
5916         }
5917         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
5918         export function SpendableOutputDescriptor_free(this_ptr: number): void {
5919                 if(!isWasmInitialized) {
5920                         throw new Error("initializeWasm() must be awaited first!");
5921                 }
5922                 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
5923                 // debug statements here
5924         }
5925         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
5926         export function SpendableOutputDescriptor_clone(orig: number): number {
5927                 if(!isWasmInitialized) {
5928                         throw new Error("initializeWasm() must be awaited first!");
5929                 }
5930                 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
5931                 return nativeResponseValue;
5932         }
5933         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
5934         export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
5935                 if(!isWasmInitialized) {
5936                         throw new Error("initializeWasm() must be awaited first!");
5937                 }
5938                 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
5939                 return decodeArray(nativeResponseValue);
5940         }
5941         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
5942         export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
5943                 if(!isWasmInitialized) {
5944                         throw new Error("initializeWasm() must be awaited first!");
5945                 }
5946                 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
5947                 return nativeResponseValue;
5948         }
5949         // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
5950         export function Sign_clone(orig: number): number {
5951                 if(!isWasmInitialized) {
5952                         throw new Error("initializeWasm() must be awaited first!");
5953                 }
5954                 const nativeResponseValue = wasm.Sign_clone(orig);
5955                 return nativeResponseValue;
5956         }
5957         // void Sign_free(struct LDKSign this_ptr);
5958         export function Sign_free(this_ptr: number): void {
5959                 if(!isWasmInitialized) {
5960                         throw new Error("initializeWasm() must be awaited first!");
5961                 }
5962                 const nativeResponseValue = wasm.Sign_free(this_ptr);
5963                 // debug statements here
5964         }
5965         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
5966         export function KeysInterface_free(this_ptr: number): void {
5967                 if(!isWasmInitialized) {
5968                         throw new Error("initializeWasm() must be awaited first!");
5969                 }
5970                 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
5971                 // debug statements here
5972         }
5973         // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
5974         export function InMemorySigner_free(this_obj: number): void {
5975                 if(!isWasmInitialized) {
5976                         throw new Error("initializeWasm() must be awaited first!");
5977                 }
5978                 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
5979                 // debug statements here
5980         }
5981         // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5982         export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
5983                 if(!isWasmInitialized) {
5984                         throw new Error("initializeWasm() must be awaited first!");
5985                 }
5986                 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
5987                 return decodeArray(nativeResponseValue);
5988         }
5989         // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
5990         export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
5991                 if(!isWasmInitialized) {
5992                         throw new Error("initializeWasm() must be awaited first!");
5993                 }
5994                 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
5995                 // debug statements here
5996         }
5997         // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
5998         export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
5999                 if(!isWasmInitialized) {
6000                         throw new Error("initializeWasm() must be awaited first!");
6001                 }
6002                 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
6003                 return decodeArray(nativeResponseValue);
6004         }
6005         // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
6006         export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
6007                 if(!isWasmInitialized) {
6008                         throw new Error("initializeWasm() must be awaited first!");
6009                 }
6010                 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
6011                 // debug statements here
6012         }
6013         // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
6014         export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
6015                 if(!isWasmInitialized) {
6016                         throw new Error("initializeWasm() must be awaited first!");
6017                 }
6018                 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
6019                 return decodeArray(nativeResponseValue);
6020         }
6021         // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
6022         export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
6023                 if(!isWasmInitialized) {
6024                         throw new Error("initializeWasm() must be awaited first!");
6025                 }
6026                 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
6027                 // debug statements here
6028         }
6029         // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
6030         export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
6031                 if(!isWasmInitialized) {
6032                         throw new Error("initializeWasm() must be awaited first!");
6033                 }
6034                 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
6035                 return decodeArray(nativeResponseValue);
6036         }
6037         // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
6038         export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
6039                 if(!isWasmInitialized) {
6040                         throw new Error("initializeWasm() must be awaited first!");
6041                 }
6042                 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
6043                 // debug statements here
6044         }
6045         // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
6046         export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
6047                 if(!isWasmInitialized) {
6048                         throw new Error("initializeWasm() must be awaited first!");
6049                 }
6050                 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
6051                 return decodeArray(nativeResponseValue);
6052         }
6053         // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
6054         export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
6055                 if(!isWasmInitialized) {
6056                         throw new Error("initializeWasm() must be awaited first!");
6057                 }
6058                 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
6059                 // debug statements here
6060         }
6061         // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
6062         export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
6063                 if(!isWasmInitialized) {
6064                         throw new Error("initializeWasm() must be awaited first!");
6065                 }
6066                 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
6067                 return decodeArray(nativeResponseValue);
6068         }
6069         // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6070         export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
6071                 if(!isWasmInitialized) {
6072                         throw new Error("initializeWasm() must be awaited first!");
6073                 }
6074                 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
6075                 // debug statements here
6076         }
6077         // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
6078         export function InMemorySigner_clone(orig: number): number {
6079                 if(!isWasmInitialized) {
6080                         throw new Error("initializeWasm() must be awaited first!");
6081                 }
6082                 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
6083                 return nativeResponseValue;
6084         }
6085         // 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);
6086         export function InMemorySigner_new(funding_key: Uint8Array, revocation_base_key: Uint8Array, payment_key: Uint8Array, delayed_payment_base_key: Uint8Array, htlc_base_key: Uint8Array, commitment_seed: Uint8Array, channel_value_satoshis: number, channel_keys_id: Uint8Array): number {
6087                 if(!isWasmInitialized) {
6088                         throw new Error("initializeWasm() must be awaited first!");
6089                 }
6090                 const nativeResponseValue = wasm.InMemorySigner_new(encodeArray(funding_key), encodeArray(revocation_base_key), encodeArray(payment_key), encodeArray(delayed_payment_base_key), encodeArray(htlc_base_key), encodeArray(commitment_seed), channel_value_satoshis, encodeArray(channel_keys_id));
6091                 return nativeResponseValue;
6092         }
6093         // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6094         export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
6095                 if(!isWasmInitialized) {
6096                         throw new Error("initializeWasm() must be awaited first!");
6097                 }
6098                 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
6099                 return nativeResponseValue;
6100         }
6101         // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6102         export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
6103                 if(!isWasmInitialized) {
6104                         throw new Error("initializeWasm() must be awaited first!");
6105                 }
6106                 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
6107                 return nativeResponseValue;
6108         }
6109         // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6110         export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
6111                 if(!isWasmInitialized) {
6112                         throw new Error("initializeWasm() must be awaited first!");
6113                 }
6114                 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
6115                 return nativeResponseValue;
6116         }
6117         // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6118         export function InMemorySigner_is_outbound(this_arg: number): boolean {
6119                 if(!isWasmInitialized) {
6120                         throw new Error("initializeWasm() must be awaited first!");
6121                 }
6122                 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
6123                 return nativeResponseValue;
6124         }
6125         // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6126         export function InMemorySigner_funding_outpoint(this_arg: number): number {
6127                 if(!isWasmInitialized) {
6128                         throw new Error("initializeWasm() must be awaited first!");
6129                 }
6130                 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
6131                 return nativeResponseValue;
6132         }
6133         // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6134         export function InMemorySigner_get_channel_parameters(this_arg: number): number {
6135                 if(!isWasmInitialized) {
6136                         throw new Error("initializeWasm() must be awaited first!");
6137                 }
6138                 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
6139                 return nativeResponseValue;
6140         }
6141         // 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);
6142         export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
6143                 if(!isWasmInitialized) {
6144                         throw new Error("initializeWasm() must be awaited first!");
6145                 }
6146                 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
6147                 return nativeResponseValue;
6148         }
6149         // 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);
6150         export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
6151                 if(!isWasmInitialized) {
6152                         throw new Error("initializeWasm() must be awaited first!");
6153                 }
6154                 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
6155                 return nativeResponseValue;
6156         }
6157         // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
6158         export function InMemorySigner_as_Sign(this_arg: number): number {
6159                 if(!isWasmInitialized) {
6160                         throw new Error("initializeWasm() must be awaited first!");
6161                 }
6162                 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
6163                 return nativeResponseValue;
6164         }
6165         // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
6166         export function InMemorySigner_write(obj: number): Uint8Array {
6167                 if(!isWasmInitialized) {
6168                         throw new Error("initializeWasm() must be awaited first!");
6169                 }
6170                 const nativeResponseValue = wasm.InMemorySigner_write(obj);
6171                 return decodeArray(nativeResponseValue);
6172         }
6173         // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
6174         export function InMemorySigner_read(ser: Uint8Array): number {
6175                 if(!isWasmInitialized) {
6176                         throw new Error("initializeWasm() must be awaited first!");
6177                 }
6178                 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
6179                 return nativeResponseValue;
6180         }
6181         // void KeysManager_free(struct LDKKeysManager this_obj);
6182         export function KeysManager_free(this_obj: number): void {
6183                 if(!isWasmInitialized) {
6184                         throw new Error("initializeWasm() must be awaited first!");
6185                 }
6186                 const nativeResponseValue = wasm.KeysManager_free(this_obj);
6187                 // debug statements here
6188         }
6189         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
6190         export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
6191                 if(!isWasmInitialized) {
6192                         throw new Error("initializeWasm() must be awaited first!");
6193                 }
6194                 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
6195                 return nativeResponseValue;
6196         }
6197         // 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]);
6198         export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
6199                 if(!isWasmInitialized) {
6200                         throw new Error("initializeWasm() must be awaited first!");
6201                 }
6202                 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
6203                 return nativeResponseValue;
6204         }
6205         // 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);
6206         export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
6207                 if(!isWasmInitialized) {
6208                         throw new Error("initializeWasm() must be awaited first!");
6209                 }
6210                 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
6211                 return nativeResponseValue;
6212         }
6213         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
6214         export function KeysManager_as_KeysInterface(this_arg: number): number {
6215                 if(!isWasmInitialized) {
6216                         throw new Error("initializeWasm() must be awaited first!");
6217                 }
6218                 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
6219                 return nativeResponseValue;
6220         }
6221         // void ChannelManager_free(struct LDKChannelManager this_obj);
6222         export function ChannelManager_free(this_obj: number): void {
6223                 if(!isWasmInitialized) {
6224                         throw new Error("initializeWasm() must be awaited first!");
6225                 }
6226                 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
6227                 // debug statements here
6228         }
6229         // void ChainParameters_free(struct LDKChainParameters this_obj);
6230         export function ChainParameters_free(this_obj: number): void {
6231                 if(!isWasmInitialized) {
6232                         throw new Error("initializeWasm() must be awaited first!");
6233                 }
6234                 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
6235                 // debug statements here
6236         }
6237         // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
6238         export function ChainParameters_get_network(this_ptr: number): LDKNetwork {
6239                 if(!isWasmInitialized) {
6240                         throw new Error("initializeWasm() must be awaited first!");
6241                 }
6242                 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
6243                 return nativeResponseValue;
6244         }
6245         // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
6246         export function ChainParameters_set_network(this_ptr: number, val: LDKNetwork): void {
6247                 if(!isWasmInitialized) {
6248                         throw new Error("initializeWasm() must be awaited first!");
6249                 }
6250                 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
6251                 // debug statements here
6252         }
6253         // const uint8_t (*ChainParameters_get_latest_hash(const struct LDKChainParameters *NONNULL_PTR this_ptr))[32];
6254         export function ChainParameters_get_latest_hash(this_ptr: number): Uint8Array {
6255                 if(!isWasmInitialized) {
6256                         throw new Error("initializeWasm() must be awaited first!");
6257                 }
6258                 const nativeResponseValue = wasm.ChainParameters_get_latest_hash(this_ptr);
6259                 return decodeArray(nativeResponseValue);
6260         }
6261         // void ChainParameters_set_latest_hash(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6262         export function ChainParameters_set_latest_hash(this_ptr: number, val: Uint8Array): void {
6263                 if(!isWasmInitialized) {
6264                         throw new Error("initializeWasm() must be awaited first!");
6265                 }
6266                 const nativeResponseValue = wasm.ChainParameters_set_latest_hash(this_ptr, encodeArray(val));
6267                 // debug statements here
6268         }
6269         // uintptr_t ChainParameters_get_latest_height(const struct LDKChainParameters *NONNULL_PTR this_ptr);
6270         export function ChainParameters_get_latest_height(this_ptr: number): number {
6271                 if(!isWasmInitialized) {
6272                         throw new Error("initializeWasm() must be awaited first!");
6273                 }
6274                 const nativeResponseValue = wasm.ChainParameters_get_latest_height(this_ptr);
6275                 return nativeResponseValue;
6276         }
6277         // void ChainParameters_set_latest_height(struct LDKChainParameters *NONNULL_PTR this_ptr, uintptr_t val);
6278         export function ChainParameters_set_latest_height(this_ptr: number, val: number): void {
6279                 if(!isWasmInitialized) {
6280                         throw new Error("initializeWasm() must be awaited first!");
6281                 }
6282                 const nativeResponseValue = wasm.ChainParameters_set_latest_height(this_ptr, val);
6283                 // debug statements here
6284         }
6285         // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKThirtyTwoBytes latest_hash_arg, uintptr_t latest_height_arg);
6286         export function ChainParameters_new(network_arg: LDKNetwork, latest_hash_arg: Uint8Array, latest_height_arg: number): number {
6287                 if(!isWasmInitialized) {
6288                         throw new Error("initializeWasm() must be awaited first!");
6289                 }
6290                 const nativeResponseValue = wasm.ChainParameters_new(network_arg, encodeArray(latest_hash_arg), latest_height_arg);
6291                 return nativeResponseValue;
6292         }
6293         // void ChannelDetails_free(struct LDKChannelDetails this_obj);
6294         export function ChannelDetails_free(this_obj: number): void {
6295                 if(!isWasmInitialized) {
6296                         throw new Error("initializeWasm() must be awaited first!");
6297                 }
6298                 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
6299                 // debug statements here
6300         }
6301         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
6302         export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
6303                 if(!isWasmInitialized) {
6304                         throw new Error("initializeWasm() must be awaited first!");
6305                 }
6306                 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
6307                 return decodeArray(nativeResponseValue);
6308         }
6309         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6310         export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
6311                 if(!isWasmInitialized) {
6312                         throw new Error("initializeWasm() must be awaited first!");
6313                 }
6314                 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
6315                 // debug statements here
6316         }
6317         // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6318         export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
6319                 if(!isWasmInitialized) {
6320                         throw new Error("initializeWasm() must be awaited first!");
6321                 }
6322                 const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
6323                 return nativeResponseValue;
6324         }
6325         // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
6326         export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
6327                 if(!isWasmInitialized) {
6328                         throw new Error("initializeWasm() must be awaited first!");
6329                 }
6330                 const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
6331                 // debug statements here
6332         }
6333         // struct LDKPublicKey ChannelDetails_get_remote_network_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6334         export function ChannelDetails_get_remote_network_id(this_ptr: number): Uint8Array {
6335                 if(!isWasmInitialized) {
6336                         throw new Error("initializeWasm() must be awaited first!");
6337                 }
6338                 const nativeResponseValue = wasm.ChannelDetails_get_remote_network_id(this_ptr);
6339                 return decodeArray(nativeResponseValue);
6340         }
6341         // void ChannelDetails_set_remote_network_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKPublicKey val);
6342         export function ChannelDetails_set_remote_network_id(this_ptr: number, val: Uint8Array): void {
6343                 if(!isWasmInitialized) {
6344                         throw new Error("initializeWasm() must be awaited first!");
6345                 }
6346                 const nativeResponseValue = wasm.ChannelDetails_set_remote_network_id(this_ptr, encodeArray(val));
6347                 // debug statements here
6348         }
6349         // struct LDKInitFeatures ChannelDetails_get_counterparty_features(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6350         export function ChannelDetails_get_counterparty_features(this_ptr: number): number {
6351                 if(!isWasmInitialized) {
6352                         throw new Error("initializeWasm() must be awaited first!");
6353                 }
6354                 const nativeResponseValue = wasm.ChannelDetails_get_counterparty_features(this_ptr);
6355                 return nativeResponseValue;
6356         }
6357         // void ChannelDetails_set_counterparty_features(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
6358         export function ChannelDetails_set_counterparty_features(this_ptr: number, val: number): void {
6359                 if(!isWasmInitialized) {
6360                         throw new Error("initializeWasm() must be awaited first!");
6361                 }
6362                 const nativeResponseValue = wasm.ChannelDetails_set_counterparty_features(this_ptr, val);
6363                 // debug statements here
6364         }
6365         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6366         export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
6367                 if(!isWasmInitialized) {
6368                         throw new Error("initializeWasm() must be awaited first!");
6369                 }
6370                 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
6371                 return nativeResponseValue;
6372         }
6373         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6374         export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
6375                 if(!isWasmInitialized) {
6376                         throw new Error("initializeWasm() must be awaited first!");
6377                 }
6378                 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
6379                 // debug statements here
6380         }
6381         // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6382         export function ChannelDetails_get_user_id(this_ptr: number): number {
6383                 if(!isWasmInitialized) {
6384                         throw new Error("initializeWasm() must be awaited first!");
6385                 }
6386                 const nativeResponseValue = wasm.ChannelDetails_get_user_id(this_ptr);
6387                 return nativeResponseValue;
6388         }
6389         // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6390         export function ChannelDetails_set_user_id(this_ptr: number, val: number): void {
6391                 if(!isWasmInitialized) {
6392                         throw new Error("initializeWasm() must be awaited first!");
6393                 }
6394                 const nativeResponseValue = wasm.ChannelDetails_set_user_id(this_ptr, val);
6395                 // debug statements here
6396         }
6397         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6398         export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
6399                 if(!isWasmInitialized) {
6400                         throw new Error("initializeWasm() must be awaited first!");
6401                 }
6402                 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
6403                 return nativeResponseValue;
6404         }
6405         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6406         export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
6407                 if(!isWasmInitialized) {
6408                         throw new Error("initializeWasm() must be awaited first!");
6409                 }
6410                 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
6411                 // debug statements here
6412         }
6413         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6414         export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
6415                 if(!isWasmInitialized) {
6416                         throw new Error("initializeWasm() must be awaited first!");
6417                 }
6418                 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
6419                 return nativeResponseValue;
6420         }
6421         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
6422         export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
6423                 if(!isWasmInitialized) {
6424                         throw new Error("initializeWasm() must be awaited first!");
6425                 }
6426                 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
6427                 // debug statements here
6428         }
6429         // bool ChannelDetails_get_is_live(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
6430         export function ChannelDetails_get_is_live(this_ptr: number): boolean {
6431                 if(!isWasmInitialized) {
6432                         throw new Error("initializeWasm() must be awaited first!");
6433                 }
6434                 const nativeResponseValue = wasm.ChannelDetails_get_is_live(this_ptr);
6435                 return nativeResponseValue;
6436         }
6437         // void ChannelDetails_set_is_live(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
6438         export function ChannelDetails_set_is_live(this_ptr: number, val: boolean): void {
6439                 if(!isWasmInitialized) {
6440                         throw new Error("initializeWasm() must be awaited first!");
6441                 }
6442                 const nativeResponseValue = wasm.ChannelDetails_set_is_live(this_ptr, val);
6443                 // debug statements here
6444         }
6445         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
6446         export function ChannelDetails_clone(orig: number): number {
6447                 if(!isWasmInitialized) {
6448                         throw new Error("initializeWasm() must be awaited first!");
6449                 }
6450                 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
6451                 return nativeResponseValue;
6452         }
6453         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
6454         export function PaymentSendFailure_free(this_ptr: number): void {
6455                 if(!isWasmInitialized) {
6456                         throw new Error("initializeWasm() must be awaited first!");
6457                 }
6458                 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
6459                 // debug statements here
6460         }
6461         // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
6462         export function PaymentSendFailure_clone(orig: number): number {
6463                 if(!isWasmInitialized) {
6464                         throw new Error("initializeWasm() must be awaited first!");
6465                 }
6466                 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
6467                 return nativeResponseValue;
6468         }
6469         // 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);
6470         export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
6471                 if(!isWasmInitialized) {
6472                         throw new Error("initializeWasm() must be awaited first!");
6473                 }
6474                 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
6475                 return nativeResponseValue;
6476         }
6477         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ 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_id, struct LDKUserConfig override_config);
6478         export function ChannelManager_create_channel(this_arg: number, their_network_key: Uint8Array, channel_value_satoshis: number, push_msat: number, user_id: number, override_config: number): number {
6479                 if(!isWasmInitialized) {
6480                         throw new Error("initializeWasm() must be awaited first!");
6481                 }
6482                 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_id, override_config);
6483                 return nativeResponseValue;
6484         }
6485         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6486         export function ChannelManager_list_channels(this_arg: number): number[] {
6487                 if(!isWasmInitialized) {
6488                         throw new Error("initializeWasm() must be awaited first!");
6489                 }
6490                 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
6491                 return nativeResponseValue;
6492         }
6493         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6494         export function ChannelManager_list_usable_channels(this_arg: number): number[] {
6495                 if(!isWasmInitialized) {
6496                         throw new Error("initializeWasm() must be awaited first!");
6497                 }
6498                 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
6499                 return nativeResponseValue;
6500         }
6501         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
6502         export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
6503                 if(!isWasmInitialized) {
6504                         throw new Error("initializeWasm() must be awaited first!");
6505                 }
6506                 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
6507                 return nativeResponseValue;
6508         }
6509         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
6510         export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
6511                 if(!isWasmInitialized) {
6512                         throw new Error("initializeWasm() must be awaited first!");
6513                 }
6514                 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
6515                 return nativeResponseValue;
6516         }
6517         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
6518         export function ChannelManager_force_close_all_channels(this_arg: number): void {
6519                 if(!isWasmInitialized) {
6520                         throw new Error("initializeWasm() must be awaited first!");
6521                 }
6522                 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
6523                 // debug statements here
6524         }
6525         // MUST_USE_RES struct LDKCResult_NonePaymentSendFailureZ ChannelManager_send_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret);
6526         export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
6527                 if(!isWasmInitialized) {
6528                         throw new Error("initializeWasm() must be awaited first!");
6529                 }
6530                 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
6531                 return nativeResponseValue;
6532         }
6533         // void ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKOutPoint funding_txo);
6534         export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_txo: number): void {
6535                 if(!isWasmInitialized) {
6536                         throw new Error("initializeWasm() must be awaited first!");
6537                 }
6538                 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), funding_txo);
6539                 // debug statements here
6540         }
6541         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
6542         export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
6543                 if(!isWasmInitialized) {
6544                         throw new Error("initializeWasm() must be awaited first!");
6545                 }
6546                 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
6547                 // debug statements here
6548         }
6549         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
6550         export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
6551                 if(!isWasmInitialized) {
6552                         throw new Error("initializeWasm() must be awaited first!");
6553                 }
6554                 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
6555                 // debug statements here
6556         }
6557         // void ChannelManager_timer_chan_freshness_every_min(const struct LDKChannelManager *NONNULL_PTR this_arg);
6558         export function ChannelManager_timer_chan_freshness_every_min(this_arg: number): void {
6559                 if(!isWasmInitialized) {
6560                         throw new Error("initializeWasm() must be awaited first!");
6561                 }
6562                 const nativeResponseValue = wasm.ChannelManager_timer_chan_freshness_every_min(this_arg);
6563                 // debug statements here
6564         }
6565         // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32], struct LDKThirtyTwoBytes payment_secret);
6566         export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array, payment_secret: Uint8Array): boolean {
6567                 if(!isWasmInitialized) {
6568                         throw new Error("initializeWasm() must be awaited first!");
6569                 }
6570                 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash), encodeArray(payment_secret));
6571                 return nativeResponseValue;
6572         }
6573         // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret, uint64_t expected_amount);
6574         export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array, payment_secret: Uint8Array, expected_amount: number): boolean {
6575                 if(!isWasmInitialized) {
6576                         throw new Error("initializeWasm() must be awaited first!");
6577                 }
6578                 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage), encodeArray(payment_secret), expected_amount);
6579                 return nativeResponseValue;
6580         }
6581         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
6582         export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
6583                 if(!isWasmInitialized) {
6584                         throw new Error("initializeWasm() must be awaited first!");
6585                 }
6586                 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
6587                 return decodeArray(nativeResponseValue);
6588         }
6589         // void ChannelManager_channel_monitor_updated(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKOutPoint *NONNULL_PTR funding_txo, uint64_t highest_applied_update_id);
6590         export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
6591                 if(!isWasmInitialized) {
6592                         throw new Error("initializeWasm() must be awaited first!");
6593                 }
6594                 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
6595                 // debug statements here
6596         }
6597         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
6598         export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
6599                 if(!isWasmInitialized) {
6600                         throw new Error("initializeWasm() must be awaited first!");
6601                 }
6602                 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
6603                 return nativeResponseValue;
6604         }
6605         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
6606         export function ChannelManager_as_EventsProvider(this_arg: number): number {
6607                 if(!isWasmInitialized) {
6608                         throw new Error("initializeWasm() must be awaited first!");
6609                 }
6610                 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
6611                 return nativeResponseValue;
6612         }
6613         // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
6614         export function ChannelManager_as_Listen(this_arg: number): number {
6615                 if(!isWasmInitialized) {
6616                         throw new Error("initializeWasm() must be awaited first!");
6617                 }
6618                 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
6619                 return nativeResponseValue;
6620         }
6621         // void ChannelManager_block_connected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
6622         export function ChannelManager_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
6623                 if(!isWasmInitialized) {
6624                         throw new Error("initializeWasm() must be awaited first!");
6625                 }
6626                 const nativeResponseValue = wasm.ChannelManager_block_connected(this_arg, encodeArray(header), txdata, height);
6627                 // debug statements here
6628         }
6629         // void ChannelManager_block_disconnected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80]);
6630         export function ChannelManager_block_disconnected(this_arg: number, header: Uint8Array): void {
6631                 if(!isWasmInitialized) {
6632                         throw new Error("initializeWasm() must be awaited first!");
6633                 }
6634                 const nativeResponseValue = wasm.ChannelManager_block_disconnected(this_arg, encodeArray(header));
6635                 // debug statements here
6636         }
6637         // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
6638         export function ChannelManager_await_persistable_update_timeout(this_arg: number, max_wait: number): boolean {
6639                 if(!isWasmInitialized) {
6640                         throw new Error("initializeWasm() must be awaited first!");
6641                 }
6642                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update_timeout(this_arg, max_wait);
6643                 return nativeResponseValue;
6644         }
6645         // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
6646         export function ChannelManager_await_persistable_update(this_arg: number): void {
6647                 if(!isWasmInitialized) {
6648                         throw new Error("initializeWasm() must be awaited first!");
6649                 }
6650                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
6651                 // debug statements here
6652         }
6653         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
6654         export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
6655                 if(!isWasmInitialized) {
6656                         throw new Error("initializeWasm() must be awaited first!");
6657                 }
6658                 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
6659                 return nativeResponseValue;
6660         }
6661         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
6662         export function ChannelManager_write(obj: number): Uint8Array {
6663                 if(!isWasmInitialized) {
6664                         throw new Error("initializeWasm() must be awaited first!");
6665                 }
6666                 const nativeResponseValue = wasm.ChannelManager_write(obj);
6667                 return decodeArray(nativeResponseValue);
6668         }
6669         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
6670         export function ChannelManagerReadArgs_free(this_obj: number): void {
6671                 if(!isWasmInitialized) {
6672                         throw new Error("initializeWasm() must be awaited first!");
6673                 }
6674                 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
6675                 // debug statements here
6676         }
6677         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6678         export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
6679                 if(!isWasmInitialized) {
6680                         throw new Error("initializeWasm() must be awaited first!");
6681                 }
6682                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
6683                 return nativeResponseValue;
6684         }
6685         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
6686         export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
6687                 if(!isWasmInitialized) {
6688                         throw new Error("initializeWasm() must be awaited first!");
6689                 }
6690                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
6691                 // debug statements here
6692         }
6693         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6694         export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
6695                 if(!isWasmInitialized) {
6696                         throw new Error("initializeWasm() must be awaited first!");
6697                 }
6698                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
6699                 return nativeResponseValue;
6700         }
6701         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
6702         export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
6703                 if(!isWasmInitialized) {
6704                         throw new Error("initializeWasm() must be awaited first!");
6705                 }
6706                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
6707                 // debug statements here
6708         }
6709         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6710         export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
6711                 if(!isWasmInitialized) {
6712                         throw new Error("initializeWasm() must be awaited first!");
6713                 }
6714                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
6715                 return nativeResponseValue;
6716         }
6717         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
6718         export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
6719                 if(!isWasmInitialized) {
6720                         throw new Error("initializeWasm() must be awaited first!");
6721                 }
6722                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
6723                 // debug statements here
6724         }
6725         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6726         export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
6727                 if(!isWasmInitialized) {
6728                         throw new Error("initializeWasm() must be awaited first!");
6729                 }
6730                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
6731                 return nativeResponseValue;
6732         }
6733         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
6734         export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
6735                 if(!isWasmInitialized) {
6736                         throw new Error("initializeWasm() must be awaited first!");
6737                 }
6738                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
6739                 // debug statements here
6740         }
6741         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6742         export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
6743                 if(!isWasmInitialized) {
6744                         throw new Error("initializeWasm() must be awaited first!");
6745                 }
6746                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
6747                 return nativeResponseValue;
6748         }
6749         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
6750         export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
6751                 if(!isWasmInitialized) {
6752                         throw new Error("initializeWasm() must be awaited first!");
6753                 }
6754                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
6755                 // debug statements here
6756         }
6757         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
6758         export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
6759                 if(!isWasmInitialized) {
6760                         throw new Error("initializeWasm() must be awaited first!");
6761                 }
6762                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
6763                 return nativeResponseValue;
6764         }
6765         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
6766         export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
6767                 if(!isWasmInitialized) {
6768                         throw new Error("initializeWasm() must be awaited first!");
6769                 }
6770                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
6771                 // debug statements here
6772         }
6773         // 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);
6774         export function ChannelManagerReadArgs_new(keys_manager: number, fee_estimator: number, chain_monitor: number, tx_broadcaster: number, logger: number, default_config: number, channel_monitors: number[]): number {
6775                 if(!isWasmInitialized) {
6776                         throw new Error("initializeWasm() must be awaited first!");
6777                 }
6778                 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
6779                 return nativeResponseValue;
6780         }
6781         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
6782         export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
6783                 if(!isWasmInitialized) {
6784                         throw new Error("initializeWasm() must be awaited first!");
6785                 }
6786                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
6787                 return nativeResponseValue;
6788         }
6789         // void DecodeError_free(struct LDKDecodeError this_obj);
6790         export function DecodeError_free(this_obj: number): void {
6791                 if(!isWasmInitialized) {
6792                         throw new Error("initializeWasm() must be awaited first!");
6793                 }
6794                 const nativeResponseValue = wasm.DecodeError_free(this_obj);
6795                 // debug statements here
6796         }
6797         // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
6798         export function DecodeError_clone(orig: number): number {
6799                 if(!isWasmInitialized) {
6800                         throw new Error("initializeWasm() must be awaited first!");
6801                 }
6802                 const nativeResponseValue = wasm.DecodeError_clone(orig);
6803                 return nativeResponseValue;
6804         }
6805         // void Init_free(struct LDKInit this_obj);
6806         export function Init_free(this_obj: number): void {
6807                 if(!isWasmInitialized) {
6808                         throw new Error("initializeWasm() must be awaited first!");
6809                 }
6810                 const nativeResponseValue = wasm.Init_free(this_obj);
6811                 // debug statements here
6812         }
6813         // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
6814         export function Init_get_features(this_ptr: number): number {
6815                 if(!isWasmInitialized) {
6816                         throw new Error("initializeWasm() must be awaited first!");
6817                 }
6818                 const nativeResponseValue = wasm.Init_get_features(this_ptr);
6819                 return nativeResponseValue;
6820         }
6821         // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
6822         export function Init_set_features(this_ptr: number, val: number): void {
6823                 if(!isWasmInitialized) {
6824                         throw new Error("initializeWasm() must be awaited first!");
6825                 }
6826                 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
6827                 // debug statements here
6828         }
6829         // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
6830         export function Init_new(features_arg: number): number {
6831                 if(!isWasmInitialized) {
6832                         throw new Error("initializeWasm() must be awaited first!");
6833                 }
6834                 const nativeResponseValue = wasm.Init_new(features_arg);
6835                 return nativeResponseValue;
6836         }
6837         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
6838         export function Init_clone(orig: number): number {
6839                 if(!isWasmInitialized) {
6840                         throw new Error("initializeWasm() must be awaited first!");
6841                 }
6842                 const nativeResponseValue = wasm.Init_clone(orig);
6843                 return nativeResponseValue;
6844         }
6845         // void ErrorMessage_free(struct LDKErrorMessage this_obj);
6846         export function ErrorMessage_free(this_obj: number): void {
6847                 if(!isWasmInitialized) {
6848                         throw new Error("initializeWasm() must be awaited first!");
6849                 }
6850                 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
6851                 // debug statements here
6852         }
6853         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
6854         export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
6855                 if(!isWasmInitialized) {
6856                         throw new Error("initializeWasm() must be awaited first!");
6857                 }
6858                 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
6859                 return decodeArray(nativeResponseValue);
6860         }
6861         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
6862         export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
6863                 if(!isWasmInitialized) {
6864                         throw new Error("initializeWasm() must be awaited first!");
6865                 }
6866                 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
6867                 // debug statements here
6868         }
6869         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
6870         export function ErrorMessage_get_data(this_ptr: number): String {
6871                 if(!isWasmInitialized) {
6872                         throw new Error("initializeWasm() must be awaited first!");
6873                 }
6874                 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
6875                 return nativeResponseValue;
6876         }
6877         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
6878         export function ErrorMessage_set_data(this_ptr: number, val: Uint8Array): void {
6879                 if(!isWasmInitialized) {
6880                         throw new Error("initializeWasm() must be awaited first!");
6881                 }
6882                 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, encodeArray(val));
6883                 // debug statements here
6884         }
6885         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg);
6886         export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: Uint8Array): number {
6887                 if(!isWasmInitialized) {
6888                         throw new Error("initializeWasm() must be awaited first!");
6889                 }
6890                 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), encodeArray(data_arg));
6891                 return nativeResponseValue;
6892         }
6893         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
6894         export function ErrorMessage_clone(orig: number): number {
6895                 if(!isWasmInitialized) {
6896                         throw new Error("initializeWasm() must be awaited first!");
6897                 }
6898                 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
6899                 return nativeResponseValue;
6900         }
6901         // void Ping_free(struct LDKPing this_obj);
6902         export function Ping_free(this_obj: number): void {
6903                 if(!isWasmInitialized) {
6904                         throw new Error("initializeWasm() must be awaited first!");
6905                 }
6906                 const nativeResponseValue = wasm.Ping_free(this_obj);
6907                 // debug statements here
6908         }
6909         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
6910         export function Ping_get_ponglen(this_ptr: number): number {
6911                 if(!isWasmInitialized) {
6912                         throw new Error("initializeWasm() must be awaited first!");
6913                 }
6914                 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
6915                 return nativeResponseValue;
6916         }
6917         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
6918         export function Ping_set_ponglen(this_ptr: number, val: number): void {
6919                 if(!isWasmInitialized) {
6920                         throw new Error("initializeWasm() must be awaited first!");
6921                 }
6922                 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
6923                 // debug statements here
6924         }
6925         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
6926         export function Ping_get_byteslen(this_ptr: number): number {
6927                 if(!isWasmInitialized) {
6928                         throw new Error("initializeWasm() must be awaited first!");
6929                 }
6930                 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
6931                 return nativeResponseValue;
6932         }
6933         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
6934         export function Ping_set_byteslen(this_ptr: number, val: number): void {
6935                 if(!isWasmInitialized) {
6936                         throw new Error("initializeWasm() must be awaited first!");
6937                 }
6938                 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
6939                 // debug statements here
6940         }
6941         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
6942         export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
6943                 if(!isWasmInitialized) {
6944                         throw new Error("initializeWasm() must be awaited first!");
6945                 }
6946                 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
6947                 return nativeResponseValue;
6948         }
6949         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
6950         export function Ping_clone(orig: number): number {
6951                 if(!isWasmInitialized) {
6952                         throw new Error("initializeWasm() must be awaited first!");
6953                 }
6954                 const nativeResponseValue = wasm.Ping_clone(orig);
6955                 return nativeResponseValue;
6956         }
6957         // void Pong_free(struct LDKPong this_obj);
6958         export function Pong_free(this_obj: number): void {
6959                 if(!isWasmInitialized) {
6960                         throw new Error("initializeWasm() must be awaited first!");
6961                 }
6962                 const nativeResponseValue = wasm.Pong_free(this_obj);
6963                 // debug statements here
6964         }
6965         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
6966         export function Pong_get_byteslen(this_ptr: number): number {
6967                 if(!isWasmInitialized) {
6968                         throw new Error("initializeWasm() must be awaited first!");
6969                 }
6970                 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
6971                 return nativeResponseValue;
6972         }
6973         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
6974         export function Pong_set_byteslen(this_ptr: number, val: number): void {
6975                 if(!isWasmInitialized) {
6976                         throw new Error("initializeWasm() must be awaited first!");
6977                 }
6978                 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
6979                 // debug statements here
6980         }
6981         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
6982         export function Pong_new(byteslen_arg: number): number {
6983                 if(!isWasmInitialized) {
6984                         throw new Error("initializeWasm() must be awaited first!");
6985                 }
6986                 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
6987                 return nativeResponseValue;
6988         }
6989         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
6990         export function Pong_clone(orig: number): number {
6991                 if(!isWasmInitialized) {
6992                         throw new Error("initializeWasm() must be awaited first!");
6993                 }
6994                 const nativeResponseValue = wasm.Pong_clone(orig);
6995                 return nativeResponseValue;
6996         }
6997         // void OpenChannel_free(struct LDKOpenChannel this_obj);
6998         export function OpenChannel_free(this_obj: number): void {
6999                 if(!isWasmInitialized) {
7000                         throw new Error("initializeWasm() must be awaited first!");
7001                 }
7002                 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
7003                 // debug statements here
7004         }
7005         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
7006         export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
7007                 if(!isWasmInitialized) {
7008                         throw new Error("initializeWasm() must be awaited first!");
7009                 }
7010                 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
7011                 return decodeArray(nativeResponseValue);
7012         }
7013         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7014         export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
7015                 if(!isWasmInitialized) {
7016                         throw new Error("initializeWasm() must be awaited first!");
7017                 }
7018                 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
7019                 // debug statements here
7020         }
7021         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
7022         export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
7023                 if(!isWasmInitialized) {
7024                         throw new Error("initializeWasm() must be awaited first!");
7025                 }
7026                 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
7027                 return decodeArray(nativeResponseValue);
7028         }
7029         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7030         export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
7031                 if(!isWasmInitialized) {
7032                         throw new Error("initializeWasm() must be awaited first!");
7033                 }
7034                 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
7035                 // debug statements here
7036         }
7037         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7038         export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
7039                 if(!isWasmInitialized) {
7040                         throw new Error("initializeWasm() must be awaited first!");
7041                 }
7042                 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
7043                 return nativeResponseValue;
7044         }
7045         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
7046         export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
7047                 if(!isWasmInitialized) {
7048                         throw new Error("initializeWasm() must be awaited first!");
7049                 }
7050                 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
7051                 // debug statements here
7052         }
7053         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7054         export function OpenChannel_get_push_msat(this_ptr: number): number {
7055                 if(!isWasmInitialized) {
7056                         throw new Error("initializeWasm() must be awaited first!");
7057                 }
7058                 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
7059                 return nativeResponseValue;
7060         }
7061         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
7062         export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
7063                 if(!isWasmInitialized) {
7064                         throw new Error("initializeWasm() must be awaited first!");
7065                 }
7066                 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
7067                 // debug statements here
7068         }
7069         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7070         export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
7071                 if(!isWasmInitialized) {
7072                         throw new Error("initializeWasm() must be awaited first!");
7073                 }
7074                 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
7075                 return nativeResponseValue;
7076         }
7077         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
7078         export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
7079                 if(!isWasmInitialized) {
7080                         throw new Error("initializeWasm() must be awaited first!");
7081                 }
7082                 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
7083                 // debug statements here
7084         }
7085         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7086         export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
7087                 if(!isWasmInitialized) {
7088                         throw new Error("initializeWasm() must be awaited first!");
7089                 }
7090                 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
7091                 return nativeResponseValue;
7092         }
7093         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
7094         export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
7095                 if(!isWasmInitialized) {
7096                         throw new Error("initializeWasm() must be awaited first!");
7097                 }
7098                 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
7099                 // debug statements here
7100         }
7101         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7102         export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
7103                 if(!isWasmInitialized) {
7104                         throw new Error("initializeWasm() must be awaited first!");
7105                 }
7106                 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
7107                 return nativeResponseValue;
7108         }
7109         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
7110         export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
7111                 if(!isWasmInitialized) {
7112                         throw new Error("initializeWasm() must be awaited first!");
7113                 }
7114                 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
7115                 // debug statements here
7116         }
7117         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7118         export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
7119                 if(!isWasmInitialized) {
7120                         throw new Error("initializeWasm() must be awaited first!");
7121                 }
7122                 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
7123                 return nativeResponseValue;
7124         }
7125         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
7126         export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
7127                 if(!isWasmInitialized) {
7128                         throw new Error("initializeWasm() must be awaited first!");
7129                 }
7130                 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
7131                 // debug statements here
7132         }
7133         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7134         export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
7135                 if(!isWasmInitialized) {
7136                         throw new Error("initializeWasm() must be awaited first!");
7137                 }
7138                 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
7139                 return nativeResponseValue;
7140         }
7141         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
7142         export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
7143                 if(!isWasmInitialized) {
7144                         throw new Error("initializeWasm() must be awaited first!");
7145                 }
7146                 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
7147                 // debug statements here
7148         }
7149         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7150         export function OpenChannel_get_to_self_delay(this_ptr: number): number {
7151                 if(!isWasmInitialized) {
7152                         throw new Error("initializeWasm() must be awaited first!");
7153                 }
7154                 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
7155                 return nativeResponseValue;
7156         }
7157         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
7158         export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
7159                 if(!isWasmInitialized) {
7160                         throw new Error("initializeWasm() must be awaited first!");
7161                 }
7162                 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
7163                 // debug statements here
7164         }
7165         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7166         export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
7167                 if(!isWasmInitialized) {
7168                         throw new Error("initializeWasm() must be awaited first!");
7169                 }
7170                 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
7171                 return nativeResponseValue;
7172         }
7173         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
7174         export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
7175                 if(!isWasmInitialized) {
7176                         throw new Error("initializeWasm() must be awaited first!");
7177                 }
7178                 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
7179                 // debug statements here
7180         }
7181         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7182         export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
7183                 if(!isWasmInitialized) {
7184                         throw new Error("initializeWasm() must be awaited first!");
7185                 }
7186                 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
7187                 return decodeArray(nativeResponseValue);
7188         }
7189         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7190         export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
7191                 if(!isWasmInitialized) {
7192                         throw new Error("initializeWasm() must be awaited first!");
7193                 }
7194                 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
7195                 // debug statements here
7196         }
7197         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7198         export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
7199                 if(!isWasmInitialized) {
7200                         throw new Error("initializeWasm() must be awaited first!");
7201                 }
7202                 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
7203                 return decodeArray(nativeResponseValue);
7204         }
7205         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7206         export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
7207                 if(!isWasmInitialized) {
7208                         throw new Error("initializeWasm() must be awaited first!");
7209                 }
7210                 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
7211                 // debug statements here
7212         }
7213         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7214         export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
7215                 if(!isWasmInitialized) {
7216                         throw new Error("initializeWasm() must be awaited first!");
7217                 }
7218                 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
7219                 return decodeArray(nativeResponseValue);
7220         }
7221         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7222         export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
7223                 if(!isWasmInitialized) {
7224                         throw new Error("initializeWasm() must be awaited first!");
7225                 }
7226                 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
7227                 // debug statements here
7228         }
7229         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7230         export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
7231                 if(!isWasmInitialized) {
7232                         throw new Error("initializeWasm() must be awaited first!");
7233                 }
7234                 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
7235                 return decodeArray(nativeResponseValue);
7236         }
7237         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7238         export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
7239                 if(!isWasmInitialized) {
7240                         throw new Error("initializeWasm() must be awaited first!");
7241                 }
7242                 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
7243                 // debug statements here
7244         }
7245         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7246         export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
7247                 if(!isWasmInitialized) {
7248                         throw new Error("initializeWasm() must be awaited first!");
7249                 }
7250                 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
7251                 return decodeArray(nativeResponseValue);
7252         }
7253         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7254         export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
7255                 if(!isWasmInitialized) {
7256                         throw new Error("initializeWasm() must be awaited first!");
7257                 }
7258                 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
7259                 // debug statements here
7260         }
7261         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7262         export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
7263                 if(!isWasmInitialized) {
7264                         throw new Error("initializeWasm() must be awaited first!");
7265                 }
7266                 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
7267                 return decodeArray(nativeResponseValue);
7268         }
7269         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7270         export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7271                 if(!isWasmInitialized) {
7272                         throw new Error("initializeWasm() must be awaited first!");
7273                 }
7274                 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
7275                 // debug statements here
7276         }
7277         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
7278         export function OpenChannel_get_channel_flags(this_ptr: number): number {
7279                 if(!isWasmInitialized) {
7280                         throw new Error("initializeWasm() must be awaited first!");
7281                 }
7282                 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
7283                 return nativeResponseValue;
7284         }
7285         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
7286         export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
7287                 if(!isWasmInitialized) {
7288                         throw new Error("initializeWasm() must be awaited first!");
7289                 }
7290                 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
7291                 // debug statements here
7292         }
7293         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
7294         export function OpenChannel_clone(orig: number): number {
7295                 if(!isWasmInitialized) {
7296                         throw new Error("initializeWasm() must be awaited first!");
7297                 }
7298                 const nativeResponseValue = wasm.OpenChannel_clone(orig);
7299                 return nativeResponseValue;
7300         }
7301         // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
7302         export function AcceptChannel_free(this_obj: number): void {
7303                 if(!isWasmInitialized) {
7304                         throw new Error("initializeWasm() must be awaited first!");
7305                 }
7306                 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
7307                 // debug statements here
7308         }
7309         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
7310         export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
7311                 if(!isWasmInitialized) {
7312                         throw new Error("initializeWasm() must be awaited first!");
7313                 }
7314                 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
7315                 return decodeArray(nativeResponseValue);
7316         }
7317         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7318         export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
7319                 if(!isWasmInitialized) {
7320                         throw new Error("initializeWasm() must be awaited first!");
7321                 }
7322                 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
7323                 // debug statements here
7324         }
7325         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7326         export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
7327                 if(!isWasmInitialized) {
7328                         throw new Error("initializeWasm() must be awaited first!");
7329                 }
7330                 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
7331                 return nativeResponseValue;
7332         }
7333         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7334         export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
7335                 if(!isWasmInitialized) {
7336                         throw new Error("initializeWasm() must be awaited first!");
7337                 }
7338                 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
7339                 // debug statements here
7340         }
7341         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7342         export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
7343                 if(!isWasmInitialized) {
7344                         throw new Error("initializeWasm() must be awaited first!");
7345                 }
7346                 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
7347                 return nativeResponseValue;
7348         }
7349         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7350         export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
7351                 if(!isWasmInitialized) {
7352                         throw new Error("initializeWasm() must be awaited first!");
7353                 }
7354                 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
7355                 // debug statements here
7356         }
7357         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7358         export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
7359                 if(!isWasmInitialized) {
7360                         throw new Error("initializeWasm() must be awaited first!");
7361                 }
7362                 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
7363                 return nativeResponseValue;
7364         }
7365         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7366         export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
7367                 if(!isWasmInitialized) {
7368                         throw new Error("initializeWasm() must be awaited first!");
7369                 }
7370                 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
7371                 // debug statements here
7372         }
7373         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7374         export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
7375                 if(!isWasmInitialized) {
7376                         throw new Error("initializeWasm() must be awaited first!");
7377                 }
7378                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
7379                 return nativeResponseValue;
7380         }
7381         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
7382         export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
7383                 if(!isWasmInitialized) {
7384                         throw new Error("initializeWasm() must be awaited first!");
7385                 }
7386                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
7387                 // debug statements here
7388         }
7389         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7390         export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
7391                 if(!isWasmInitialized) {
7392                         throw new Error("initializeWasm() must be awaited first!");
7393                 }
7394                 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
7395                 return nativeResponseValue;
7396         }
7397         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
7398         export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
7399                 if(!isWasmInitialized) {
7400                         throw new Error("initializeWasm() must be awaited first!");
7401                 }
7402                 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
7403                 // debug statements here
7404         }
7405         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7406         export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
7407                 if(!isWasmInitialized) {
7408                         throw new Error("initializeWasm() must be awaited first!");
7409                 }
7410                 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
7411                 return nativeResponseValue;
7412         }
7413         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
7414         export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
7415                 if(!isWasmInitialized) {
7416                         throw new Error("initializeWasm() must be awaited first!");
7417                 }
7418                 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
7419                 // debug statements here
7420         }
7421         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7422         export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
7423                 if(!isWasmInitialized) {
7424                         throw new Error("initializeWasm() must be awaited first!");
7425                 }
7426                 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
7427                 return nativeResponseValue;
7428         }
7429         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
7430         export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
7431                 if(!isWasmInitialized) {
7432                         throw new Error("initializeWasm() must be awaited first!");
7433                 }
7434                 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
7435                 // debug statements here
7436         }
7437         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7438         export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
7439                 if(!isWasmInitialized) {
7440                         throw new Error("initializeWasm() must be awaited first!");
7441                 }
7442                 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
7443                 return decodeArray(nativeResponseValue);
7444         }
7445         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7446         export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
7447                 if(!isWasmInitialized) {
7448                         throw new Error("initializeWasm() must be awaited first!");
7449                 }
7450                 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
7451                 // debug statements here
7452         }
7453         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7454         export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
7455                 if(!isWasmInitialized) {
7456                         throw new Error("initializeWasm() must be awaited first!");
7457                 }
7458                 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
7459                 return decodeArray(nativeResponseValue);
7460         }
7461         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7462         export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
7463                 if(!isWasmInitialized) {
7464                         throw new Error("initializeWasm() must be awaited first!");
7465                 }
7466                 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
7467                 // debug statements here
7468         }
7469         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7470         export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
7471                 if(!isWasmInitialized) {
7472                         throw new Error("initializeWasm() must be awaited first!");
7473                 }
7474                 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
7475                 return decodeArray(nativeResponseValue);
7476         }
7477         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7478         export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
7479                 if(!isWasmInitialized) {
7480                         throw new Error("initializeWasm() must be awaited first!");
7481                 }
7482                 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
7483                 // debug statements here
7484         }
7485         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7486         export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
7487                 if(!isWasmInitialized) {
7488                         throw new Error("initializeWasm() must be awaited first!");
7489                 }
7490                 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
7491                 return decodeArray(nativeResponseValue);
7492         }
7493         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7494         export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
7495                 if(!isWasmInitialized) {
7496                         throw new Error("initializeWasm() must be awaited first!");
7497                 }
7498                 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
7499                 // debug statements here
7500         }
7501         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7502         export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
7503                 if(!isWasmInitialized) {
7504                         throw new Error("initializeWasm() must be awaited first!");
7505                 }
7506                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
7507                 return decodeArray(nativeResponseValue);
7508         }
7509         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7510         export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
7511                 if(!isWasmInitialized) {
7512                         throw new Error("initializeWasm() must be awaited first!");
7513                 }
7514                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
7515                 // debug statements here
7516         }
7517         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
7518         export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
7519                 if(!isWasmInitialized) {
7520                         throw new Error("initializeWasm() must be awaited first!");
7521                 }
7522                 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
7523                 return decodeArray(nativeResponseValue);
7524         }
7525         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7526         export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7527                 if(!isWasmInitialized) {
7528                         throw new Error("initializeWasm() must be awaited first!");
7529                 }
7530                 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
7531                 // debug statements here
7532         }
7533         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
7534         export function AcceptChannel_clone(orig: number): number {
7535                 if(!isWasmInitialized) {
7536                         throw new Error("initializeWasm() must be awaited first!");
7537                 }
7538                 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
7539                 return nativeResponseValue;
7540         }
7541         // void FundingCreated_free(struct LDKFundingCreated this_obj);
7542         export function FundingCreated_free(this_obj: number): void {
7543                 if(!isWasmInitialized) {
7544                         throw new Error("initializeWasm() must be awaited first!");
7545                 }
7546                 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
7547                 // debug statements here
7548         }
7549         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
7550         export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
7551                 if(!isWasmInitialized) {
7552                         throw new Error("initializeWasm() must be awaited first!");
7553                 }
7554                 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
7555                 return decodeArray(nativeResponseValue);
7556         }
7557         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7558         export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
7559                 if(!isWasmInitialized) {
7560                         throw new Error("initializeWasm() must be awaited first!");
7561                 }
7562                 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
7563                 // debug statements here
7564         }
7565         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
7566         export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
7567                 if(!isWasmInitialized) {
7568                         throw new Error("initializeWasm() must be awaited first!");
7569                 }
7570                 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
7571                 return decodeArray(nativeResponseValue);
7572         }
7573         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7574         export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
7575                 if(!isWasmInitialized) {
7576                         throw new Error("initializeWasm() must be awaited first!");
7577                 }
7578                 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
7579                 // debug statements here
7580         }
7581         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
7582         export function FundingCreated_get_funding_output_index(this_ptr: number): number {
7583                 if(!isWasmInitialized) {
7584                         throw new Error("initializeWasm() must be awaited first!");
7585                 }
7586                 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
7587                 return nativeResponseValue;
7588         }
7589         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
7590         export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
7591                 if(!isWasmInitialized) {
7592                         throw new Error("initializeWasm() must be awaited first!");
7593                 }
7594                 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
7595                 // debug statements here
7596         }
7597         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
7598         export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
7599                 if(!isWasmInitialized) {
7600                         throw new Error("initializeWasm() must be awaited first!");
7601                 }
7602                 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
7603                 return decodeArray(nativeResponseValue);
7604         }
7605         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
7606         export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
7607                 if(!isWasmInitialized) {
7608                         throw new Error("initializeWasm() must be awaited first!");
7609                 }
7610                 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
7611                 // debug statements here
7612         }
7613         // 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);
7614         export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
7615                 if(!isWasmInitialized) {
7616                         throw new Error("initializeWasm() must be awaited first!");
7617                 }
7618                 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
7619                 return nativeResponseValue;
7620         }
7621         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
7622         export function FundingCreated_clone(orig: number): number {
7623                 if(!isWasmInitialized) {
7624                         throw new Error("initializeWasm() must be awaited first!");
7625                 }
7626                 const nativeResponseValue = wasm.FundingCreated_clone(orig);
7627                 return nativeResponseValue;
7628         }
7629         // void FundingSigned_free(struct LDKFundingSigned this_obj);
7630         export function FundingSigned_free(this_obj: number): void {
7631                 if(!isWasmInitialized) {
7632                         throw new Error("initializeWasm() must be awaited first!");
7633                 }
7634                 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
7635                 // debug statements here
7636         }
7637         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
7638         export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
7639                 if(!isWasmInitialized) {
7640                         throw new Error("initializeWasm() must be awaited first!");
7641                 }
7642                 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
7643                 return decodeArray(nativeResponseValue);
7644         }
7645         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7646         export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7647                 if(!isWasmInitialized) {
7648                         throw new Error("initializeWasm() must be awaited first!");
7649                 }
7650                 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
7651                 // debug statements here
7652         }
7653         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
7654         export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
7655                 if(!isWasmInitialized) {
7656                         throw new Error("initializeWasm() must be awaited first!");
7657                 }
7658                 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
7659                 return decodeArray(nativeResponseValue);
7660         }
7661         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7662         export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7663                 if(!isWasmInitialized) {
7664                         throw new Error("initializeWasm() must be awaited first!");
7665                 }
7666                 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
7667                 // debug statements here
7668         }
7669         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
7670         export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
7671                 if(!isWasmInitialized) {
7672                         throw new Error("initializeWasm() must be awaited first!");
7673                 }
7674                 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
7675                 return nativeResponseValue;
7676         }
7677         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
7678         export function FundingSigned_clone(orig: number): number {
7679                 if(!isWasmInitialized) {
7680                         throw new Error("initializeWasm() must be awaited first!");
7681                 }
7682                 const nativeResponseValue = wasm.FundingSigned_clone(orig);
7683                 return nativeResponseValue;
7684         }
7685         // void FundingLocked_free(struct LDKFundingLocked this_obj);
7686         export function FundingLocked_free(this_obj: number): void {
7687                 if(!isWasmInitialized) {
7688                         throw new Error("initializeWasm() must be awaited first!");
7689                 }
7690                 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
7691                 // debug statements here
7692         }
7693         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
7694         export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
7695                 if(!isWasmInitialized) {
7696                         throw new Error("initializeWasm() must be awaited first!");
7697                 }
7698                 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
7699                 return decodeArray(nativeResponseValue);
7700         }
7701         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7702         export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
7703                 if(!isWasmInitialized) {
7704                         throw new Error("initializeWasm() must be awaited first!");
7705                 }
7706                 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
7707                 // debug statements here
7708         }
7709         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
7710         export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
7711                 if(!isWasmInitialized) {
7712                         throw new Error("initializeWasm() must be awaited first!");
7713                 }
7714                 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
7715                 return decodeArray(nativeResponseValue);
7716         }
7717         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
7718         export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
7719                 if(!isWasmInitialized) {
7720                         throw new Error("initializeWasm() must be awaited first!");
7721                 }
7722                 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
7723                 // debug statements here
7724         }
7725         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
7726         export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
7727                 if(!isWasmInitialized) {
7728                         throw new Error("initializeWasm() must be awaited first!");
7729                 }
7730                 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
7731                 return nativeResponseValue;
7732         }
7733         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
7734         export function FundingLocked_clone(orig: number): number {
7735                 if(!isWasmInitialized) {
7736                         throw new Error("initializeWasm() must be awaited first!");
7737                 }
7738                 const nativeResponseValue = wasm.FundingLocked_clone(orig);
7739                 return nativeResponseValue;
7740         }
7741         // void Shutdown_free(struct LDKShutdown this_obj);
7742         export function Shutdown_free(this_obj: number): void {
7743                 if(!isWasmInitialized) {
7744                         throw new Error("initializeWasm() must be awaited first!");
7745                 }
7746                 const nativeResponseValue = wasm.Shutdown_free(this_obj);
7747                 // debug statements here
7748         }
7749         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
7750         export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
7751                 if(!isWasmInitialized) {
7752                         throw new Error("initializeWasm() must be awaited first!");
7753                 }
7754                 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
7755                 return decodeArray(nativeResponseValue);
7756         }
7757         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7758         export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
7759                 if(!isWasmInitialized) {
7760                         throw new Error("initializeWasm() must be awaited first!");
7761                 }
7762                 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
7763                 // debug statements here
7764         }
7765         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
7766         export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
7767                 if(!isWasmInitialized) {
7768                         throw new Error("initializeWasm() must be awaited first!");
7769                 }
7770                 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
7771                 return decodeArray(nativeResponseValue);
7772         }
7773         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
7774         export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
7775                 if(!isWasmInitialized) {
7776                         throw new Error("initializeWasm() must be awaited first!");
7777                 }
7778                 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
7779                 // debug statements here
7780         }
7781         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
7782         export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
7783                 if(!isWasmInitialized) {
7784                         throw new Error("initializeWasm() must be awaited first!");
7785                 }
7786                 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
7787                 return nativeResponseValue;
7788         }
7789         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
7790         export function Shutdown_clone(orig: number): number {
7791                 if(!isWasmInitialized) {
7792                         throw new Error("initializeWasm() must be awaited first!");
7793                 }
7794                 const nativeResponseValue = wasm.Shutdown_clone(orig);
7795                 return nativeResponseValue;
7796         }
7797         // void ClosingSigned_free(struct LDKClosingSigned this_obj);
7798         export function ClosingSigned_free(this_obj: number): void {
7799                 if(!isWasmInitialized) {
7800                         throw new Error("initializeWasm() must be awaited first!");
7801                 }
7802                 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
7803                 // debug statements here
7804         }
7805         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
7806         export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
7807                 if(!isWasmInitialized) {
7808                         throw new Error("initializeWasm() must be awaited first!");
7809                 }
7810                 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
7811                 return decodeArray(nativeResponseValue);
7812         }
7813         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7814         export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
7815                 if(!isWasmInitialized) {
7816                         throw new Error("initializeWasm() must be awaited first!");
7817                 }
7818                 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
7819                 // debug statements here
7820         }
7821         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
7822         export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
7823                 if(!isWasmInitialized) {
7824                         throw new Error("initializeWasm() must be awaited first!");
7825                 }
7826                 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
7827                 return nativeResponseValue;
7828         }
7829         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
7830         export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
7831                 if(!isWasmInitialized) {
7832                         throw new Error("initializeWasm() must be awaited first!");
7833                 }
7834                 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
7835                 // debug statements here
7836         }
7837         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
7838         export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
7839                 if(!isWasmInitialized) {
7840                         throw new Error("initializeWasm() must be awaited first!");
7841                 }
7842                 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
7843                 return decodeArray(nativeResponseValue);
7844         }
7845         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
7846         export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
7847                 if(!isWasmInitialized) {
7848                         throw new Error("initializeWasm() must be awaited first!");
7849                 }
7850                 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
7851                 // debug statements here
7852         }
7853         // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg);
7854         export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array): number {
7855                 if(!isWasmInitialized) {
7856                         throw new Error("initializeWasm() must be awaited first!");
7857                 }
7858                 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg));
7859                 return nativeResponseValue;
7860         }
7861         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
7862         export function ClosingSigned_clone(orig: number): number {
7863                 if(!isWasmInitialized) {
7864                         throw new Error("initializeWasm() must be awaited first!");
7865                 }
7866                 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
7867                 return nativeResponseValue;
7868         }
7869         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
7870         export function UpdateAddHTLC_free(this_obj: number): void {
7871                 if(!isWasmInitialized) {
7872                         throw new Error("initializeWasm() must be awaited first!");
7873                 }
7874                 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
7875                 // debug statements here
7876         }
7877         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
7878         export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
7879                 if(!isWasmInitialized) {
7880                         throw new Error("initializeWasm() must be awaited first!");
7881                 }
7882                 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
7883                 return decodeArray(nativeResponseValue);
7884         }
7885         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7886         export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7887                 if(!isWasmInitialized) {
7888                         throw new Error("initializeWasm() must be awaited first!");
7889                 }
7890                 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
7891                 // debug statements here
7892         }
7893         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7894         export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
7895                 if(!isWasmInitialized) {
7896                         throw new Error("initializeWasm() must be awaited first!");
7897                 }
7898                 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
7899                 return nativeResponseValue;
7900         }
7901         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
7902         export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
7903                 if(!isWasmInitialized) {
7904                         throw new Error("initializeWasm() must be awaited first!");
7905                 }
7906                 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
7907                 // debug statements here
7908         }
7909         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7910         export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
7911                 if(!isWasmInitialized) {
7912                         throw new Error("initializeWasm() must be awaited first!");
7913                 }
7914                 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
7915                 return nativeResponseValue;
7916         }
7917         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
7918         export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
7919                 if(!isWasmInitialized) {
7920                         throw new Error("initializeWasm() must be awaited first!");
7921                 }
7922                 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
7923                 // debug statements here
7924         }
7925         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
7926         export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
7927                 if(!isWasmInitialized) {
7928                         throw new Error("initializeWasm() must be awaited first!");
7929                 }
7930                 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
7931                 return decodeArray(nativeResponseValue);
7932         }
7933         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7934         export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
7935                 if(!isWasmInitialized) {
7936                         throw new Error("initializeWasm() must be awaited first!");
7937                 }
7938                 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
7939                 // debug statements here
7940         }
7941         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
7942         export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
7943                 if(!isWasmInitialized) {
7944                         throw new Error("initializeWasm() must be awaited first!");
7945                 }
7946                 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
7947                 return nativeResponseValue;
7948         }
7949         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
7950         export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
7951                 if(!isWasmInitialized) {
7952                         throw new Error("initializeWasm() must be awaited first!");
7953                 }
7954                 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
7955                 // debug statements here
7956         }
7957         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
7958         export function UpdateAddHTLC_clone(orig: number): number {
7959                 if(!isWasmInitialized) {
7960                         throw new Error("initializeWasm() must be awaited first!");
7961                 }
7962                 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
7963                 return nativeResponseValue;
7964         }
7965         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
7966         export function UpdateFulfillHTLC_free(this_obj: number): void {
7967                 if(!isWasmInitialized) {
7968                         throw new Error("initializeWasm() must be awaited first!");
7969                 }
7970                 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
7971                 // debug statements here
7972         }
7973         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
7974         export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
7975                 if(!isWasmInitialized) {
7976                         throw new Error("initializeWasm() must be awaited first!");
7977                 }
7978                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
7979                 return decodeArray(nativeResponseValue);
7980         }
7981         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7982         export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
7983                 if(!isWasmInitialized) {
7984                         throw new Error("initializeWasm() must be awaited first!");
7985                 }
7986                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
7987                 // debug statements here
7988         }
7989         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
7990         export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
7991                 if(!isWasmInitialized) {
7992                         throw new Error("initializeWasm() must be awaited first!");
7993                 }
7994                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
7995                 return nativeResponseValue;
7996         }
7997         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
7998         export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
7999                 if(!isWasmInitialized) {
8000                         throw new Error("initializeWasm() must be awaited first!");
8001                 }
8002                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
8003                 // debug statements here
8004         }
8005         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
8006         export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
8007                 if(!isWasmInitialized) {
8008                         throw new Error("initializeWasm() must be awaited first!");
8009                 }
8010                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
8011                 return decodeArray(nativeResponseValue);
8012         }
8013         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8014         export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
8015                 if(!isWasmInitialized) {
8016                         throw new Error("initializeWasm() must be awaited first!");
8017                 }
8018                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
8019                 // debug statements here
8020         }
8021         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
8022         export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
8023                 if(!isWasmInitialized) {
8024                         throw new Error("initializeWasm() must be awaited first!");
8025                 }
8026                 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
8027                 return nativeResponseValue;
8028         }
8029         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
8030         export function UpdateFulfillHTLC_clone(orig: number): number {
8031                 if(!isWasmInitialized) {
8032                         throw new Error("initializeWasm() must be awaited first!");
8033                 }
8034                 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
8035                 return nativeResponseValue;
8036         }
8037         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
8038         export function UpdateFailHTLC_free(this_obj: number): void {
8039                 if(!isWasmInitialized) {
8040                         throw new Error("initializeWasm() must be awaited first!");
8041                 }
8042                 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
8043                 // debug statements here
8044         }
8045         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
8046         export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
8047                 if(!isWasmInitialized) {
8048                         throw new Error("initializeWasm() must be awaited first!");
8049                 }
8050                 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
8051                 return decodeArray(nativeResponseValue);
8052         }
8053         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8054         export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
8055                 if(!isWasmInitialized) {
8056                         throw new Error("initializeWasm() must be awaited first!");
8057                 }
8058                 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
8059                 // debug statements here
8060         }
8061         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
8062         export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
8063                 if(!isWasmInitialized) {
8064                         throw new Error("initializeWasm() must be awaited first!");
8065                 }
8066                 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
8067                 return nativeResponseValue;
8068         }
8069         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
8070         export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
8071                 if(!isWasmInitialized) {
8072                         throw new Error("initializeWasm() must be awaited first!");
8073                 }
8074                 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
8075                 // debug statements here
8076         }
8077         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
8078         export function UpdateFailHTLC_clone(orig: number): number {
8079                 if(!isWasmInitialized) {
8080                         throw new Error("initializeWasm() must be awaited first!");
8081                 }
8082                 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
8083                 return nativeResponseValue;
8084         }
8085         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
8086         export function UpdateFailMalformedHTLC_free(this_obj: number): void {
8087                 if(!isWasmInitialized) {
8088                         throw new Error("initializeWasm() must be awaited first!");
8089                 }
8090                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
8091                 // debug statements here
8092         }
8093         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
8094         export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
8095                 if(!isWasmInitialized) {
8096                         throw new Error("initializeWasm() must be awaited first!");
8097                 }
8098                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
8099                 return decodeArray(nativeResponseValue);
8100         }
8101         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8102         export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
8103                 if(!isWasmInitialized) {
8104                         throw new Error("initializeWasm() must be awaited first!");
8105                 }
8106                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
8107                 // debug statements here
8108         }
8109         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
8110         export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
8111                 if(!isWasmInitialized) {
8112                         throw new Error("initializeWasm() must be awaited first!");
8113                 }
8114                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
8115                 return nativeResponseValue;
8116         }
8117         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
8118         export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
8119                 if(!isWasmInitialized) {
8120                         throw new Error("initializeWasm() must be awaited first!");
8121                 }
8122                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
8123                 // debug statements here
8124         }
8125         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
8126         export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
8127                 if(!isWasmInitialized) {
8128                         throw new Error("initializeWasm() must be awaited first!");
8129                 }
8130                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
8131                 return nativeResponseValue;
8132         }
8133         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
8134         export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
8135                 if(!isWasmInitialized) {
8136                         throw new Error("initializeWasm() must be awaited first!");
8137                 }
8138                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
8139                 // debug statements here
8140         }
8141         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
8142         export function UpdateFailMalformedHTLC_clone(orig: number): number {
8143                 if(!isWasmInitialized) {
8144                         throw new Error("initializeWasm() must be awaited first!");
8145                 }
8146                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
8147                 return nativeResponseValue;
8148         }
8149         // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
8150         export function CommitmentSigned_free(this_obj: number): void {
8151                 if(!isWasmInitialized) {
8152                         throw new Error("initializeWasm() must be awaited first!");
8153                 }
8154                 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
8155                 // debug statements here
8156         }
8157         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
8158         export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
8159                 if(!isWasmInitialized) {
8160                         throw new Error("initializeWasm() must be awaited first!");
8161                 }
8162                 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
8163                 return decodeArray(nativeResponseValue);
8164         }
8165         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8166         export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
8167                 if(!isWasmInitialized) {
8168                         throw new Error("initializeWasm() must be awaited first!");
8169                 }
8170                 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
8171                 // debug statements here
8172         }
8173         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
8174         export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
8175                 if(!isWasmInitialized) {
8176                         throw new Error("initializeWasm() must be awaited first!");
8177                 }
8178                 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
8179                 return decodeArray(nativeResponseValue);
8180         }
8181         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
8182         export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
8183                 if(!isWasmInitialized) {
8184                         throw new Error("initializeWasm() must be awaited first!");
8185                 }
8186                 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
8187                 // debug statements here
8188         }
8189         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
8190         export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
8191                 if(!isWasmInitialized) {
8192                         throw new Error("initializeWasm() must be awaited first!");
8193                 }
8194                 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
8195                 // debug statements here
8196         }
8197         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
8198         export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
8199                 if(!isWasmInitialized) {
8200                         throw new Error("initializeWasm() must be awaited first!");
8201                 }
8202                 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
8203                 return nativeResponseValue;
8204         }
8205         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
8206         export function CommitmentSigned_clone(orig: number): number {
8207                 if(!isWasmInitialized) {
8208                         throw new Error("initializeWasm() must be awaited first!");
8209                 }
8210                 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
8211                 return nativeResponseValue;
8212         }
8213         // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
8214         export function RevokeAndACK_free(this_obj: number): void {
8215                 if(!isWasmInitialized) {
8216                         throw new Error("initializeWasm() must be awaited first!");
8217                 }
8218                 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
8219                 // debug statements here
8220         }
8221         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
8222         export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
8223                 if(!isWasmInitialized) {
8224                         throw new Error("initializeWasm() must be awaited first!");
8225                 }
8226                 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
8227                 return decodeArray(nativeResponseValue);
8228         }
8229         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8230         export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
8231                 if(!isWasmInitialized) {
8232                         throw new Error("initializeWasm() must be awaited first!");
8233                 }
8234                 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
8235                 // debug statements here
8236         }
8237         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
8238         export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
8239                 if(!isWasmInitialized) {
8240                         throw new Error("initializeWasm() must be awaited first!");
8241                 }
8242                 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
8243                 return decodeArray(nativeResponseValue);
8244         }
8245         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8246         export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
8247                 if(!isWasmInitialized) {
8248                         throw new Error("initializeWasm() must be awaited first!");
8249                 }
8250                 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
8251                 // debug statements here
8252         }
8253         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
8254         export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
8255                 if(!isWasmInitialized) {
8256                         throw new Error("initializeWasm() must be awaited first!");
8257                 }
8258                 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
8259                 return decodeArray(nativeResponseValue);
8260         }
8261         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8262         export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8263                 if(!isWasmInitialized) {
8264                         throw new Error("initializeWasm() must be awaited first!");
8265                 }
8266                 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
8267                 // debug statements here
8268         }
8269         // 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);
8270         export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
8271                 if(!isWasmInitialized) {
8272                         throw new Error("initializeWasm() must be awaited first!");
8273                 }
8274                 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
8275                 return nativeResponseValue;
8276         }
8277         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
8278         export function RevokeAndACK_clone(orig: number): number {
8279                 if(!isWasmInitialized) {
8280                         throw new Error("initializeWasm() must be awaited first!");
8281                 }
8282                 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
8283                 return nativeResponseValue;
8284         }
8285         // void UpdateFee_free(struct LDKUpdateFee this_obj);
8286         export function UpdateFee_free(this_obj: number): void {
8287                 if(!isWasmInitialized) {
8288                         throw new Error("initializeWasm() must be awaited first!");
8289                 }
8290                 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
8291                 // debug statements here
8292         }
8293         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
8294         export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
8295                 if(!isWasmInitialized) {
8296                         throw new Error("initializeWasm() must be awaited first!");
8297                 }
8298                 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
8299                 return decodeArray(nativeResponseValue);
8300         }
8301         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8302         export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
8303                 if(!isWasmInitialized) {
8304                         throw new Error("initializeWasm() must be awaited first!");
8305                 }
8306                 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
8307                 // debug statements here
8308         }
8309         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
8310         export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
8311                 if(!isWasmInitialized) {
8312                         throw new Error("initializeWasm() must be awaited first!");
8313                 }
8314                 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
8315                 return nativeResponseValue;
8316         }
8317         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
8318         export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
8319                 if(!isWasmInitialized) {
8320                         throw new Error("initializeWasm() must be awaited first!");
8321                 }
8322                 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
8323                 // debug statements here
8324         }
8325         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
8326         export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
8327                 if(!isWasmInitialized) {
8328                         throw new Error("initializeWasm() must be awaited first!");
8329                 }
8330                 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
8331                 return nativeResponseValue;
8332         }
8333         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
8334         export function UpdateFee_clone(orig: number): number {
8335                 if(!isWasmInitialized) {
8336                         throw new Error("initializeWasm() must be awaited first!");
8337                 }
8338                 const nativeResponseValue = wasm.UpdateFee_clone(orig);
8339                 return nativeResponseValue;
8340         }
8341         // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
8342         export function DataLossProtect_free(this_obj: number): void {
8343                 if(!isWasmInitialized) {
8344                         throw new Error("initializeWasm() must be awaited first!");
8345                 }
8346                 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
8347                 // debug statements here
8348         }
8349         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
8350         export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
8351                 if(!isWasmInitialized) {
8352                         throw new Error("initializeWasm() must be awaited first!");
8353                 }
8354                 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
8355                 return decodeArray(nativeResponseValue);
8356         }
8357         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8358         export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
8359                 if(!isWasmInitialized) {
8360                         throw new Error("initializeWasm() must be awaited first!");
8361                 }
8362                 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
8363                 // debug statements here
8364         }
8365         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
8366         export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
8367                 if(!isWasmInitialized) {
8368                         throw new Error("initializeWasm() must be awaited first!");
8369                 }
8370                 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
8371                 return decodeArray(nativeResponseValue);
8372         }
8373         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8374         export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8375                 if(!isWasmInitialized) {
8376                         throw new Error("initializeWasm() must be awaited first!");
8377                 }
8378                 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
8379                 // debug statements here
8380         }
8381         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
8382         export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
8383                 if(!isWasmInitialized) {
8384                         throw new Error("initializeWasm() must be awaited first!");
8385                 }
8386                 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
8387                 return nativeResponseValue;
8388         }
8389         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
8390         export function DataLossProtect_clone(orig: number): number {
8391                 if(!isWasmInitialized) {
8392                         throw new Error("initializeWasm() must be awaited first!");
8393                 }
8394                 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
8395                 return nativeResponseValue;
8396         }
8397         // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
8398         export function ChannelReestablish_free(this_obj: number): void {
8399                 if(!isWasmInitialized) {
8400                         throw new Error("initializeWasm() must be awaited first!");
8401                 }
8402                 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
8403                 // debug statements here
8404         }
8405         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
8406         export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
8407                 if(!isWasmInitialized) {
8408                         throw new Error("initializeWasm() must be awaited first!");
8409                 }
8410                 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
8411                 return decodeArray(nativeResponseValue);
8412         }
8413         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8414         export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
8415                 if(!isWasmInitialized) {
8416                         throw new Error("initializeWasm() must be awaited first!");
8417                 }
8418                 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
8419                 // debug statements here
8420         }
8421         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
8422         export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
8423                 if(!isWasmInitialized) {
8424                         throw new Error("initializeWasm() must be awaited first!");
8425                 }
8426                 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
8427                 return nativeResponseValue;
8428         }
8429         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
8430         export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
8431                 if(!isWasmInitialized) {
8432                         throw new Error("initializeWasm() must be awaited first!");
8433                 }
8434                 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
8435                 // debug statements here
8436         }
8437         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
8438         export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
8439                 if(!isWasmInitialized) {
8440                         throw new Error("initializeWasm() must be awaited first!");
8441                 }
8442                 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
8443                 return nativeResponseValue;
8444         }
8445         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
8446         export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
8447                 if(!isWasmInitialized) {
8448                         throw new Error("initializeWasm() must be awaited first!");
8449                 }
8450                 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
8451                 // debug statements here
8452         }
8453         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
8454         export function ChannelReestablish_clone(orig: number): number {
8455                 if(!isWasmInitialized) {
8456                         throw new Error("initializeWasm() must be awaited first!");
8457                 }
8458                 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
8459                 return nativeResponseValue;
8460         }
8461         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
8462         export function AnnouncementSignatures_free(this_obj: number): void {
8463                 if(!isWasmInitialized) {
8464                         throw new Error("initializeWasm() must be awaited first!");
8465                 }
8466                 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
8467                 // debug statements here
8468         }
8469         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
8470         export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
8471                 if(!isWasmInitialized) {
8472                         throw new Error("initializeWasm() must be awaited first!");
8473                 }
8474                 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
8475                 return decodeArray(nativeResponseValue);
8476         }
8477         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8478         export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
8479                 if(!isWasmInitialized) {
8480                         throw new Error("initializeWasm() must be awaited first!");
8481                 }
8482                 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
8483                 // debug statements here
8484         }
8485         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8486         export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
8487                 if(!isWasmInitialized) {
8488                         throw new Error("initializeWasm() must be awaited first!");
8489                 }
8490                 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
8491                 return nativeResponseValue;
8492         }
8493         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
8494         export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
8495                 if(!isWasmInitialized) {
8496                         throw new Error("initializeWasm() must be awaited first!");
8497                 }
8498                 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
8499                 // debug statements here
8500         }
8501         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8502         export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
8503                 if(!isWasmInitialized) {
8504                         throw new Error("initializeWasm() must be awaited first!");
8505                 }
8506                 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
8507                 return decodeArray(nativeResponseValue);
8508         }
8509         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
8510         export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
8511                 if(!isWasmInitialized) {
8512                         throw new Error("initializeWasm() must be awaited first!");
8513                 }
8514                 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
8515                 // debug statements here
8516         }
8517         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
8518         export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
8519                 if(!isWasmInitialized) {
8520                         throw new Error("initializeWasm() must be awaited first!");
8521                 }
8522                 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
8523                 return decodeArray(nativeResponseValue);
8524         }
8525         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
8526         export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
8527                 if(!isWasmInitialized) {
8528                         throw new Error("initializeWasm() must be awaited first!");
8529                 }
8530                 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
8531                 // debug statements here
8532         }
8533         // 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);
8534         export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
8535                 if(!isWasmInitialized) {
8536                         throw new Error("initializeWasm() must be awaited first!");
8537                 }
8538                 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
8539                 return nativeResponseValue;
8540         }
8541         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
8542         export function AnnouncementSignatures_clone(orig: number): number {
8543                 if(!isWasmInitialized) {
8544                         throw new Error("initializeWasm() must be awaited first!");
8545                 }
8546                 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
8547                 return nativeResponseValue;
8548         }
8549         // void NetAddress_free(struct LDKNetAddress this_ptr);
8550         export function NetAddress_free(this_ptr: number): void {
8551                 if(!isWasmInitialized) {
8552                         throw new Error("initializeWasm() must be awaited first!");
8553                 }
8554                 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
8555                 // debug statements here
8556         }
8557         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
8558         export function NetAddress_clone(orig: number): number {
8559                 if(!isWasmInitialized) {
8560                         throw new Error("initializeWasm() must be awaited first!");
8561                 }
8562                 const nativeResponseValue = wasm.NetAddress_clone(orig);
8563                 return nativeResponseValue;
8564         }
8565         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
8566         export function NetAddress_write(obj: number): Uint8Array {
8567                 if(!isWasmInitialized) {
8568                         throw new Error("initializeWasm() must be awaited first!");
8569                 }
8570                 const nativeResponseValue = wasm.NetAddress_write(obj);
8571                 return decodeArray(nativeResponseValue);
8572         }
8573         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
8574         export function Result_read(ser: Uint8Array): number {
8575                 if(!isWasmInitialized) {
8576                         throw new Error("initializeWasm() must be awaited first!");
8577                 }
8578                 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
8579                 return nativeResponseValue;
8580         }
8581         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
8582         export function UnsignedNodeAnnouncement_free(this_obj: number): void {
8583                 if(!isWasmInitialized) {
8584                         throw new Error("initializeWasm() must be awaited first!");
8585                 }
8586                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
8587                 // debug statements here
8588         }
8589         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8590         export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
8591                 if(!isWasmInitialized) {
8592                         throw new Error("initializeWasm() must be awaited first!");
8593                 }
8594                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
8595                 return nativeResponseValue;
8596         }
8597         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
8598         export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
8599                 if(!isWasmInitialized) {
8600                         throw new Error("initializeWasm() must be awaited first!");
8601                 }
8602                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
8603                 // debug statements here
8604         }
8605         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8606         export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
8607                 if(!isWasmInitialized) {
8608                         throw new Error("initializeWasm() must be awaited first!");
8609                 }
8610                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
8611                 return nativeResponseValue;
8612         }
8613         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
8614         export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
8615                 if(!isWasmInitialized) {
8616                         throw new Error("initializeWasm() must be awaited first!");
8617                 }
8618                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
8619                 // debug statements here
8620         }
8621         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
8622         export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
8623                 if(!isWasmInitialized) {
8624                         throw new Error("initializeWasm() must be awaited first!");
8625                 }
8626                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
8627                 return decodeArray(nativeResponseValue);
8628         }
8629         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8630         export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
8631                 if(!isWasmInitialized) {
8632                         throw new Error("initializeWasm() must be awaited first!");
8633                 }
8634                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
8635                 // debug statements here
8636         }
8637         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
8638         export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
8639                 if(!isWasmInitialized) {
8640                         throw new Error("initializeWasm() must be awaited first!");
8641                 }
8642                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
8643                 return decodeArray(nativeResponseValue);
8644         }
8645         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
8646         export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
8647                 if(!isWasmInitialized) {
8648                         throw new Error("initializeWasm() must be awaited first!");
8649                 }
8650                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
8651                 // debug statements here
8652         }
8653         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
8654         export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
8655                 if(!isWasmInitialized) {
8656                         throw new Error("initializeWasm() must be awaited first!");
8657                 }
8658                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
8659                 return decodeArray(nativeResponseValue);
8660         }
8661         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8662         export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
8663                 if(!isWasmInitialized) {
8664                         throw new Error("initializeWasm() must be awaited first!");
8665                 }
8666                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
8667                 // debug statements here
8668         }
8669         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
8670         export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
8671                 if(!isWasmInitialized) {
8672                         throw new Error("initializeWasm() must be awaited first!");
8673                 }
8674                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
8675                 // debug statements here
8676         }
8677         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
8678         export function UnsignedNodeAnnouncement_clone(orig: number): number {
8679                 if(!isWasmInitialized) {
8680                         throw new Error("initializeWasm() must be awaited first!");
8681                 }
8682                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
8683                 return nativeResponseValue;
8684         }
8685         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
8686         export function NodeAnnouncement_free(this_obj: number): void {
8687                 if(!isWasmInitialized) {
8688                         throw new Error("initializeWasm() must be awaited first!");
8689                 }
8690                 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
8691                 // debug statements here
8692         }
8693         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
8694         export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
8695                 if(!isWasmInitialized) {
8696                         throw new Error("initializeWasm() must be awaited first!");
8697                 }
8698                 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
8699                 return decodeArray(nativeResponseValue);
8700         }
8701         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8702         export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
8703                 if(!isWasmInitialized) {
8704                         throw new Error("initializeWasm() must be awaited first!");
8705                 }
8706                 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
8707                 // debug statements here
8708         }
8709         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
8710         export function NodeAnnouncement_get_contents(this_ptr: number): number {
8711                 if(!isWasmInitialized) {
8712                         throw new Error("initializeWasm() must be awaited first!");
8713                 }
8714                 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
8715                 return nativeResponseValue;
8716         }
8717         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
8718         export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
8719                 if(!isWasmInitialized) {
8720                         throw new Error("initializeWasm() must be awaited first!");
8721                 }
8722                 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
8723                 // debug statements here
8724         }
8725         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
8726         export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
8727                 if(!isWasmInitialized) {
8728                         throw new Error("initializeWasm() must be awaited first!");
8729                 }
8730                 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
8731                 return nativeResponseValue;
8732         }
8733         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
8734         export function NodeAnnouncement_clone(orig: number): number {
8735                 if(!isWasmInitialized) {
8736                         throw new Error("initializeWasm() must be awaited first!");
8737                 }
8738                 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
8739                 return nativeResponseValue;
8740         }
8741         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
8742         export function UnsignedChannelAnnouncement_free(this_obj: number): void {
8743                 if(!isWasmInitialized) {
8744                         throw new Error("initializeWasm() must be awaited first!");
8745                 }
8746                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
8747                 // debug statements here
8748         }
8749         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8750         export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
8751                 if(!isWasmInitialized) {
8752                         throw new Error("initializeWasm() must be awaited first!");
8753                 }
8754                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
8755                 return nativeResponseValue;
8756         }
8757         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
8758         export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
8759                 if(!isWasmInitialized) {
8760                         throw new Error("initializeWasm() must be awaited first!");
8761                 }
8762                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
8763                 // debug statements here
8764         }
8765         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
8766         export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
8767                 if(!isWasmInitialized) {
8768                         throw new Error("initializeWasm() must be awaited first!");
8769                 }
8770                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
8771                 return decodeArray(nativeResponseValue);
8772         }
8773         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8774         export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8775                 if(!isWasmInitialized) {
8776                         throw new Error("initializeWasm() must be awaited first!");
8777                 }
8778                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
8779                 // debug statements here
8780         }
8781         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8782         export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
8783                 if(!isWasmInitialized) {
8784                         throw new Error("initializeWasm() must be awaited first!");
8785                 }
8786                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
8787                 return nativeResponseValue;
8788         }
8789         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
8790         export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
8791                 if(!isWasmInitialized) {
8792                         throw new Error("initializeWasm() must be awaited first!");
8793                 }
8794                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
8795                 // debug statements here
8796         }
8797         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8798         export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
8799                 if(!isWasmInitialized) {
8800                         throw new Error("initializeWasm() must be awaited first!");
8801                 }
8802                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
8803                 return decodeArray(nativeResponseValue);
8804         }
8805         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8806         export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
8807                 if(!isWasmInitialized) {
8808                         throw new Error("initializeWasm() must be awaited first!");
8809                 }
8810                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
8811                 // debug statements here
8812         }
8813         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8814         export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
8815                 if(!isWasmInitialized) {
8816                         throw new Error("initializeWasm() must be awaited first!");
8817                 }
8818                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
8819                 return decodeArray(nativeResponseValue);
8820         }
8821         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8822         export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
8823                 if(!isWasmInitialized) {
8824                         throw new Error("initializeWasm() must be awaited first!");
8825                 }
8826                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
8827                 // debug statements here
8828         }
8829         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8830         export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
8831                 if(!isWasmInitialized) {
8832                         throw new Error("initializeWasm() must be awaited first!");
8833                 }
8834                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
8835                 return decodeArray(nativeResponseValue);
8836         }
8837         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8838         export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
8839                 if(!isWasmInitialized) {
8840                         throw new Error("initializeWasm() must be awaited first!");
8841                 }
8842                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
8843                 // debug statements here
8844         }
8845         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
8846         export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
8847                 if(!isWasmInitialized) {
8848                         throw new Error("initializeWasm() must be awaited first!");
8849                 }
8850                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
8851                 return decodeArray(nativeResponseValue);
8852         }
8853         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8854         export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
8855                 if(!isWasmInitialized) {
8856                         throw new Error("initializeWasm() must be awaited first!");
8857                 }
8858                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
8859                 // debug statements here
8860         }
8861         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
8862         export function UnsignedChannelAnnouncement_clone(orig: number): number {
8863                 if(!isWasmInitialized) {
8864                         throw new Error("initializeWasm() must be awaited first!");
8865                 }
8866                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
8867                 return nativeResponseValue;
8868         }
8869         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
8870         export function ChannelAnnouncement_free(this_obj: number): void {
8871                 if(!isWasmInitialized) {
8872                         throw new Error("initializeWasm() must be awaited first!");
8873                 }
8874                 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
8875                 // debug statements here
8876         }
8877         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8878         export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
8879                 if(!isWasmInitialized) {
8880                         throw new Error("initializeWasm() must be awaited first!");
8881                 }
8882                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
8883                 return decodeArray(nativeResponseValue);
8884         }
8885         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8886         export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
8887                 if(!isWasmInitialized) {
8888                         throw new Error("initializeWasm() must be awaited first!");
8889                 }
8890                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
8891                 // debug statements here
8892         }
8893         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8894         export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
8895                 if(!isWasmInitialized) {
8896                         throw new Error("initializeWasm() must be awaited first!");
8897                 }
8898                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
8899                 return decodeArray(nativeResponseValue);
8900         }
8901         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8902         export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
8903                 if(!isWasmInitialized) {
8904                         throw new Error("initializeWasm() must be awaited first!");
8905                 }
8906                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
8907                 // debug statements here
8908         }
8909         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8910         export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
8911                 if(!isWasmInitialized) {
8912                         throw new Error("initializeWasm() must be awaited first!");
8913                 }
8914                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
8915                 return decodeArray(nativeResponseValue);
8916         }
8917         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8918         export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
8919                 if(!isWasmInitialized) {
8920                         throw new Error("initializeWasm() must be awaited first!");
8921                 }
8922                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
8923                 // debug statements here
8924         }
8925         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8926         export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
8927                 if(!isWasmInitialized) {
8928                         throw new Error("initializeWasm() must be awaited first!");
8929                 }
8930                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
8931                 return decodeArray(nativeResponseValue);
8932         }
8933         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
8934         export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
8935                 if(!isWasmInitialized) {
8936                         throw new Error("initializeWasm() must be awaited first!");
8937                 }
8938                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
8939                 // debug statements here
8940         }
8941         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
8942         export function ChannelAnnouncement_get_contents(this_ptr: number): number {
8943                 if(!isWasmInitialized) {
8944                         throw new Error("initializeWasm() must be awaited first!");
8945                 }
8946                 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
8947                 return nativeResponseValue;
8948         }
8949         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
8950         export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
8951                 if(!isWasmInitialized) {
8952                         throw new Error("initializeWasm() must be awaited first!");
8953                 }
8954                 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
8955                 // debug statements here
8956         }
8957         // 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);
8958         export function ChannelAnnouncement_new(node_signature_1_arg: Uint8Array, node_signature_2_arg: Uint8Array, bitcoin_signature_1_arg: Uint8Array, bitcoin_signature_2_arg: Uint8Array, contents_arg: number): number {
8959                 if(!isWasmInitialized) {
8960                         throw new Error("initializeWasm() must be awaited first!");
8961                 }
8962                 const nativeResponseValue = wasm.ChannelAnnouncement_new(encodeArray(node_signature_1_arg), encodeArray(node_signature_2_arg), encodeArray(bitcoin_signature_1_arg), encodeArray(bitcoin_signature_2_arg), contents_arg);
8963                 return nativeResponseValue;
8964         }
8965         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
8966         export function ChannelAnnouncement_clone(orig: number): number {
8967                 if(!isWasmInitialized) {
8968                         throw new Error("initializeWasm() must be awaited first!");
8969                 }
8970                 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
8971                 return nativeResponseValue;
8972         }
8973         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
8974         export function UnsignedChannelUpdate_free(this_obj: number): void {
8975                 if(!isWasmInitialized) {
8976                         throw new Error("initializeWasm() must be awaited first!");
8977                 }
8978                 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
8979                 // debug statements here
8980         }
8981         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
8982         export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
8983                 if(!isWasmInitialized) {
8984                         throw new Error("initializeWasm() must be awaited first!");
8985                 }
8986                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
8987                 return decodeArray(nativeResponseValue);
8988         }
8989         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8990         export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
8991                 if(!isWasmInitialized) {
8992                         throw new Error("initializeWasm() must be awaited first!");
8993                 }
8994                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
8995                 // debug statements here
8996         }
8997         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
8998         export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
8999                 if(!isWasmInitialized) {
9000                         throw new Error("initializeWasm() must be awaited first!");
9001                 }
9002                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
9003                 return nativeResponseValue;
9004         }
9005         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
9006         export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
9007                 if(!isWasmInitialized) {
9008                         throw new Error("initializeWasm() must be awaited first!");
9009                 }
9010                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
9011                 // debug statements here
9012         }
9013         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9014         export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
9015                 if(!isWasmInitialized) {
9016                         throw new Error("initializeWasm() must be awaited first!");
9017                 }
9018                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
9019                 return nativeResponseValue;
9020         }
9021         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
9022         export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
9023                 if(!isWasmInitialized) {
9024                         throw new Error("initializeWasm() must be awaited first!");
9025                 }
9026                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
9027                 // debug statements here
9028         }
9029         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9030         export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
9031                 if(!isWasmInitialized) {
9032                         throw new Error("initializeWasm() must be awaited first!");
9033                 }
9034                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
9035                 return nativeResponseValue;
9036         }
9037         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
9038         export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
9039                 if(!isWasmInitialized) {
9040                         throw new Error("initializeWasm() must be awaited first!");
9041                 }
9042                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
9043                 // debug statements here
9044         }
9045         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9046         export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
9047                 if(!isWasmInitialized) {
9048                         throw new Error("initializeWasm() must be awaited first!");
9049                 }
9050                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
9051                 return nativeResponseValue;
9052         }
9053         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
9054         export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
9055                 if(!isWasmInitialized) {
9056                         throw new Error("initializeWasm() must be awaited first!");
9057                 }
9058                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
9059                 // debug statements here
9060         }
9061         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9062         export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
9063                 if(!isWasmInitialized) {
9064                         throw new Error("initializeWasm() must be awaited first!");
9065                 }
9066                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
9067                 return nativeResponseValue;
9068         }
9069         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
9070         export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
9071                 if(!isWasmInitialized) {
9072                         throw new Error("initializeWasm() must be awaited first!");
9073                 }
9074                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
9075                 // debug statements here
9076         }
9077         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9078         export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
9079                 if(!isWasmInitialized) {
9080                         throw new Error("initializeWasm() must be awaited first!");
9081                 }
9082                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
9083                 return nativeResponseValue;
9084         }
9085         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
9086         export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
9087                 if(!isWasmInitialized) {
9088                         throw new Error("initializeWasm() must be awaited first!");
9089                 }
9090                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
9091                 // debug statements here
9092         }
9093         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
9094         export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
9095                 if(!isWasmInitialized) {
9096                         throw new Error("initializeWasm() must be awaited first!");
9097                 }
9098                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
9099                 return nativeResponseValue;
9100         }
9101         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
9102         export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
9103                 if(!isWasmInitialized) {
9104                         throw new Error("initializeWasm() must be awaited first!");
9105                 }
9106                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
9107                 // debug statements here
9108         }
9109         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
9110         export function UnsignedChannelUpdate_clone(orig: number): number {
9111                 if(!isWasmInitialized) {
9112                         throw new Error("initializeWasm() must be awaited first!");
9113                 }
9114                 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
9115                 return nativeResponseValue;
9116         }
9117         // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
9118         export function ChannelUpdate_free(this_obj: number): void {
9119                 if(!isWasmInitialized) {
9120                         throw new Error("initializeWasm() must be awaited first!");
9121                 }
9122                 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
9123                 // debug statements here
9124         }
9125         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
9126         export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
9127                 if(!isWasmInitialized) {
9128                         throw new Error("initializeWasm() must be awaited first!");
9129                 }
9130                 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
9131                 return decodeArray(nativeResponseValue);
9132         }
9133         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
9134         export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
9135                 if(!isWasmInitialized) {
9136                         throw new Error("initializeWasm() must be awaited first!");
9137                 }
9138                 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
9139                 // debug statements here
9140         }
9141         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
9142         export function ChannelUpdate_get_contents(this_ptr: number): number {
9143                 if(!isWasmInitialized) {
9144                         throw new Error("initializeWasm() must be awaited first!");
9145                 }
9146                 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
9147                 return nativeResponseValue;
9148         }
9149         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
9150         export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
9151                 if(!isWasmInitialized) {
9152                         throw new Error("initializeWasm() must be awaited first!");
9153                 }
9154                 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
9155                 // debug statements here
9156         }
9157         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
9158         export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
9159                 if(!isWasmInitialized) {
9160                         throw new Error("initializeWasm() must be awaited first!");
9161                 }
9162                 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
9163                 return nativeResponseValue;
9164         }
9165         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
9166         export function ChannelUpdate_clone(orig: number): number {
9167                 if(!isWasmInitialized) {
9168                         throw new Error("initializeWasm() must be awaited first!");
9169                 }
9170                 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
9171                 return nativeResponseValue;
9172         }
9173         // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
9174         export function QueryChannelRange_free(this_obj: number): void {
9175                 if(!isWasmInitialized) {
9176                         throw new Error("initializeWasm() must be awaited first!");
9177                 }
9178                 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
9179                 // debug statements here
9180         }
9181         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
9182         export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
9183                 if(!isWasmInitialized) {
9184                         throw new Error("initializeWasm() must be awaited first!");
9185                 }
9186                 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
9187                 return decodeArray(nativeResponseValue);
9188         }
9189         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9190         export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9191                 if(!isWasmInitialized) {
9192                         throw new Error("initializeWasm() must be awaited first!");
9193                 }
9194                 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
9195                 // debug statements here
9196         }
9197         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
9198         export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
9199                 if(!isWasmInitialized) {
9200                         throw new Error("initializeWasm() must be awaited first!");
9201                 }
9202                 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
9203                 return nativeResponseValue;
9204         }
9205         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9206         export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
9207                 if(!isWasmInitialized) {
9208                         throw new Error("initializeWasm() must be awaited first!");
9209                 }
9210                 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
9211                 // debug statements here
9212         }
9213         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
9214         export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
9215                 if(!isWasmInitialized) {
9216                         throw new Error("initializeWasm() must be awaited first!");
9217                 }
9218                 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
9219                 return nativeResponseValue;
9220         }
9221         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9222         export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
9223                 if(!isWasmInitialized) {
9224                         throw new Error("initializeWasm() must be awaited first!");
9225                 }
9226                 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
9227                 // debug statements here
9228         }
9229         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
9230         export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
9231                 if(!isWasmInitialized) {
9232                         throw new Error("initializeWasm() must be awaited first!");
9233                 }
9234                 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
9235                 return nativeResponseValue;
9236         }
9237         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
9238         export function QueryChannelRange_clone(orig: number): number {
9239                 if(!isWasmInitialized) {
9240                         throw new Error("initializeWasm() must be awaited first!");
9241                 }
9242                 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
9243                 return nativeResponseValue;
9244         }
9245         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
9246         export function ReplyChannelRange_free(this_obj: number): void {
9247                 if(!isWasmInitialized) {
9248                         throw new Error("initializeWasm() must be awaited first!");
9249                 }
9250                 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
9251                 // debug statements here
9252         }
9253         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
9254         export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
9255                 if(!isWasmInitialized) {
9256                         throw new Error("initializeWasm() must be awaited first!");
9257                 }
9258                 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
9259                 return decodeArray(nativeResponseValue);
9260         }
9261         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9262         export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9263                 if(!isWasmInitialized) {
9264                         throw new Error("initializeWasm() must be awaited first!");
9265                 }
9266                 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
9267                 // debug statements here
9268         }
9269         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9270         export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
9271                 if(!isWasmInitialized) {
9272                         throw new Error("initializeWasm() must be awaited first!");
9273                 }
9274                 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
9275                 return nativeResponseValue;
9276         }
9277         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9278         export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
9279                 if(!isWasmInitialized) {
9280                         throw new Error("initializeWasm() must be awaited first!");
9281                 }
9282                 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
9283                 // debug statements here
9284         }
9285         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9286         export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
9287                 if(!isWasmInitialized) {
9288                         throw new Error("initializeWasm() must be awaited first!");
9289                 }
9290                 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
9291                 return nativeResponseValue;
9292         }
9293         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
9294         export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
9295                 if(!isWasmInitialized) {
9296                         throw new Error("initializeWasm() must be awaited first!");
9297                 }
9298                 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
9299                 // debug statements here
9300         }
9301         // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
9302         export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
9303                 if(!isWasmInitialized) {
9304                         throw new Error("initializeWasm() must be awaited first!");
9305                 }
9306                 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
9307                 return nativeResponseValue;
9308         }
9309         // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
9310         export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
9311                 if(!isWasmInitialized) {
9312                         throw new Error("initializeWasm() must be awaited first!");
9313                 }
9314                 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
9315                 // debug statements here
9316         }
9317         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
9318         export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
9319                 if(!isWasmInitialized) {
9320                         throw new Error("initializeWasm() must be awaited first!");
9321                 }
9322                 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
9323                 // debug statements here
9324         }
9325         // 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);
9326         export function ReplyChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number, sync_complete_arg: boolean, short_channel_ids_arg: number[]): number {
9327                 if(!isWasmInitialized) {
9328                         throw new Error("initializeWasm() must be awaited first!");
9329                 }
9330                 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
9331                 return nativeResponseValue;
9332         }
9333         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
9334         export function ReplyChannelRange_clone(orig: number): number {
9335                 if(!isWasmInitialized) {
9336                         throw new Error("initializeWasm() must be awaited first!");
9337                 }
9338                 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
9339                 return nativeResponseValue;
9340         }
9341         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
9342         export function QueryShortChannelIds_free(this_obj: number): void {
9343                 if(!isWasmInitialized) {
9344                         throw new Error("initializeWasm() must be awaited first!");
9345                 }
9346                 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
9347                 // debug statements here
9348         }
9349         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
9350         export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
9351                 if(!isWasmInitialized) {
9352                         throw new Error("initializeWasm() must be awaited first!");
9353                 }
9354                 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
9355                 return decodeArray(nativeResponseValue);
9356         }
9357         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9358         export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9359                 if(!isWasmInitialized) {
9360                         throw new Error("initializeWasm() must be awaited first!");
9361                 }
9362                 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
9363                 // debug statements here
9364         }
9365         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
9366         export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
9367                 if(!isWasmInitialized) {
9368                         throw new Error("initializeWasm() must be awaited first!");
9369                 }
9370                 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
9371                 // debug statements here
9372         }
9373         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
9374         export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
9375                 if(!isWasmInitialized) {
9376                         throw new Error("initializeWasm() must be awaited first!");
9377                 }
9378                 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
9379                 return nativeResponseValue;
9380         }
9381         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
9382         export function QueryShortChannelIds_clone(orig: number): number {
9383                 if(!isWasmInitialized) {
9384                         throw new Error("initializeWasm() must be awaited first!");
9385                 }
9386                 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
9387                 return nativeResponseValue;
9388         }
9389         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
9390         export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
9391                 if(!isWasmInitialized) {
9392                         throw new Error("initializeWasm() must be awaited first!");
9393                 }
9394                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
9395                 // debug statements here
9396         }
9397         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
9398         export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
9399                 if(!isWasmInitialized) {
9400                         throw new Error("initializeWasm() must be awaited first!");
9401                 }
9402                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
9403                 return decodeArray(nativeResponseValue);
9404         }
9405         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9406         export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9407                 if(!isWasmInitialized) {
9408                         throw new Error("initializeWasm() must be awaited first!");
9409                 }
9410                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
9411                 // debug statements here
9412         }
9413         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
9414         export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
9415                 if(!isWasmInitialized) {
9416                         throw new Error("initializeWasm() must be awaited first!");
9417                 }
9418                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
9419                 return nativeResponseValue;
9420         }
9421         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
9422         export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
9423                 if(!isWasmInitialized) {
9424                         throw new Error("initializeWasm() must be awaited first!");
9425                 }
9426                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
9427                 // debug statements here
9428         }
9429         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
9430         export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
9431                 if(!isWasmInitialized) {
9432                         throw new Error("initializeWasm() must be awaited first!");
9433                 }
9434                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
9435                 return nativeResponseValue;
9436         }
9437         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
9438         export function ReplyShortChannelIdsEnd_clone(orig: number): number {
9439                 if(!isWasmInitialized) {
9440                         throw new Error("initializeWasm() must be awaited first!");
9441                 }
9442                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
9443                 return nativeResponseValue;
9444         }
9445         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
9446         export function GossipTimestampFilter_free(this_obj: number): void {
9447                 if(!isWasmInitialized) {
9448                         throw new Error("initializeWasm() must be awaited first!");
9449                 }
9450                 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
9451                 // debug statements here
9452         }
9453         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
9454         export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
9455                 if(!isWasmInitialized) {
9456                         throw new Error("initializeWasm() must be awaited first!");
9457                 }
9458                 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
9459                 return decodeArray(nativeResponseValue);
9460         }
9461         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9462         export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
9463                 if(!isWasmInitialized) {
9464                         throw new Error("initializeWasm() must be awaited first!");
9465                 }
9466                 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
9467                 // debug statements here
9468         }
9469         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
9470         export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
9471                 if(!isWasmInitialized) {
9472                         throw new Error("initializeWasm() must be awaited first!");
9473                 }
9474                 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
9475                 return nativeResponseValue;
9476         }
9477         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
9478         export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
9479                 if(!isWasmInitialized) {
9480                         throw new Error("initializeWasm() must be awaited first!");
9481                 }
9482                 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
9483                 // debug statements here
9484         }
9485         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
9486         export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
9487                 if(!isWasmInitialized) {
9488                         throw new Error("initializeWasm() must be awaited first!");
9489                 }
9490                 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
9491                 return nativeResponseValue;
9492         }
9493         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
9494         export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
9495                 if(!isWasmInitialized) {
9496                         throw new Error("initializeWasm() must be awaited first!");
9497                 }
9498                 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
9499                 // debug statements here
9500         }
9501         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
9502         export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
9503                 if(!isWasmInitialized) {
9504                         throw new Error("initializeWasm() must be awaited first!");
9505                 }
9506                 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
9507                 return nativeResponseValue;
9508         }
9509         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
9510         export function GossipTimestampFilter_clone(orig: number): number {
9511                 if(!isWasmInitialized) {
9512                         throw new Error("initializeWasm() must be awaited first!");
9513                 }
9514                 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
9515                 return nativeResponseValue;
9516         }
9517         // void ErrorAction_free(struct LDKErrorAction this_ptr);
9518         export function ErrorAction_free(this_ptr: number): void {
9519                 if(!isWasmInitialized) {
9520                         throw new Error("initializeWasm() must be awaited first!");
9521                 }
9522                 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
9523                 // debug statements here
9524         }
9525         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
9526         export function ErrorAction_clone(orig: number): number {
9527                 if(!isWasmInitialized) {
9528                         throw new Error("initializeWasm() must be awaited first!");
9529                 }
9530                 const nativeResponseValue = wasm.ErrorAction_clone(orig);
9531                 return nativeResponseValue;
9532         }
9533         // void LightningError_free(struct LDKLightningError this_obj);
9534         export function LightningError_free(this_obj: number): void {
9535                 if(!isWasmInitialized) {
9536                         throw new Error("initializeWasm() must be awaited first!");
9537                 }
9538                 const nativeResponseValue = wasm.LightningError_free(this_obj);
9539                 // debug statements here
9540         }
9541         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
9542         export function LightningError_get_err(this_ptr: number): String {
9543                 if(!isWasmInitialized) {
9544                         throw new Error("initializeWasm() must be awaited first!");
9545                 }
9546                 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
9547                 return nativeResponseValue;
9548         }
9549         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
9550         export function LightningError_set_err(this_ptr: number, val: Uint8Array): void {
9551                 if(!isWasmInitialized) {
9552                         throw new Error("initializeWasm() must be awaited first!");
9553                 }
9554                 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, encodeArray(val));
9555                 // debug statements here
9556         }
9557         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
9558         export function LightningError_get_action(this_ptr: number): number {
9559                 if(!isWasmInitialized) {
9560                         throw new Error("initializeWasm() must be awaited first!");
9561                 }
9562                 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
9563                 return nativeResponseValue;
9564         }
9565         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
9566         export function LightningError_set_action(this_ptr: number, val: number): void {
9567                 if(!isWasmInitialized) {
9568                         throw new Error("initializeWasm() must be awaited first!");
9569                 }
9570                 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
9571                 // debug statements here
9572         }
9573         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKCVec_u8Z err_arg, struct LDKErrorAction action_arg);
9574         export function LightningError_new(err_arg: Uint8Array, action_arg: number): number {
9575                 if(!isWasmInitialized) {
9576                         throw new Error("initializeWasm() must be awaited first!");
9577                 }
9578                 const nativeResponseValue = wasm.LightningError_new(encodeArray(err_arg), action_arg);
9579                 return nativeResponseValue;
9580         }
9581         // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
9582         export function LightningError_clone(orig: number): number {
9583                 if(!isWasmInitialized) {
9584                         throw new Error("initializeWasm() must be awaited first!");
9585                 }
9586                 const nativeResponseValue = wasm.LightningError_clone(orig);
9587                 return nativeResponseValue;
9588         }
9589         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
9590         export function CommitmentUpdate_free(this_obj: number): void {
9591                 if(!isWasmInitialized) {
9592                         throw new Error("initializeWasm() must be awaited first!");
9593                 }
9594                 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
9595                 // debug statements here
9596         }
9597         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
9598         export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
9599                 if(!isWasmInitialized) {
9600                         throw new Error("initializeWasm() must be awaited first!");
9601                 }
9602                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
9603                 // debug statements here
9604         }
9605         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
9606         export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
9607                 if(!isWasmInitialized) {
9608                         throw new Error("initializeWasm() must be awaited first!");
9609                 }
9610                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
9611                 // debug statements here
9612         }
9613         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
9614         export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
9615                 if(!isWasmInitialized) {
9616                         throw new Error("initializeWasm() must be awaited first!");
9617                 }
9618                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
9619                 // debug statements here
9620         }
9621         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
9622         export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
9623                 if(!isWasmInitialized) {
9624                         throw new Error("initializeWasm() must be awaited first!");
9625                 }
9626                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
9627                 // debug statements here
9628         }
9629         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
9630         export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
9631                 if(!isWasmInitialized) {
9632                         throw new Error("initializeWasm() must be awaited first!");
9633                 }
9634                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
9635                 return nativeResponseValue;
9636         }
9637         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
9638         export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
9639                 if(!isWasmInitialized) {
9640                         throw new Error("initializeWasm() must be awaited first!");
9641                 }
9642                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
9643                 // debug statements here
9644         }
9645         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
9646         export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
9647                 if(!isWasmInitialized) {
9648                         throw new Error("initializeWasm() must be awaited first!");
9649                 }
9650                 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
9651                 return nativeResponseValue;
9652         }
9653         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
9654         export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
9655                 if(!isWasmInitialized) {
9656                         throw new Error("initializeWasm() must be awaited first!");
9657                 }
9658                 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
9659                 // debug statements here
9660         }
9661         // 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);
9662         export function CommitmentUpdate_new(update_add_htlcs_arg: number[], update_fulfill_htlcs_arg: number[], update_fail_htlcs_arg: number[], update_fail_malformed_htlcs_arg: number[], update_fee_arg: number, commitment_signed_arg: number): number {
9663                 if(!isWasmInitialized) {
9664                         throw new Error("initializeWasm() must be awaited first!");
9665                 }
9666                 const nativeResponseValue = wasm.CommitmentUpdate_new(update_add_htlcs_arg, update_fulfill_htlcs_arg, update_fail_htlcs_arg, update_fail_malformed_htlcs_arg, update_fee_arg, commitment_signed_arg);
9667                 return nativeResponseValue;
9668         }
9669         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
9670         export function CommitmentUpdate_clone(orig: number): number {
9671                 if(!isWasmInitialized) {
9672                         throw new Error("initializeWasm() must be awaited first!");
9673                 }
9674                 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
9675                 return nativeResponseValue;
9676         }
9677         // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
9678         export function HTLCFailChannelUpdate_free(this_ptr: number): void {
9679                 if(!isWasmInitialized) {
9680                         throw new Error("initializeWasm() must be awaited first!");
9681                 }
9682                 const nativeResponseValue = wasm.HTLCFailChannelUpdate_free(this_ptr);
9683                 // debug statements here
9684         }
9685         // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const struct LDKHTLCFailChannelUpdate *NONNULL_PTR orig);
9686         export function HTLCFailChannelUpdate_clone(orig: number): number {
9687                 if(!isWasmInitialized) {
9688                         throw new Error("initializeWasm() must be awaited first!");
9689                 }
9690                 const nativeResponseValue = wasm.HTLCFailChannelUpdate_clone(orig);
9691                 return nativeResponseValue;
9692         }
9693         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
9694         export function ChannelMessageHandler_free(this_ptr: number): void {
9695                 if(!isWasmInitialized) {
9696                         throw new Error("initializeWasm() must be awaited first!");
9697                 }
9698                 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
9699                 // debug statements here
9700         }
9701         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
9702         export function RoutingMessageHandler_free(this_ptr: number): void {
9703                 if(!isWasmInitialized) {
9704                         throw new Error("initializeWasm() must be awaited first!");
9705                 }
9706                 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
9707                 // debug statements here
9708         }
9709         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
9710         export function AcceptChannel_write(obj: number): Uint8Array {
9711                 if(!isWasmInitialized) {
9712                         throw new Error("initializeWasm() must be awaited first!");
9713                 }
9714                 const nativeResponseValue = wasm.AcceptChannel_write(obj);
9715                 return decodeArray(nativeResponseValue);
9716         }
9717         // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
9718         export function AcceptChannel_read(ser: Uint8Array): number {
9719                 if(!isWasmInitialized) {
9720                         throw new Error("initializeWasm() must be awaited first!");
9721                 }
9722                 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
9723                 return nativeResponseValue;
9724         }
9725         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
9726         export function AnnouncementSignatures_write(obj: number): Uint8Array {
9727                 if(!isWasmInitialized) {
9728                         throw new Error("initializeWasm() must be awaited first!");
9729                 }
9730                 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
9731                 return decodeArray(nativeResponseValue);
9732         }
9733         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
9734         export function AnnouncementSignatures_read(ser: Uint8Array): number {
9735                 if(!isWasmInitialized) {
9736                         throw new Error("initializeWasm() must be awaited first!");
9737                 }
9738                 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
9739                 return nativeResponseValue;
9740         }
9741         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
9742         export function ChannelReestablish_write(obj: number): Uint8Array {
9743                 if(!isWasmInitialized) {
9744                         throw new Error("initializeWasm() must be awaited first!");
9745                 }
9746                 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
9747                 return decodeArray(nativeResponseValue);
9748         }
9749         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
9750         export function ChannelReestablish_read(ser: Uint8Array): number {
9751                 if(!isWasmInitialized) {
9752                         throw new Error("initializeWasm() must be awaited first!");
9753                 }
9754                 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
9755                 return nativeResponseValue;
9756         }
9757         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
9758         export function ClosingSigned_write(obj: number): Uint8Array {
9759                 if(!isWasmInitialized) {
9760                         throw new Error("initializeWasm() must be awaited first!");
9761                 }
9762                 const nativeResponseValue = wasm.ClosingSigned_write(obj);
9763                 return decodeArray(nativeResponseValue);
9764         }
9765         // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
9766         export function ClosingSigned_read(ser: Uint8Array): number {
9767                 if(!isWasmInitialized) {
9768                         throw new Error("initializeWasm() must be awaited first!");
9769                 }
9770                 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
9771                 return nativeResponseValue;
9772         }
9773         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
9774         export function CommitmentSigned_write(obj: number): Uint8Array {
9775                 if(!isWasmInitialized) {
9776                         throw new Error("initializeWasm() must be awaited first!");
9777                 }
9778                 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
9779                 return decodeArray(nativeResponseValue);
9780         }
9781         // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
9782         export function CommitmentSigned_read(ser: Uint8Array): number {
9783                 if(!isWasmInitialized) {
9784                         throw new Error("initializeWasm() must be awaited first!");
9785                 }
9786                 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
9787                 return nativeResponseValue;
9788         }
9789         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
9790         export function FundingCreated_write(obj: number): Uint8Array {
9791                 if(!isWasmInitialized) {
9792                         throw new Error("initializeWasm() must be awaited first!");
9793                 }
9794                 const nativeResponseValue = wasm.FundingCreated_write(obj);
9795                 return decodeArray(nativeResponseValue);
9796         }
9797         // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
9798         export function FundingCreated_read(ser: Uint8Array): number {
9799                 if(!isWasmInitialized) {
9800                         throw new Error("initializeWasm() must be awaited first!");
9801                 }
9802                 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
9803                 return nativeResponseValue;
9804         }
9805         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
9806         export function FundingSigned_write(obj: number): Uint8Array {
9807                 if(!isWasmInitialized) {
9808                         throw new Error("initializeWasm() must be awaited first!");
9809                 }
9810                 const nativeResponseValue = wasm.FundingSigned_write(obj);
9811                 return decodeArray(nativeResponseValue);
9812         }
9813         // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
9814         export function FundingSigned_read(ser: Uint8Array): number {
9815                 if(!isWasmInitialized) {
9816                         throw new Error("initializeWasm() must be awaited first!");
9817                 }
9818                 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
9819                 return nativeResponseValue;
9820         }
9821         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
9822         export function FundingLocked_write(obj: number): Uint8Array {
9823                 if(!isWasmInitialized) {
9824                         throw new Error("initializeWasm() must be awaited first!");
9825                 }
9826                 const nativeResponseValue = wasm.FundingLocked_write(obj);
9827                 return decodeArray(nativeResponseValue);
9828         }
9829         // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
9830         export function FundingLocked_read(ser: Uint8Array): number {
9831                 if(!isWasmInitialized) {
9832                         throw new Error("initializeWasm() must be awaited first!");
9833                 }
9834                 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
9835                 return nativeResponseValue;
9836         }
9837         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
9838         export function Init_write(obj: number): Uint8Array {
9839                 if(!isWasmInitialized) {
9840                         throw new Error("initializeWasm() must be awaited first!");
9841                 }
9842                 const nativeResponseValue = wasm.Init_write(obj);
9843                 return decodeArray(nativeResponseValue);
9844         }
9845         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
9846         export function Init_read(ser: Uint8Array): number {
9847                 if(!isWasmInitialized) {
9848                         throw new Error("initializeWasm() must be awaited first!");
9849                 }
9850                 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
9851                 return nativeResponseValue;
9852         }
9853         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
9854         export function OpenChannel_write(obj: number): Uint8Array {
9855                 if(!isWasmInitialized) {
9856                         throw new Error("initializeWasm() must be awaited first!");
9857                 }
9858                 const nativeResponseValue = wasm.OpenChannel_write(obj);
9859                 return decodeArray(nativeResponseValue);
9860         }
9861         // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
9862         export function OpenChannel_read(ser: Uint8Array): number {
9863                 if(!isWasmInitialized) {
9864                         throw new Error("initializeWasm() must be awaited first!");
9865                 }
9866                 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
9867                 return nativeResponseValue;
9868         }
9869         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
9870         export function RevokeAndACK_write(obj: number): Uint8Array {
9871                 if(!isWasmInitialized) {
9872                         throw new Error("initializeWasm() must be awaited first!");
9873                 }
9874                 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
9875                 return decodeArray(nativeResponseValue);
9876         }
9877         // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
9878         export function RevokeAndACK_read(ser: Uint8Array): number {
9879                 if(!isWasmInitialized) {
9880                         throw new Error("initializeWasm() must be awaited first!");
9881                 }
9882                 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
9883                 return nativeResponseValue;
9884         }
9885         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
9886         export function Shutdown_write(obj: number): Uint8Array {
9887                 if(!isWasmInitialized) {
9888                         throw new Error("initializeWasm() must be awaited first!");
9889                 }
9890                 const nativeResponseValue = wasm.Shutdown_write(obj);
9891                 return decodeArray(nativeResponseValue);
9892         }
9893         // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
9894         export function Shutdown_read(ser: Uint8Array): number {
9895                 if(!isWasmInitialized) {
9896                         throw new Error("initializeWasm() must be awaited first!");
9897                 }
9898                 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
9899                 return nativeResponseValue;
9900         }
9901         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
9902         export function UpdateFailHTLC_write(obj: number): Uint8Array {
9903                 if(!isWasmInitialized) {
9904                         throw new Error("initializeWasm() must be awaited first!");
9905                 }
9906                 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
9907                 return decodeArray(nativeResponseValue);
9908         }
9909         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
9910         export function UpdateFailHTLC_read(ser: Uint8Array): number {
9911                 if(!isWasmInitialized) {
9912                         throw new Error("initializeWasm() must be awaited first!");
9913                 }
9914                 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
9915                 return nativeResponseValue;
9916         }
9917         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
9918         export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
9919                 if(!isWasmInitialized) {
9920                         throw new Error("initializeWasm() must be awaited first!");
9921                 }
9922                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
9923                 return decodeArray(nativeResponseValue);
9924         }
9925         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
9926         export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
9927                 if(!isWasmInitialized) {
9928                         throw new Error("initializeWasm() must be awaited first!");
9929                 }
9930                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
9931                 return nativeResponseValue;
9932         }
9933         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
9934         export function UpdateFee_write(obj: number): Uint8Array {
9935                 if(!isWasmInitialized) {
9936                         throw new Error("initializeWasm() must be awaited first!");
9937                 }
9938                 const nativeResponseValue = wasm.UpdateFee_write(obj);
9939                 return decodeArray(nativeResponseValue);
9940         }
9941         // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
9942         export function UpdateFee_read(ser: Uint8Array): number {
9943                 if(!isWasmInitialized) {
9944                         throw new Error("initializeWasm() must be awaited first!");
9945                 }
9946                 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
9947                 return nativeResponseValue;
9948         }
9949         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
9950         export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
9951                 if(!isWasmInitialized) {
9952                         throw new Error("initializeWasm() must be awaited first!");
9953                 }
9954                 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
9955                 return decodeArray(nativeResponseValue);
9956         }
9957         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
9958         export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
9959                 if(!isWasmInitialized) {
9960                         throw new Error("initializeWasm() must be awaited first!");
9961                 }
9962                 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
9963                 return nativeResponseValue;
9964         }
9965         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
9966         export function UpdateAddHTLC_write(obj: number): Uint8Array {
9967                 if(!isWasmInitialized) {
9968                         throw new Error("initializeWasm() must be awaited first!");
9969                 }
9970                 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
9971                 return decodeArray(nativeResponseValue);
9972         }
9973         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
9974         export function UpdateAddHTLC_read(ser: Uint8Array): number {
9975                 if(!isWasmInitialized) {
9976                         throw new Error("initializeWasm() must be awaited first!");
9977                 }
9978                 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
9979                 return nativeResponseValue;
9980         }
9981         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
9982         export function Ping_write(obj: number): Uint8Array {
9983                 if(!isWasmInitialized) {
9984                         throw new Error("initializeWasm() must be awaited first!");
9985                 }
9986                 const nativeResponseValue = wasm.Ping_write(obj);
9987                 return decodeArray(nativeResponseValue);
9988         }
9989         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
9990         export function Ping_read(ser: Uint8Array): number {
9991                 if(!isWasmInitialized) {
9992                         throw new Error("initializeWasm() must be awaited first!");
9993                 }
9994                 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
9995                 return nativeResponseValue;
9996         }
9997         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
9998         export function Pong_write(obj: number): Uint8Array {
9999                 if(!isWasmInitialized) {
10000                         throw new Error("initializeWasm() must be awaited first!");
10001                 }
10002                 const nativeResponseValue = wasm.Pong_write(obj);
10003                 return decodeArray(nativeResponseValue);
10004         }
10005         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
10006         export function Pong_read(ser: Uint8Array): number {
10007                 if(!isWasmInitialized) {
10008                         throw new Error("initializeWasm() must be awaited first!");
10009                 }
10010                 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
10011                 return nativeResponseValue;
10012         }
10013         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
10014         export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
10015                 if(!isWasmInitialized) {
10016                         throw new Error("initializeWasm() must be awaited first!");
10017                 }
10018                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
10019                 return decodeArray(nativeResponseValue);
10020         }
10021         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
10022         export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
10023                 if(!isWasmInitialized) {
10024                         throw new Error("initializeWasm() must be awaited first!");
10025                 }
10026                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
10027                 return nativeResponseValue;
10028         }
10029         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
10030         export function ChannelAnnouncement_write(obj: number): Uint8Array {
10031                 if(!isWasmInitialized) {
10032                         throw new Error("initializeWasm() must be awaited first!");
10033                 }
10034                 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
10035                 return decodeArray(nativeResponseValue);
10036         }
10037         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
10038         export function ChannelAnnouncement_read(ser: Uint8Array): number {
10039                 if(!isWasmInitialized) {
10040                         throw new Error("initializeWasm() must be awaited first!");
10041                 }
10042                 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
10043                 return nativeResponseValue;
10044         }
10045         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
10046         export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
10047                 if(!isWasmInitialized) {
10048                         throw new Error("initializeWasm() must be awaited first!");
10049                 }
10050                 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
10051                 return decodeArray(nativeResponseValue);
10052         }
10053         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
10054         export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
10055                 if(!isWasmInitialized) {
10056                         throw new Error("initializeWasm() must be awaited first!");
10057                 }
10058                 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
10059                 return nativeResponseValue;
10060         }
10061         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
10062         export function ChannelUpdate_write(obj: number): Uint8Array {
10063                 if(!isWasmInitialized) {
10064                         throw new Error("initializeWasm() must be awaited first!");
10065                 }
10066                 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
10067                 return decodeArray(nativeResponseValue);
10068         }
10069         // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
10070         export function ChannelUpdate_read(ser: Uint8Array): number {
10071                 if(!isWasmInitialized) {
10072                         throw new Error("initializeWasm() must be awaited first!");
10073                 }
10074                 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
10075                 return nativeResponseValue;
10076         }
10077         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
10078         export function ErrorMessage_write(obj: number): Uint8Array {
10079                 if(!isWasmInitialized) {
10080                         throw new Error("initializeWasm() must be awaited first!");
10081                 }
10082                 const nativeResponseValue = wasm.ErrorMessage_write(obj);
10083                 return decodeArray(nativeResponseValue);
10084         }
10085         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
10086         export function ErrorMessage_read(ser: Uint8Array): number {
10087                 if(!isWasmInitialized) {
10088                         throw new Error("initializeWasm() must be awaited first!");
10089                 }
10090                 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
10091                 return nativeResponseValue;
10092         }
10093         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
10094         export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
10095                 if(!isWasmInitialized) {
10096                         throw new Error("initializeWasm() must be awaited first!");
10097                 }
10098                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
10099                 return decodeArray(nativeResponseValue);
10100         }
10101         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
10102         export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
10103                 if(!isWasmInitialized) {
10104                         throw new Error("initializeWasm() must be awaited first!");
10105                 }
10106                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
10107                 return nativeResponseValue;
10108         }
10109         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
10110         export function NodeAnnouncement_write(obj: number): Uint8Array {
10111                 if(!isWasmInitialized) {
10112                         throw new Error("initializeWasm() must be awaited first!");
10113                 }
10114                 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
10115                 return decodeArray(nativeResponseValue);
10116         }
10117         // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
10118         export function NodeAnnouncement_read(ser: Uint8Array): number {
10119                 if(!isWasmInitialized) {
10120                         throw new Error("initializeWasm() must be awaited first!");
10121                 }
10122                 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
10123                 return nativeResponseValue;
10124         }
10125         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
10126         export function QueryShortChannelIds_read(ser: Uint8Array): number {
10127                 if(!isWasmInitialized) {
10128                         throw new Error("initializeWasm() must be awaited first!");
10129                 }
10130                 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
10131                 return nativeResponseValue;
10132         }
10133         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
10134         export function QueryShortChannelIds_write(obj: number): Uint8Array {
10135                 if(!isWasmInitialized) {
10136                         throw new Error("initializeWasm() must be awaited first!");
10137                 }
10138                 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
10139                 return decodeArray(nativeResponseValue);
10140         }
10141         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
10142         export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
10143                 if(!isWasmInitialized) {
10144                         throw new Error("initializeWasm() must be awaited first!");
10145                 }
10146                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
10147                 return nativeResponseValue;
10148         }
10149         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
10150         export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
10151                 if(!isWasmInitialized) {
10152                         throw new Error("initializeWasm() must be awaited first!");
10153                 }
10154                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
10155                 return decodeArray(nativeResponseValue);
10156         }
10157         // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
10158         export function QueryChannelRange_end_blocknum(this_arg: number): number {
10159                 if(!isWasmInitialized) {
10160                         throw new Error("initializeWasm() must be awaited first!");
10161                 }
10162                 const nativeResponseValue = wasm.QueryChannelRange_end_blocknum(this_arg);
10163                 return nativeResponseValue;
10164         }
10165         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
10166         export function QueryChannelRange_read(ser: Uint8Array): number {
10167                 if(!isWasmInitialized) {
10168                         throw new Error("initializeWasm() must be awaited first!");
10169                 }
10170                 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
10171                 return nativeResponseValue;
10172         }
10173         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
10174         export function QueryChannelRange_write(obj: number): Uint8Array {
10175                 if(!isWasmInitialized) {
10176                         throw new Error("initializeWasm() must be awaited first!");
10177                 }
10178                 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
10179                 return decodeArray(nativeResponseValue);
10180         }
10181         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
10182         export function ReplyChannelRange_read(ser: Uint8Array): number {
10183                 if(!isWasmInitialized) {
10184                         throw new Error("initializeWasm() must be awaited first!");
10185                 }
10186                 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
10187                 return nativeResponseValue;
10188         }
10189         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
10190         export function ReplyChannelRange_write(obj: number): Uint8Array {
10191                 if(!isWasmInitialized) {
10192                         throw new Error("initializeWasm() must be awaited first!");
10193                 }
10194                 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
10195                 return decodeArray(nativeResponseValue);
10196         }
10197         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
10198         export function GossipTimestampFilter_read(ser: Uint8Array): number {
10199                 if(!isWasmInitialized) {
10200                         throw new Error("initializeWasm() must be awaited first!");
10201                 }
10202                 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
10203                 return nativeResponseValue;
10204         }
10205         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
10206         export function GossipTimestampFilter_write(obj: number): Uint8Array {
10207                 if(!isWasmInitialized) {
10208                         throw new Error("initializeWasm() must be awaited first!");
10209                 }
10210                 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
10211                 return decodeArray(nativeResponseValue);
10212         }
10213         // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
10214         export function IgnoringMessageHandler_free(this_obj: number): void {
10215                 if(!isWasmInitialized) {
10216                         throw new Error("initializeWasm() must be awaited first!");
10217                 }
10218                 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
10219                 // debug statements here
10220         }
10221         // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
10222         export function IgnoringMessageHandler_new(): number {
10223                 if(!isWasmInitialized) {
10224                         throw new Error("initializeWasm() must be awaited first!");
10225                 }
10226                 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
10227                 return nativeResponseValue;
10228         }
10229         // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
10230         export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
10231                 if(!isWasmInitialized) {
10232                         throw new Error("initializeWasm() must be awaited first!");
10233                 }
10234                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
10235                 return nativeResponseValue;
10236         }
10237         // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
10238         export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
10239                 if(!isWasmInitialized) {
10240                         throw new Error("initializeWasm() must be awaited first!");
10241                 }
10242                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
10243                 return nativeResponseValue;
10244         }
10245         // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
10246         export function ErroringMessageHandler_free(this_obj: number): void {
10247                 if(!isWasmInitialized) {
10248                         throw new Error("initializeWasm() must be awaited first!");
10249                 }
10250                 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
10251                 // debug statements here
10252         }
10253         // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
10254         export function ErroringMessageHandler_new(): number {
10255                 if(!isWasmInitialized) {
10256                         throw new Error("initializeWasm() must be awaited first!");
10257                 }
10258                 const nativeResponseValue = wasm.ErroringMessageHandler_new();
10259                 return nativeResponseValue;
10260         }
10261         // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
10262         export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
10263                 if(!isWasmInitialized) {
10264                         throw new Error("initializeWasm() must be awaited first!");
10265                 }
10266                 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
10267                 return nativeResponseValue;
10268         }
10269         // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
10270         export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
10271                 if(!isWasmInitialized) {
10272                         throw new Error("initializeWasm() must be awaited first!");
10273                 }
10274                 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
10275                 return nativeResponseValue;
10276         }
10277         // void MessageHandler_free(struct LDKMessageHandler this_obj);
10278         export function MessageHandler_free(this_obj: number): void {
10279                 if(!isWasmInitialized) {
10280                         throw new Error("initializeWasm() must be awaited first!");
10281                 }
10282                 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
10283                 // debug statements here
10284         }
10285         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
10286         export function MessageHandler_get_chan_handler(this_ptr: number): number {
10287                 if(!isWasmInitialized) {
10288                         throw new Error("initializeWasm() must be awaited first!");
10289                 }
10290                 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
10291                 return nativeResponseValue;
10292         }
10293         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
10294         export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
10295                 if(!isWasmInitialized) {
10296                         throw new Error("initializeWasm() must be awaited first!");
10297                 }
10298                 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
10299                 // debug statements here
10300         }
10301         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
10302         export function MessageHandler_get_route_handler(this_ptr: number): number {
10303                 if(!isWasmInitialized) {
10304                         throw new Error("initializeWasm() must be awaited first!");
10305                 }
10306                 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
10307                 return nativeResponseValue;
10308         }
10309         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
10310         export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
10311                 if(!isWasmInitialized) {
10312                         throw new Error("initializeWasm() must be awaited first!");
10313                 }
10314                 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
10315                 // debug statements here
10316         }
10317         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
10318         export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
10319                 if(!isWasmInitialized) {
10320                         throw new Error("initializeWasm() must be awaited first!");
10321                 }
10322                 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
10323                 return nativeResponseValue;
10324         }
10325         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
10326         export function SocketDescriptor_clone(orig: number): number {
10327                 if(!isWasmInitialized) {
10328                         throw new Error("initializeWasm() must be awaited first!");
10329                 }
10330                 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
10331                 return nativeResponseValue;
10332         }
10333         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
10334         export function SocketDescriptor_free(this_ptr: number): void {
10335                 if(!isWasmInitialized) {
10336                         throw new Error("initializeWasm() must be awaited first!");
10337                 }
10338                 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
10339                 // debug statements here
10340         }
10341         // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
10342         export function PeerHandleError_free(this_obj: number): void {
10343                 if(!isWasmInitialized) {
10344                         throw new Error("initializeWasm() must be awaited first!");
10345                 }
10346                 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
10347                 // debug statements here
10348         }
10349         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
10350         export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
10351                 if(!isWasmInitialized) {
10352                         throw new Error("initializeWasm() must be awaited first!");
10353                 }
10354                 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
10355                 return nativeResponseValue;
10356         }
10357         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
10358         export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
10359                 if(!isWasmInitialized) {
10360                         throw new Error("initializeWasm() must be awaited first!");
10361                 }
10362                 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
10363                 // debug statements here
10364         }
10365         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
10366         export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
10367                 if(!isWasmInitialized) {
10368                         throw new Error("initializeWasm() must be awaited first!");
10369                 }
10370                 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
10371                 return nativeResponseValue;
10372         }
10373         // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
10374         export function PeerHandleError_clone(orig: number): number {
10375                 if(!isWasmInitialized) {
10376                         throw new Error("initializeWasm() must be awaited first!");
10377                 }
10378                 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
10379                 return nativeResponseValue;
10380         }
10381         // void PeerManager_free(struct LDKPeerManager this_obj);
10382         export function PeerManager_free(this_obj: number): void {
10383                 if(!isWasmInitialized) {
10384                         throw new Error("initializeWasm() must be awaited first!");
10385                 }
10386                 const nativeResponseValue = wasm.PeerManager_free(this_obj);
10387                 // debug statements here
10388         }
10389         // 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);
10390         export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number): number {
10391                 if(!isWasmInitialized) {
10392                         throw new Error("initializeWasm() must be awaited first!");
10393                 }
10394                 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger);
10395                 return nativeResponseValue;
10396         }
10397         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
10398         export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
10399                 if(!isWasmInitialized) {
10400                         throw new Error("initializeWasm() must be awaited first!");
10401                 }
10402                 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
10403                 return nativeResponseValue;
10404         }
10405         // 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);
10406         export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
10407                 if(!isWasmInitialized) {
10408                         throw new Error("initializeWasm() must be awaited first!");
10409                 }
10410                 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
10411                 return nativeResponseValue;
10412         }
10413         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
10414         export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
10415                 if(!isWasmInitialized) {
10416                         throw new Error("initializeWasm() must be awaited first!");
10417                 }
10418                 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
10419                 return nativeResponseValue;
10420         }
10421         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
10422         export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
10423                 if(!isWasmInitialized) {
10424                         throw new Error("initializeWasm() must be awaited first!");
10425                 }
10426                 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
10427                 return nativeResponseValue;
10428         }
10429         // 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);
10430         export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
10431                 if(!isWasmInitialized) {
10432                         throw new Error("initializeWasm() must be awaited first!");
10433                 }
10434                 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
10435                 return nativeResponseValue;
10436         }
10437         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
10438         export function PeerManager_process_events(this_arg: number): void {
10439                 if(!isWasmInitialized) {
10440                         throw new Error("initializeWasm() must be awaited first!");
10441                 }
10442                 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
10443                 // debug statements here
10444         }
10445         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
10446         export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
10447                 if(!isWasmInitialized) {
10448                         throw new Error("initializeWasm() must be awaited first!");
10449                 }
10450                 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
10451                 // debug statements here
10452         }
10453         // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
10454         export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
10455                 if(!isWasmInitialized) {
10456                         throw new Error("initializeWasm() must be awaited first!");
10457                 }
10458                 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
10459                 // debug statements here
10460         }
10461         // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
10462         export function PeerManager_timer_tick_occurred(this_arg: number): void {
10463                 if(!isWasmInitialized) {
10464                         throw new Error("initializeWasm() must be awaited first!");
10465                 }
10466                 const nativeResponseValue = wasm.PeerManager_timer_tick_occurred(this_arg);
10467                 // debug statements here
10468         }
10469         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
10470         export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
10471                 if(!isWasmInitialized) {
10472                         throw new Error("initializeWasm() must be awaited first!");
10473                 }
10474                 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
10475                 return decodeArray(nativeResponseValue);
10476         }
10477         // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
10478         export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
10479                 if(!isWasmInitialized) {
10480                         throw new Error("initializeWasm() must be awaited first!");
10481                 }
10482                 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
10483                 return nativeResponseValue;
10484         }
10485         // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
10486         export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
10487                 if(!isWasmInitialized) {
10488                         throw new Error("initializeWasm() must be awaited first!");
10489                 }
10490                 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
10491                 return nativeResponseValue;
10492         }
10493         // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
10494         export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
10495                 if(!isWasmInitialized) {
10496                         throw new Error("initializeWasm() must be awaited first!");
10497                 }
10498                 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
10499                 return nativeResponseValue;
10500         }
10501         // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
10502         export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
10503                 if(!isWasmInitialized) {
10504                         throw new Error("initializeWasm() must be awaited first!");
10505                 }
10506                 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
10507                 return nativeResponseValue;
10508         }
10509         // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
10510         export function TxCreationKeys_free(this_obj: number): void {
10511                 if(!isWasmInitialized) {
10512                         throw new Error("initializeWasm() must be awaited first!");
10513                 }
10514                 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
10515                 // debug statements here
10516         }
10517         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10518         export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
10519                 if(!isWasmInitialized) {
10520                         throw new Error("initializeWasm() must be awaited first!");
10521                 }
10522                 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
10523                 return decodeArray(nativeResponseValue);
10524         }
10525         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10526         export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10527                 if(!isWasmInitialized) {
10528                         throw new Error("initializeWasm() must be awaited first!");
10529                 }
10530                 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
10531                 // debug statements here
10532         }
10533         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10534         export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
10535                 if(!isWasmInitialized) {
10536                         throw new Error("initializeWasm() must be awaited first!");
10537                 }
10538                 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
10539                 return decodeArray(nativeResponseValue);
10540         }
10541         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10542         export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
10543                 if(!isWasmInitialized) {
10544                         throw new Error("initializeWasm() must be awaited first!");
10545                 }
10546                 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
10547                 // debug statements here
10548         }
10549         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10550         export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
10551                 if(!isWasmInitialized) {
10552                         throw new Error("initializeWasm() must be awaited first!");
10553                 }
10554                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
10555                 return decodeArray(nativeResponseValue);
10556         }
10557         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10558         export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
10559                 if(!isWasmInitialized) {
10560                         throw new Error("initializeWasm() must be awaited first!");
10561                 }
10562                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
10563                 // debug statements here
10564         }
10565         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10566         export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
10567                 if(!isWasmInitialized) {
10568                         throw new Error("initializeWasm() must be awaited first!");
10569                 }
10570                 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
10571                 return decodeArray(nativeResponseValue);
10572         }
10573         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10574         export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
10575                 if(!isWasmInitialized) {
10576                         throw new Error("initializeWasm() must be awaited first!");
10577                 }
10578                 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
10579                 // debug statements here
10580         }
10581         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
10582         export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
10583                 if(!isWasmInitialized) {
10584                         throw new Error("initializeWasm() must be awaited first!");
10585                 }
10586                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
10587                 return decodeArray(nativeResponseValue);
10588         }
10589         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10590         export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
10591                 if(!isWasmInitialized) {
10592                         throw new Error("initializeWasm() must be awaited first!");
10593                 }
10594                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
10595                 // debug statements here
10596         }
10597         // 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);
10598         export function TxCreationKeys_new(per_commitment_point_arg: Uint8Array, revocation_key_arg: Uint8Array, broadcaster_htlc_key_arg: Uint8Array, countersignatory_htlc_key_arg: Uint8Array, broadcaster_delayed_payment_key_arg: Uint8Array): number {
10599                 if(!isWasmInitialized) {
10600                         throw new Error("initializeWasm() must be awaited first!");
10601                 }
10602                 const nativeResponseValue = wasm.TxCreationKeys_new(encodeArray(per_commitment_point_arg), encodeArray(revocation_key_arg), encodeArray(broadcaster_htlc_key_arg), encodeArray(countersignatory_htlc_key_arg), encodeArray(broadcaster_delayed_payment_key_arg));
10603                 return nativeResponseValue;
10604         }
10605         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
10606         export function TxCreationKeys_clone(orig: number): number {
10607                 if(!isWasmInitialized) {
10608                         throw new Error("initializeWasm() must be awaited first!");
10609                 }
10610                 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
10611                 return nativeResponseValue;
10612         }
10613         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
10614         export function TxCreationKeys_write(obj: number): Uint8Array {
10615                 if(!isWasmInitialized) {
10616                         throw new Error("initializeWasm() must be awaited first!");
10617                 }
10618                 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
10619                 return decodeArray(nativeResponseValue);
10620         }
10621         // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
10622         export function TxCreationKeys_read(ser: Uint8Array): number {
10623                 if(!isWasmInitialized) {
10624                         throw new Error("initializeWasm() must be awaited first!");
10625                 }
10626                 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
10627                 return nativeResponseValue;
10628         }
10629         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
10630         export function ChannelPublicKeys_free(this_obj: number): void {
10631                 if(!isWasmInitialized) {
10632                         throw new Error("initializeWasm() must be awaited first!");
10633                 }
10634                 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
10635                 // debug statements here
10636         }
10637         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10638         export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
10639                 if(!isWasmInitialized) {
10640                         throw new Error("initializeWasm() must be awaited first!");
10641                 }
10642                 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
10643                 return decodeArray(nativeResponseValue);
10644         }
10645         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10646         export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
10647                 if(!isWasmInitialized) {
10648                         throw new Error("initializeWasm() must be awaited first!");
10649                 }
10650                 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
10651                 // debug statements here
10652         }
10653         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10654         export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
10655                 if(!isWasmInitialized) {
10656                         throw new Error("initializeWasm() must be awaited first!");
10657                 }
10658                 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
10659                 return decodeArray(nativeResponseValue);
10660         }
10661         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10662         export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
10663                 if(!isWasmInitialized) {
10664                         throw new Error("initializeWasm() must be awaited first!");
10665                 }
10666                 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
10667                 // debug statements here
10668         }
10669         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10670         export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
10671                 if(!isWasmInitialized) {
10672                         throw new Error("initializeWasm() must be awaited first!");
10673                 }
10674                 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
10675                 return decodeArray(nativeResponseValue);
10676         }
10677         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10678         export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
10679                 if(!isWasmInitialized) {
10680                         throw new Error("initializeWasm() must be awaited first!");
10681                 }
10682                 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
10683                 // debug statements here
10684         }
10685         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10686         export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
10687                 if(!isWasmInitialized) {
10688                         throw new Error("initializeWasm() must be awaited first!");
10689                 }
10690                 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
10691                 return decodeArray(nativeResponseValue);
10692         }
10693         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10694         export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
10695                 if(!isWasmInitialized) {
10696                         throw new Error("initializeWasm() must be awaited first!");
10697                 }
10698                 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
10699                 // debug statements here
10700         }
10701         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
10702         export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
10703                 if(!isWasmInitialized) {
10704                         throw new Error("initializeWasm() must be awaited first!");
10705                 }
10706                 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
10707                 return decodeArray(nativeResponseValue);
10708         }
10709         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10710         export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
10711                 if(!isWasmInitialized) {
10712                         throw new Error("initializeWasm() must be awaited first!");
10713                 }
10714                 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
10715                 // debug statements here
10716         }
10717         // 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);
10718         export function ChannelPublicKeys_new(funding_pubkey_arg: Uint8Array, revocation_basepoint_arg: Uint8Array, payment_point_arg: Uint8Array, delayed_payment_basepoint_arg: Uint8Array, htlc_basepoint_arg: Uint8Array): number {
10719                 if(!isWasmInitialized) {
10720                         throw new Error("initializeWasm() must be awaited first!");
10721                 }
10722                 const nativeResponseValue = wasm.ChannelPublicKeys_new(encodeArray(funding_pubkey_arg), encodeArray(revocation_basepoint_arg), encodeArray(payment_point_arg), encodeArray(delayed_payment_basepoint_arg), encodeArray(htlc_basepoint_arg));
10723                 return nativeResponseValue;
10724         }
10725         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
10726         export function ChannelPublicKeys_clone(orig: number): number {
10727                 if(!isWasmInitialized) {
10728                         throw new Error("initializeWasm() must be awaited first!");
10729                 }
10730                 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
10731                 return nativeResponseValue;
10732         }
10733         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
10734         export function ChannelPublicKeys_write(obj: number): Uint8Array {
10735                 if(!isWasmInitialized) {
10736                         throw new Error("initializeWasm() must be awaited first!");
10737                 }
10738                 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
10739                 return decodeArray(nativeResponseValue);
10740         }
10741         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
10742         export function ChannelPublicKeys_read(ser: Uint8Array): number {
10743                 if(!isWasmInitialized) {
10744                         throw new Error("initializeWasm() must be awaited first!");
10745                 }
10746                 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
10747                 return nativeResponseValue;
10748         }
10749         // 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);
10750         export function TxCreationKeys_derive_new(per_commitment_point: Uint8Array, broadcaster_delayed_payment_base: Uint8Array, broadcaster_htlc_base: Uint8Array, countersignatory_revocation_base: Uint8Array, countersignatory_htlc_base: Uint8Array): number {
10751                 if(!isWasmInitialized) {
10752                         throw new Error("initializeWasm() must be awaited first!");
10753                 }
10754                 const nativeResponseValue = wasm.TxCreationKeys_derive_new(encodeArray(per_commitment_point), encodeArray(broadcaster_delayed_payment_base), encodeArray(broadcaster_htlc_base), encodeArray(countersignatory_revocation_base), encodeArray(countersignatory_htlc_base));
10755                 return nativeResponseValue;
10756         }
10757         // 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);
10758         export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
10759                 if(!isWasmInitialized) {
10760                         throw new Error("initializeWasm() must be awaited first!");
10761                 }
10762                 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
10763                 return nativeResponseValue;
10764         }
10765         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
10766         export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
10767                 if(!isWasmInitialized) {
10768                         throw new Error("initializeWasm() must be awaited first!");
10769                 }
10770                 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
10771                 return decodeArray(nativeResponseValue);
10772         }
10773         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
10774         export function HTLCOutputInCommitment_free(this_obj: number): void {
10775                 if(!isWasmInitialized) {
10776                         throw new Error("initializeWasm() must be awaited first!");
10777                 }
10778                 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
10779                 // debug statements here
10780         }
10781         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10782         export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
10783                 if(!isWasmInitialized) {
10784                         throw new Error("initializeWasm() must be awaited first!");
10785                 }
10786                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
10787                 return nativeResponseValue;
10788         }
10789         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
10790         export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
10791                 if(!isWasmInitialized) {
10792                         throw new Error("initializeWasm() must be awaited first!");
10793                 }
10794                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
10795                 // debug statements here
10796         }
10797         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10798         export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
10799                 if(!isWasmInitialized) {
10800                         throw new Error("initializeWasm() must be awaited first!");
10801                 }
10802                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
10803                 return nativeResponseValue;
10804         }
10805         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
10806         export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
10807                 if(!isWasmInitialized) {
10808                         throw new Error("initializeWasm() must be awaited first!");
10809                 }
10810                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
10811                 // debug statements here
10812         }
10813         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10814         export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
10815                 if(!isWasmInitialized) {
10816                         throw new Error("initializeWasm() must be awaited first!");
10817                 }
10818                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
10819                 return nativeResponseValue;
10820         }
10821         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
10822         export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
10823                 if(!isWasmInitialized) {
10824                         throw new Error("initializeWasm() must be awaited first!");
10825                 }
10826                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
10827                 // debug statements here
10828         }
10829         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
10830         export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
10831                 if(!isWasmInitialized) {
10832                         throw new Error("initializeWasm() must be awaited first!");
10833                 }
10834                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
10835                 return decodeArray(nativeResponseValue);
10836         }
10837         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10838         export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
10839                 if(!isWasmInitialized) {
10840                         throw new Error("initializeWasm() must be awaited first!");
10841                 }
10842                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
10843                 // debug statements here
10844         }
10845         // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
10846         export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
10847                 if(!isWasmInitialized) {
10848                         throw new Error("initializeWasm() must be awaited first!");
10849                 }
10850                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
10851                 return nativeResponseValue;
10852         }
10853         // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
10854         export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
10855                 if(!isWasmInitialized) {
10856                         throw new Error("initializeWasm() must be awaited first!");
10857                 }
10858                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
10859                 // debug statements here
10860         }
10861         // 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);
10862         export function HTLCOutputInCommitment_new(offered_arg: boolean, amount_msat_arg: number, cltv_expiry_arg: number, payment_hash_arg: Uint8Array, transaction_output_index_arg: number): number {
10863                 if(!isWasmInitialized) {
10864                         throw new Error("initializeWasm() must be awaited first!");
10865                 }
10866                 const nativeResponseValue = wasm.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeArray(payment_hash_arg), transaction_output_index_arg);
10867                 return nativeResponseValue;
10868         }
10869         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
10870         export function HTLCOutputInCommitment_clone(orig: number): number {
10871                 if(!isWasmInitialized) {
10872                         throw new Error("initializeWasm() must be awaited first!");
10873                 }
10874                 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
10875                 return nativeResponseValue;
10876         }
10877         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
10878         export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
10879                 if(!isWasmInitialized) {
10880                         throw new Error("initializeWasm() must be awaited first!");
10881                 }
10882                 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
10883                 return decodeArray(nativeResponseValue);
10884         }
10885         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
10886         export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
10887                 if(!isWasmInitialized) {
10888                         throw new Error("initializeWasm() must be awaited first!");
10889                 }
10890                 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
10891                 return nativeResponseValue;
10892         }
10893         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
10894         export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
10895                 if(!isWasmInitialized) {
10896                         throw new Error("initializeWasm() must be awaited first!");
10897                 }
10898                 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
10899                 return decodeArray(nativeResponseValue);
10900         }
10901         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
10902         export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
10903                 if(!isWasmInitialized) {
10904                         throw new Error("initializeWasm() must be awaited first!");
10905                 }
10906                 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
10907                 return decodeArray(nativeResponseValue);
10908         }
10909         // struct LDKTransaction build_htlc_transaction(const uint8_t (*prev_hash)[32], uint32_t feerate_per_kw, uint16_t contest_delay, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, struct LDKPublicKey broadcaster_delayed_payment_key, struct LDKPublicKey revocation_key);
10910         export function build_htlc_transaction(prev_hash: Uint8Array, feerate_per_kw: number, contest_delay: number, htlc: number, broadcaster_delayed_payment_key: Uint8Array, revocation_key: Uint8Array): Uint8Array {
10911                 if(!isWasmInitialized) {
10912                         throw new Error("initializeWasm() must be awaited first!");
10913                 }
10914                 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(prev_hash), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
10915                 return decodeArray(nativeResponseValue);
10916         }
10917         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
10918         export function ChannelTransactionParameters_free(this_obj: number): void {
10919                 if(!isWasmInitialized) {
10920                         throw new Error("initializeWasm() must be awaited first!");
10921                 }
10922                 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
10923                 // debug statements here
10924         }
10925         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10926         export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
10927                 if(!isWasmInitialized) {
10928                         throw new Error("initializeWasm() must be awaited first!");
10929                 }
10930                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
10931                 return nativeResponseValue;
10932         }
10933         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
10934         export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
10935                 if(!isWasmInitialized) {
10936                         throw new Error("initializeWasm() must be awaited first!");
10937                 }
10938                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
10939                 // debug statements here
10940         }
10941         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10942         export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
10943                 if(!isWasmInitialized) {
10944                         throw new Error("initializeWasm() must be awaited first!");
10945                 }
10946                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
10947                 return nativeResponseValue;
10948         }
10949         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
10950         export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
10951                 if(!isWasmInitialized) {
10952                         throw new Error("initializeWasm() must be awaited first!");
10953                 }
10954                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
10955                 // debug statements here
10956         }
10957         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10958         export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
10959                 if(!isWasmInitialized) {
10960                         throw new Error("initializeWasm() must be awaited first!");
10961                 }
10962                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
10963                 return nativeResponseValue;
10964         }
10965         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
10966         export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
10967                 if(!isWasmInitialized) {
10968                         throw new Error("initializeWasm() must be awaited first!");
10969                 }
10970                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
10971                 // debug statements here
10972         }
10973         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10974         export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
10975                 if(!isWasmInitialized) {
10976                         throw new Error("initializeWasm() must be awaited first!");
10977                 }
10978                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
10979                 return nativeResponseValue;
10980         }
10981         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
10982         export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
10983                 if(!isWasmInitialized) {
10984                         throw new Error("initializeWasm() must be awaited first!");
10985                 }
10986                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
10987                 // debug statements here
10988         }
10989         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
10990         export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
10991                 if(!isWasmInitialized) {
10992                         throw new Error("initializeWasm() must be awaited first!");
10993                 }
10994                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
10995                 return nativeResponseValue;
10996         }
10997         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
10998         export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
10999                 if(!isWasmInitialized) {
11000                         throw new Error("initializeWasm() must be awaited first!");
11001                 }
11002                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
11003                 // debug statements here
11004         }
11005         // 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);
11006         export function ChannelTransactionParameters_new(holder_pubkeys_arg: number, holder_selected_contest_delay_arg: number, is_outbound_from_holder_arg: boolean, counterparty_parameters_arg: number, funding_outpoint_arg: number): number {
11007                 if(!isWasmInitialized) {
11008                         throw new Error("initializeWasm() must be awaited first!");
11009                 }
11010                 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
11011                 return nativeResponseValue;
11012         }
11013         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
11014         export function ChannelTransactionParameters_clone(orig: number): number {
11015                 if(!isWasmInitialized) {
11016                         throw new Error("initializeWasm() must be awaited first!");
11017                 }
11018                 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
11019                 return nativeResponseValue;
11020         }
11021         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
11022         export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
11023                 if(!isWasmInitialized) {
11024                         throw new Error("initializeWasm() must be awaited first!");
11025                 }
11026                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
11027                 // debug statements here
11028         }
11029         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
11030         export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
11031                 if(!isWasmInitialized) {
11032                         throw new Error("initializeWasm() must be awaited first!");
11033                 }
11034                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
11035                 return nativeResponseValue;
11036         }
11037         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
11038         export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
11039                 if(!isWasmInitialized) {
11040                         throw new Error("initializeWasm() must be awaited first!");
11041                 }
11042                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
11043                 // debug statements here
11044         }
11045         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
11046         export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
11047                 if(!isWasmInitialized) {
11048                         throw new Error("initializeWasm() must be awaited first!");
11049                 }
11050                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
11051                 return nativeResponseValue;
11052         }
11053         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
11054         export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
11055                 if(!isWasmInitialized) {
11056                         throw new Error("initializeWasm() must be awaited first!");
11057                 }
11058                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
11059                 // debug statements here
11060         }
11061         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
11062         export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
11063                 if(!isWasmInitialized) {
11064                         throw new Error("initializeWasm() must be awaited first!");
11065                 }
11066                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
11067                 return nativeResponseValue;
11068         }
11069         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
11070         export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
11071                 if(!isWasmInitialized) {
11072                         throw new Error("initializeWasm() must be awaited first!");
11073                 }
11074                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
11075                 return nativeResponseValue;
11076         }
11077         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
11078         export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
11079                 if(!isWasmInitialized) {
11080                         throw new Error("initializeWasm() must be awaited first!");
11081                 }
11082                 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
11083                 return nativeResponseValue;
11084         }
11085         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
11086         export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
11087                 if(!isWasmInitialized) {
11088                         throw new Error("initializeWasm() must be awaited first!");
11089                 }
11090                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
11091                 return nativeResponseValue;
11092         }
11093         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
11094         export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
11095                 if(!isWasmInitialized) {
11096                         throw new Error("initializeWasm() must be awaited first!");
11097                 }
11098                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
11099                 return nativeResponseValue;
11100         }
11101         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
11102         export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
11103                 if(!isWasmInitialized) {
11104                         throw new Error("initializeWasm() must be awaited first!");
11105                 }
11106                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
11107                 return decodeArray(nativeResponseValue);
11108         }
11109         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
11110         export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
11111                 if(!isWasmInitialized) {
11112                         throw new Error("initializeWasm() must be awaited first!");
11113                 }
11114                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
11115                 return nativeResponseValue;
11116         }
11117         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
11118         export function ChannelTransactionParameters_write(obj: number): Uint8Array {
11119                 if(!isWasmInitialized) {
11120                         throw new Error("initializeWasm() must be awaited first!");
11121                 }
11122                 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
11123                 return decodeArray(nativeResponseValue);
11124         }
11125         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
11126         export function ChannelTransactionParameters_read(ser: Uint8Array): number {
11127                 if(!isWasmInitialized) {
11128                         throw new Error("initializeWasm() must be awaited first!");
11129                 }
11130                 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
11131                 return nativeResponseValue;
11132         }
11133         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
11134         export function DirectedChannelTransactionParameters_free(this_obj: number): void {
11135                 if(!isWasmInitialized) {
11136                         throw new Error("initializeWasm() must be awaited first!");
11137                 }
11138                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
11139                 // debug statements here
11140         }
11141         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
11142         export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
11143                 if(!isWasmInitialized) {
11144                         throw new Error("initializeWasm() must be awaited first!");
11145                 }
11146                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
11147                 return nativeResponseValue;
11148         }
11149         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
11150         export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
11151                 if(!isWasmInitialized) {
11152                         throw new Error("initializeWasm() must be awaited first!");
11153                 }
11154                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
11155                 return nativeResponseValue;
11156         }
11157         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
11158         export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
11159                 if(!isWasmInitialized) {
11160                         throw new Error("initializeWasm() must be awaited first!");
11161                 }
11162                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
11163                 return nativeResponseValue;
11164         }
11165         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
11166         export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
11167                 if(!isWasmInitialized) {
11168                         throw new Error("initializeWasm() must be awaited first!");
11169                 }
11170                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
11171                 return nativeResponseValue;
11172         }
11173         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
11174         export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
11175                 if(!isWasmInitialized) {
11176                         throw new Error("initializeWasm() must be awaited first!");
11177                 }
11178                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
11179                 return nativeResponseValue;
11180         }
11181         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
11182         export function HolderCommitmentTransaction_free(this_obj: number): void {
11183                 if(!isWasmInitialized) {
11184                         throw new Error("initializeWasm() must be awaited first!");
11185                 }
11186                 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
11187                 // debug statements here
11188         }
11189         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
11190         export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
11191                 if(!isWasmInitialized) {
11192                         throw new Error("initializeWasm() must be awaited first!");
11193                 }
11194                 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
11195                 return decodeArray(nativeResponseValue);
11196         }
11197         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
11198         export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
11199                 if(!isWasmInitialized) {
11200                         throw new Error("initializeWasm() must be awaited first!");
11201                 }
11202                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
11203                 // debug statements here
11204         }
11205         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
11206         export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
11207                 if(!isWasmInitialized) {
11208                         throw new Error("initializeWasm() must be awaited first!");
11209                 }
11210                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
11211                 // debug statements here
11212         }
11213         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
11214         export function HolderCommitmentTransaction_clone(orig: number): number {
11215                 if(!isWasmInitialized) {
11216                         throw new Error("initializeWasm() must be awaited first!");
11217                 }
11218                 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
11219                 return nativeResponseValue;
11220         }
11221         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
11222         export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
11223                 if(!isWasmInitialized) {
11224                         throw new Error("initializeWasm() must be awaited first!");
11225                 }
11226                 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
11227                 return decodeArray(nativeResponseValue);
11228         }
11229         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
11230         export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
11231                 if(!isWasmInitialized) {
11232                         throw new Error("initializeWasm() must be awaited first!");
11233                 }
11234                 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
11235                 return nativeResponseValue;
11236         }
11237         // 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);
11238         export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
11239                 if(!isWasmInitialized) {
11240                         throw new Error("initializeWasm() must be awaited first!");
11241                 }
11242                 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
11243                 return nativeResponseValue;
11244         }
11245         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
11246         export function BuiltCommitmentTransaction_free(this_obj: number): void {
11247                 if(!isWasmInitialized) {
11248                         throw new Error("initializeWasm() must be awaited first!");
11249                 }
11250                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
11251                 // debug statements here
11252         }
11253         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
11254         export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
11255                 if(!isWasmInitialized) {
11256                         throw new Error("initializeWasm() must be awaited first!");
11257                 }
11258                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
11259                 return decodeArray(nativeResponseValue);
11260         }
11261         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
11262         export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
11263                 if(!isWasmInitialized) {
11264                         throw new Error("initializeWasm() must be awaited first!");
11265                 }
11266                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
11267                 // debug statements here
11268         }
11269         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
11270         export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
11271                 if(!isWasmInitialized) {
11272                         throw new Error("initializeWasm() must be awaited first!");
11273                 }
11274                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
11275                 return decodeArray(nativeResponseValue);
11276         }
11277         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11278         export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
11279                 if(!isWasmInitialized) {
11280                         throw new Error("initializeWasm() must be awaited first!");
11281                 }
11282                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
11283                 // debug statements here
11284         }
11285         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
11286         export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
11287                 if(!isWasmInitialized) {
11288                         throw new Error("initializeWasm() must be awaited first!");
11289                 }
11290                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
11291                 return nativeResponseValue;
11292         }
11293         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
11294         export function BuiltCommitmentTransaction_clone(orig: number): number {
11295                 if(!isWasmInitialized) {
11296                         throw new Error("initializeWasm() must be awaited first!");
11297                 }
11298                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
11299                 return nativeResponseValue;
11300         }
11301         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
11302         export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
11303                 if(!isWasmInitialized) {
11304                         throw new Error("initializeWasm() must be awaited first!");
11305                 }
11306                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
11307                 return decodeArray(nativeResponseValue);
11308         }
11309         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
11310         export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
11311                 if(!isWasmInitialized) {
11312                         throw new Error("initializeWasm() must be awaited first!");
11313                 }
11314                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
11315                 return nativeResponseValue;
11316         }
11317         // 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);
11318         export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
11319                 if(!isWasmInitialized) {
11320                         throw new Error("initializeWasm() must be awaited first!");
11321                 }
11322                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
11323                 return decodeArray(nativeResponseValue);
11324         }
11325         // 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);
11326         export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
11327                 if(!isWasmInitialized) {
11328                         throw new Error("initializeWasm() must be awaited first!");
11329                 }
11330                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
11331                 return decodeArray(nativeResponseValue);
11332         }
11333         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
11334         export function CommitmentTransaction_free(this_obj: number): void {
11335                 if(!isWasmInitialized) {
11336                         throw new Error("initializeWasm() must be awaited first!");
11337                 }
11338                 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
11339                 // debug statements here
11340         }
11341         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
11342         export function CommitmentTransaction_clone(orig: number): number {
11343                 if(!isWasmInitialized) {
11344                         throw new Error("initializeWasm() must be awaited first!");
11345                 }
11346                 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
11347                 return nativeResponseValue;
11348         }
11349         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
11350         export function CommitmentTransaction_write(obj: number): Uint8Array {
11351                 if(!isWasmInitialized) {
11352                         throw new Error("initializeWasm() must be awaited first!");
11353                 }
11354                 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
11355                 return decodeArray(nativeResponseValue);
11356         }
11357         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
11358         export function CommitmentTransaction_read(ser: Uint8Array): number {
11359                 if(!isWasmInitialized) {
11360                         throw new Error("initializeWasm() must be awaited first!");
11361                 }
11362                 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
11363                 return nativeResponseValue;
11364         }
11365         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11366         export function CommitmentTransaction_commitment_number(this_arg: number): number {
11367                 if(!isWasmInitialized) {
11368                         throw new Error("initializeWasm() must be awaited first!");
11369                 }
11370                 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
11371                 return nativeResponseValue;
11372         }
11373         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11374         export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
11375                 if(!isWasmInitialized) {
11376                         throw new Error("initializeWasm() must be awaited first!");
11377                 }
11378                 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
11379                 return nativeResponseValue;
11380         }
11381         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11382         export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
11383                 if(!isWasmInitialized) {
11384                         throw new Error("initializeWasm() must be awaited first!");
11385                 }
11386                 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
11387                 return nativeResponseValue;
11388         }
11389         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11390         export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
11391                 if(!isWasmInitialized) {
11392                         throw new Error("initializeWasm() must be awaited first!");
11393                 }
11394                 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
11395                 return nativeResponseValue;
11396         }
11397         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
11398         export function CommitmentTransaction_trust(this_arg: number): number {
11399                 if(!isWasmInitialized) {
11400                         throw new Error("initializeWasm() must be awaited first!");
11401                 }
11402                 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
11403                 return nativeResponseValue;
11404         }
11405         // 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);
11406         export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
11407                 if(!isWasmInitialized) {
11408                         throw new Error("initializeWasm() must be awaited first!");
11409                 }
11410                 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
11411                 return nativeResponseValue;
11412         }
11413         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
11414         export function TrustedCommitmentTransaction_free(this_obj: number): void {
11415                 if(!isWasmInitialized) {
11416                         throw new Error("initializeWasm() must be awaited first!");
11417                 }
11418                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
11419                 // debug statements here
11420         }
11421         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11422         export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
11423                 if(!isWasmInitialized) {
11424                         throw new Error("initializeWasm() must be awaited first!");
11425                 }
11426                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
11427                 return decodeArray(nativeResponseValue);
11428         }
11429         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11430         export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
11431                 if(!isWasmInitialized) {
11432                         throw new Error("initializeWasm() must be awaited first!");
11433                 }
11434                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
11435                 return nativeResponseValue;
11436         }
11437         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
11438         export function TrustedCommitmentTransaction_keys(this_arg: number): number {
11439                 if(!isWasmInitialized) {
11440                         throw new Error("initializeWasm() must be awaited first!");
11441                 }
11442                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
11443                 return nativeResponseValue;
11444         }
11445         // 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);
11446         export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
11447                 if(!isWasmInitialized) {
11448                         throw new Error("initializeWasm() must be awaited first!");
11449                 }
11450                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
11451                 return nativeResponseValue;
11452         }
11453         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
11454         export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
11455                 if(!isWasmInitialized) {
11456                         throw new Error("initializeWasm() must be awaited first!");
11457                 }
11458                 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
11459                 return nativeResponseValue;
11460         }
11461         // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
11462         export function InitFeatures_clone(orig: number): number {
11463                 if(!isWasmInitialized) {
11464                         throw new Error("initializeWasm() must be awaited first!");
11465                 }
11466                 const nativeResponseValue = wasm.InitFeatures_clone(orig);
11467                 return nativeResponseValue;
11468         }
11469         // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
11470         export function NodeFeatures_clone(orig: number): number {
11471                 if(!isWasmInitialized) {
11472                         throw new Error("initializeWasm() must be awaited first!");
11473                 }
11474                 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
11475                 return nativeResponseValue;
11476         }
11477         // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
11478         export function ChannelFeatures_clone(orig: number): number {
11479                 if(!isWasmInitialized) {
11480                         throw new Error("initializeWasm() must be awaited first!");
11481                 }
11482                 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
11483                 return nativeResponseValue;
11484         }
11485         // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
11486         export function InvoiceFeatures_clone(orig: number): number {
11487                 if(!isWasmInitialized) {
11488                         throw new Error("initializeWasm() must be awaited first!");
11489                 }
11490                 const nativeResponseValue = wasm.InvoiceFeatures_clone(orig);
11491                 return nativeResponseValue;
11492         }
11493         // void InitFeatures_free(struct LDKInitFeatures this_obj);
11494         export function InitFeatures_free(this_obj: number): void {
11495                 if(!isWasmInitialized) {
11496                         throw new Error("initializeWasm() must be awaited first!");
11497                 }
11498                 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
11499                 // debug statements here
11500         }
11501         // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
11502         export function NodeFeatures_free(this_obj: number): void {
11503                 if(!isWasmInitialized) {
11504                         throw new Error("initializeWasm() must be awaited first!");
11505                 }
11506                 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
11507                 // debug statements here
11508         }
11509         // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
11510         export function ChannelFeatures_free(this_obj: number): void {
11511                 if(!isWasmInitialized) {
11512                         throw new Error("initializeWasm() must be awaited first!");
11513                 }
11514                 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
11515                 // debug statements here
11516         }
11517         // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
11518         export function InvoiceFeatures_free(this_obj: number): void {
11519                 if(!isWasmInitialized) {
11520                         throw new Error("initializeWasm() must be awaited first!");
11521                 }
11522                 const nativeResponseValue = wasm.InvoiceFeatures_free(this_obj);
11523                 // debug statements here
11524         }
11525         // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
11526         export function InitFeatures_empty(): number {
11527                 if(!isWasmInitialized) {
11528                         throw new Error("initializeWasm() must be awaited first!");
11529                 }
11530                 const nativeResponseValue = wasm.InitFeatures_empty();
11531                 return nativeResponseValue;
11532         }
11533         // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
11534         export function InitFeatures_known(): number {
11535                 if(!isWasmInitialized) {
11536                         throw new Error("initializeWasm() must be awaited first!");
11537                 }
11538                 const nativeResponseValue = wasm.InitFeatures_known();
11539                 return nativeResponseValue;
11540         }
11541         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
11542         export function NodeFeatures_empty(): number {
11543                 if(!isWasmInitialized) {
11544                         throw new Error("initializeWasm() must be awaited first!");
11545                 }
11546                 const nativeResponseValue = wasm.NodeFeatures_empty();
11547                 return nativeResponseValue;
11548         }
11549         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
11550         export function NodeFeatures_known(): number {
11551                 if(!isWasmInitialized) {
11552                         throw new Error("initializeWasm() must be awaited first!");
11553                 }
11554                 const nativeResponseValue = wasm.NodeFeatures_known();
11555                 return nativeResponseValue;
11556         }
11557         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
11558         export function ChannelFeatures_empty(): number {
11559                 if(!isWasmInitialized) {
11560                         throw new Error("initializeWasm() must be awaited first!");
11561                 }
11562                 const nativeResponseValue = wasm.ChannelFeatures_empty();
11563                 return nativeResponseValue;
11564         }
11565         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
11566         export function ChannelFeatures_known(): number {
11567                 if(!isWasmInitialized) {
11568                         throw new Error("initializeWasm() must be awaited first!");
11569                 }
11570                 const nativeResponseValue = wasm.ChannelFeatures_known();
11571                 return nativeResponseValue;
11572         }
11573         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
11574         export function InvoiceFeatures_empty(): number {
11575                 if(!isWasmInitialized) {
11576                         throw new Error("initializeWasm() must be awaited first!");
11577                 }
11578                 const nativeResponseValue = wasm.InvoiceFeatures_empty();
11579                 return nativeResponseValue;
11580         }
11581         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
11582         export function InvoiceFeatures_known(): number {
11583                 if(!isWasmInitialized) {
11584                         throw new Error("initializeWasm() must be awaited first!");
11585                 }
11586                 const nativeResponseValue = wasm.InvoiceFeatures_known();
11587                 return nativeResponseValue;
11588         }
11589         // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
11590         export function InitFeatures_write(obj: number): Uint8Array {
11591                 if(!isWasmInitialized) {
11592                         throw new Error("initializeWasm() must be awaited first!");
11593                 }
11594                 const nativeResponseValue = wasm.InitFeatures_write(obj);
11595                 return decodeArray(nativeResponseValue);
11596         }
11597         // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
11598         export function NodeFeatures_write(obj: number): Uint8Array {
11599                 if(!isWasmInitialized) {
11600                         throw new Error("initializeWasm() must be awaited first!");
11601                 }
11602                 const nativeResponseValue = wasm.NodeFeatures_write(obj);
11603                 return decodeArray(nativeResponseValue);
11604         }
11605         // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
11606         export function ChannelFeatures_write(obj: number): Uint8Array {
11607                 if(!isWasmInitialized) {
11608                         throw new Error("initializeWasm() must be awaited first!");
11609                 }
11610                 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
11611                 return decodeArray(nativeResponseValue);
11612         }
11613         // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
11614         export function InvoiceFeatures_write(obj: number): Uint8Array {
11615                 if(!isWasmInitialized) {
11616                         throw new Error("initializeWasm() must be awaited first!");
11617                 }
11618                 const nativeResponseValue = wasm.InvoiceFeatures_write(obj);
11619                 return decodeArray(nativeResponseValue);
11620         }
11621         // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
11622         export function InitFeatures_read(ser: Uint8Array): number {
11623                 if(!isWasmInitialized) {
11624                         throw new Error("initializeWasm() must be awaited first!");
11625                 }
11626                 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
11627                 return nativeResponseValue;
11628         }
11629         // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
11630         export function NodeFeatures_read(ser: Uint8Array): number {
11631                 if(!isWasmInitialized) {
11632                         throw new Error("initializeWasm() must be awaited first!");
11633                 }
11634                 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
11635                 return nativeResponseValue;
11636         }
11637         // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
11638         export function ChannelFeatures_read(ser: Uint8Array): number {
11639                 if(!isWasmInitialized) {
11640                         throw new Error("initializeWasm() must be awaited first!");
11641                 }
11642                 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
11643                 return nativeResponseValue;
11644         }
11645         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
11646         export function InvoiceFeatures_read(ser: Uint8Array): number {
11647                 if(!isWasmInitialized) {
11648                         throw new Error("initializeWasm() must be awaited first!");
11649                 }
11650                 const nativeResponseValue = wasm.InvoiceFeatures_read(encodeArray(ser));
11651                 return nativeResponseValue;
11652         }
11653         // void RouteHop_free(struct LDKRouteHop this_obj);
11654         export function RouteHop_free(this_obj: number): void {
11655                 if(!isWasmInitialized) {
11656                         throw new Error("initializeWasm() must be awaited first!");
11657                 }
11658                 const nativeResponseValue = wasm.RouteHop_free(this_obj);
11659                 // debug statements here
11660         }
11661         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11662         export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
11663                 if(!isWasmInitialized) {
11664                         throw new Error("initializeWasm() must be awaited first!");
11665                 }
11666                 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
11667                 return decodeArray(nativeResponseValue);
11668         }
11669         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11670         export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
11671                 if(!isWasmInitialized) {
11672                         throw new Error("initializeWasm() must be awaited first!");
11673                 }
11674                 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
11675                 // debug statements here
11676         }
11677         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11678         export function RouteHop_get_node_features(this_ptr: number): number {
11679                 if(!isWasmInitialized) {
11680                         throw new Error("initializeWasm() must be awaited first!");
11681                 }
11682                 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
11683                 return nativeResponseValue;
11684         }
11685         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
11686         export function RouteHop_set_node_features(this_ptr: number, val: number): void {
11687                 if(!isWasmInitialized) {
11688                         throw new Error("initializeWasm() must be awaited first!");
11689                 }
11690                 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
11691                 // debug statements here
11692         }
11693         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11694         export function RouteHop_get_short_channel_id(this_ptr: number): number {
11695                 if(!isWasmInitialized) {
11696                         throw new Error("initializeWasm() must be awaited first!");
11697                 }
11698                 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
11699                 return nativeResponseValue;
11700         }
11701         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
11702         export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
11703                 if(!isWasmInitialized) {
11704                         throw new Error("initializeWasm() must be awaited first!");
11705                 }
11706                 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
11707                 // debug statements here
11708         }
11709         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11710         export function RouteHop_get_channel_features(this_ptr: number): number {
11711                 if(!isWasmInitialized) {
11712                         throw new Error("initializeWasm() must be awaited first!");
11713                 }
11714                 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
11715                 return nativeResponseValue;
11716         }
11717         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
11718         export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
11719                 if(!isWasmInitialized) {
11720                         throw new Error("initializeWasm() must be awaited first!");
11721                 }
11722                 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
11723                 // debug statements here
11724         }
11725         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11726         export function RouteHop_get_fee_msat(this_ptr: number): number {
11727                 if(!isWasmInitialized) {
11728                         throw new Error("initializeWasm() must be awaited first!");
11729                 }
11730                 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
11731                 return nativeResponseValue;
11732         }
11733         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
11734         export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
11735                 if(!isWasmInitialized) {
11736                         throw new Error("initializeWasm() must be awaited first!");
11737                 }
11738                 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
11739                 // debug statements here
11740         }
11741         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
11742         export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
11743                 if(!isWasmInitialized) {
11744                         throw new Error("initializeWasm() must be awaited first!");
11745                 }
11746                 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
11747                 return nativeResponseValue;
11748         }
11749         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
11750         export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11751                 if(!isWasmInitialized) {
11752                         throw new Error("initializeWasm() must be awaited first!");
11753                 }
11754                 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
11755                 // debug statements here
11756         }
11757         // 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);
11758         export function RouteHop_new(pubkey_arg: Uint8Array, node_features_arg: number, short_channel_id_arg: number, channel_features_arg: number, fee_msat_arg: number, cltv_expiry_delta_arg: number): number {
11759                 if(!isWasmInitialized) {
11760                         throw new Error("initializeWasm() must be awaited first!");
11761                 }
11762                 const nativeResponseValue = wasm.RouteHop_new(encodeArray(pubkey_arg), node_features_arg, short_channel_id_arg, channel_features_arg, fee_msat_arg, cltv_expiry_delta_arg);
11763                 return nativeResponseValue;
11764         }
11765         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
11766         export function RouteHop_clone(orig: number): number {
11767                 if(!isWasmInitialized) {
11768                         throw new Error("initializeWasm() must be awaited first!");
11769                 }
11770                 const nativeResponseValue = wasm.RouteHop_clone(orig);
11771                 return nativeResponseValue;
11772         }
11773         // void Route_free(struct LDKRoute this_obj);
11774         export function Route_free(this_obj: number): void {
11775                 if(!isWasmInitialized) {
11776                         throw new Error("initializeWasm() must be awaited first!");
11777                 }
11778                 const nativeResponseValue = wasm.Route_free(this_obj);
11779                 // debug statements here
11780         }
11781         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
11782         export function Route_set_paths(this_ptr: number, val: number[][]): void {
11783                 if(!isWasmInitialized) {
11784                         throw new Error("initializeWasm() must be awaited first!");
11785                 }
11786                 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
11787                 // debug statements here
11788         }
11789         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
11790         export function Route_new(paths_arg: number[][]): number {
11791                 if(!isWasmInitialized) {
11792                         throw new Error("initializeWasm() must be awaited first!");
11793                 }
11794                 const nativeResponseValue = wasm.Route_new(paths_arg);
11795                 return nativeResponseValue;
11796         }
11797         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
11798         export function Route_clone(orig: number): number {
11799                 if(!isWasmInitialized) {
11800                         throw new Error("initializeWasm() must be awaited first!");
11801                 }
11802                 const nativeResponseValue = wasm.Route_clone(orig);
11803                 return nativeResponseValue;
11804         }
11805         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
11806         export function Route_write(obj: number): Uint8Array {
11807                 if(!isWasmInitialized) {
11808                         throw new Error("initializeWasm() must be awaited first!");
11809                 }
11810                 const nativeResponseValue = wasm.Route_write(obj);
11811                 return decodeArray(nativeResponseValue);
11812         }
11813         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
11814         export function Route_read(ser: Uint8Array): number {
11815                 if(!isWasmInitialized) {
11816                         throw new Error("initializeWasm() must be awaited first!");
11817                 }
11818                 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
11819                 return nativeResponseValue;
11820         }
11821         // void RouteHint_free(struct LDKRouteHint this_obj);
11822         export function RouteHint_free(this_obj: number): void {
11823                 if(!isWasmInitialized) {
11824                         throw new Error("initializeWasm() must be awaited first!");
11825                 }
11826                 const nativeResponseValue = wasm.RouteHint_free(this_obj);
11827                 // debug statements here
11828         }
11829         // struct LDKPublicKey RouteHint_get_src_node_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11830         export function RouteHint_get_src_node_id(this_ptr: number): Uint8Array {
11831                 if(!isWasmInitialized) {
11832                         throw new Error("initializeWasm() must be awaited first!");
11833                 }
11834                 const nativeResponseValue = wasm.RouteHint_get_src_node_id(this_ptr);
11835                 return decodeArray(nativeResponseValue);
11836         }
11837         // void RouteHint_set_src_node_id(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11838         export function RouteHint_set_src_node_id(this_ptr: number, val: Uint8Array): void {
11839                 if(!isWasmInitialized) {
11840                         throw new Error("initializeWasm() must be awaited first!");
11841                 }
11842                 const nativeResponseValue = wasm.RouteHint_set_src_node_id(this_ptr, encodeArray(val));
11843                 // debug statements here
11844         }
11845         // uint64_t RouteHint_get_short_channel_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11846         export function RouteHint_get_short_channel_id(this_ptr: number): number {
11847                 if(!isWasmInitialized) {
11848                         throw new Error("initializeWasm() must be awaited first!");
11849                 }
11850                 const nativeResponseValue = wasm.RouteHint_get_short_channel_id(this_ptr);
11851                 return nativeResponseValue;
11852         }
11853         // void RouteHint_set_short_channel_id(struct LDKRouteHint *NONNULL_PTR this_ptr, uint64_t val);
11854         export function RouteHint_set_short_channel_id(this_ptr: number, val: number): void {
11855                 if(!isWasmInitialized) {
11856                         throw new Error("initializeWasm() must be awaited first!");
11857                 }
11858                 const nativeResponseValue = wasm.RouteHint_set_short_channel_id(this_ptr, val);
11859                 // debug statements here
11860         }
11861         // struct LDKRoutingFees RouteHint_get_fees(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11862         export function RouteHint_get_fees(this_ptr: number): number {
11863                 if(!isWasmInitialized) {
11864                         throw new Error("initializeWasm() must be awaited first!");
11865                 }
11866                 const nativeResponseValue = wasm.RouteHint_get_fees(this_ptr);
11867                 return nativeResponseValue;
11868         }
11869         // void RouteHint_set_fees(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
11870         export function RouteHint_set_fees(this_ptr: number, val: number): void {
11871                 if(!isWasmInitialized) {
11872                         throw new Error("initializeWasm() must be awaited first!");
11873                 }
11874                 const nativeResponseValue = wasm.RouteHint_set_fees(this_ptr, val);
11875                 // debug statements here
11876         }
11877         // uint16_t RouteHint_get_cltv_expiry_delta(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11878         export function RouteHint_get_cltv_expiry_delta(this_ptr: number): number {
11879                 if(!isWasmInitialized) {
11880                         throw new Error("initializeWasm() must be awaited first!");
11881                 }
11882                 const nativeResponseValue = wasm.RouteHint_get_cltv_expiry_delta(this_ptr);
11883                 return nativeResponseValue;
11884         }
11885         // void RouteHint_set_cltv_expiry_delta(struct LDKRouteHint *NONNULL_PTR this_ptr, uint16_t val);
11886         export function RouteHint_set_cltv_expiry_delta(this_ptr: number, val: number): void {
11887                 if(!isWasmInitialized) {
11888                         throw new Error("initializeWasm() must be awaited first!");
11889                 }
11890                 const nativeResponseValue = wasm.RouteHint_set_cltv_expiry_delta(this_ptr, val);
11891                 // debug statements here
11892         }
11893         // struct LDKCOption_u64Z RouteHint_get_htlc_minimum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11894         export function RouteHint_get_htlc_minimum_msat(this_ptr: number): number {
11895                 if(!isWasmInitialized) {
11896                         throw new Error("initializeWasm() must be awaited first!");
11897                 }
11898                 const nativeResponseValue = wasm.RouteHint_get_htlc_minimum_msat(this_ptr);
11899                 return nativeResponseValue;
11900         }
11901         // void RouteHint_set_htlc_minimum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
11902         export function RouteHint_set_htlc_minimum_msat(this_ptr: number, val: number): void {
11903                 if(!isWasmInitialized) {
11904                         throw new Error("initializeWasm() must be awaited first!");
11905                 }
11906                 const nativeResponseValue = wasm.RouteHint_set_htlc_minimum_msat(this_ptr, val);
11907                 // debug statements here
11908         }
11909         // struct LDKCOption_u64Z RouteHint_get_htlc_maximum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
11910         export function RouteHint_get_htlc_maximum_msat(this_ptr: number): number {
11911                 if(!isWasmInitialized) {
11912                         throw new Error("initializeWasm() must be awaited first!");
11913                 }
11914                 const nativeResponseValue = wasm.RouteHint_get_htlc_maximum_msat(this_ptr);
11915                 return nativeResponseValue;
11916         }
11917         // void RouteHint_set_htlc_maximum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
11918         export function RouteHint_set_htlc_maximum_msat(this_ptr: number, val: number): void {
11919                 if(!isWasmInitialized) {
11920                         throw new Error("initializeWasm() must be awaited first!");
11921                 }
11922                 const nativeResponseValue = wasm.RouteHint_set_htlc_maximum_msat(this_ptr, val);
11923                 // debug statements here
11924         }
11925         // MUST_USE_RES struct LDKRouteHint RouteHint_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);
11926         export function RouteHint_new(src_node_id_arg: Uint8Array, short_channel_id_arg: number, fees_arg: number, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number): number {
11927                 if(!isWasmInitialized) {
11928                         throw new Error("initializeWasm() must be awaited first!");
11929                 }
11930                 const nativeResponseValue = wasm.RouteHint_new(encodeArray(src_node_id_arg), short_channel_id_arg, fees_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg);
11931                 return nativeResponseValue;
11932         }
11933         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
11934         export function RouteHint_clone(orig: number): number {
11935                 if(!isWasmInitialized) {
11936                         throw new Error("initializeWasm() must be awaited first!");
11937                 }
11938                 const nativeResponseValue = wasm.RouteHint_clone(orig);
11939                 return nativeResponseValue;
11940         }
11941         // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKInvoiceFeatures payee_features, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
11942         export function get_route(our_node_id: Uint8Array, network: number, payee: Uint8Array, payee_features: number, first_hops: number[], last_hops: number[], final_value_msat: number, final_cltv: number, logger: number): number {
11943                 if(!isWasmInitialized) {
11944                         throw new Error("initializeWasm() must be awaited first!");
11945                 }
11946                 const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(payee), payee_features, first_hops, last_hops, final_value_msat, final_cltv, logger);
11947                 return nativeResponseValue;
11948         }
11949         // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
11950         export function NetworkGraph_free(this_obj: number): void {
11951                 if(!isWasmInitialized) {
11952                         throw new Error("initializeWasm() must be awaited first!");
11953                 }
11954                 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
11955                 // debug statements here
11956         }
11957         // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
11958         export function NetworkGraph_clone(orig: number): number {
11959                 if(!isWasmInitialized) {
11960                         throw new Error("initializeWasm() must be awaited first!");
11961                 }
11962                 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
11963                 return nativeResponseValue;
11964         }
11965         // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_obj);
11966         export function LockedNetworkGraph_free(this_obj: number): void {
11967                 if(!isWasmInitialized) {
11968                         throw new Error("initializeWasm() must be awaited first!");
11969                 }
11970                 const nativeResponseValue = wasm.LockedNetworkGraph_free(this_obj);
11971                 // debug statements here
11972         }
11973         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
11974         export function NetGraphMsgHandler_free(this_obj: number): void {
11975                 if(!isWasmInitialized) {
11976                         throw new Error("initializeWasm() must be awaited first!");
11977                 }
11978                 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
11979                 // debug statements here
11980         }
11981         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKThirtyTwoBytes genesis_hash, struct LDKAccess *chain_access, struct LDKLogger logger);
11982         export function NetGraphMsgHandler_new(genesis_hash: Uint8Array, chain_access: number, logger: number): number {
11983                 if(!isWasmInitialized) {
11984                         throw new Error("initializeWasm() must be awaited first!");
11985                 }
11986                 const nativeResponseValue = wasm.NetGraphMsgHandler_new(encodeArray(genesis_hash), chain_access, logger);
11987                 return nativeResponseValue;
11988         }
11989         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(struct LDKAccess *chain_access, struct LDKLogger logger, struct LDKNetworkGraph network_graph);
11990         export function NetGraphMsgHandler_from_net_graph(chain_access: number, logger: number, network_graph: number): number {
11991                 if(!isWasmInitialized) {
11992                         throw new Error("initializeWasm() must be awaited first!");
11993                 }
11994                 const nativeResponseValue = wasm.NetGraphMsgHandler_from_net_graph(chain_access, logger, network_graph);
11995                 return nativeResponseValue;
11996         }
11997         // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKAccess *chain_access);
11998         export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
11999                 if(!isWasmInitialized) {
12000                         throw new Error("initializeWasm() must be awaited first!");
12001                 }
12002                 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
12003                 // debug statements here
12004         }
12005         // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
12006         export function NetGraphMsgHandler_read_locked_graph(this_arg: number): number {
12007                 if(!isWasmInitialized) {
12008                         throw new Error("initializeWasm() must be awaited first!");
12009                 }
12010                 const nativeResponseValue = wasm.NetGraphMsgHandler_read_locked_graph(this_arg);
12011                 return nativeResponseValue;
12012         }
12013         // MUST_USE_RES struct LDKNetworkGraph LockedNetworkGraph_graph(const struct LDKLockedNetworkGraph *NONNULL_PTR this_arg);
12014         export function LockedNetworkGraph_graph(this_arg: number): number {
12015                 if(!isWasmInitialized) {
12016                         throw new Error("initializeWasm() must be awaited first!");
12017                 }
12018                 const nativeResponseValue = wasm.LockedNetworkGraph_graph(this_arg);
12019                 return nativeResponseValue;
12020         }
12021         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
12022         export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
12023                 if(!isWasmInitialized) {
12024                         throw new Error("initializeWasm() must be awaited first!");
12025                 }
12026                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
12027                 return nativeResponseValue;
12028         }
12029         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
12030         export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
12031                 if(!isWasmInitialized) {
12032                         throw new Error("initializeWasm() must be awaited first!");
12033                 }
12034                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
12035                 return nativeResponseValue;
12036         }
12037         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
12038         export function DirectionalChannelInfo_free(this_obj: number): void {
12039                 if(!isWasmInitialized) {
12040                         throw new Error("initializeWasm() must be awaited first!");
12041                 }
12042                 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
12043                 // debug statements here
12044         }
12045         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12046         export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
12047                 if(!isWasmInitialized) {
12048                         throw new Error("initializeWasm() must be awaited first!");
12049                 }
12050                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
12051                 return nativeResponseValue;
12052         }
12053         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
12054         export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
12055                 if(!isWasmInitialized) {
12056                         throw new Error("initializeWasm() must be awaited first!");
12057                 }
12058                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
12059                 // debug statements here
12060         }
12061         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12062         export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
12063                 if(!isWasmInitialized) {
12064                         throw new Error("initializeWasm() must be awaited first!");
12065                 }
12066                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
12067                 return nativeResponseValue;
12068         }
12069         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
12070         export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
12071                 if(!isWasmInitialized) {
12072                         throw new Error("initializeWasm() must be awaited first!");
12073                 }
12074                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
12075                 // debug statements here
12076         }
12077         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12078         export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
12079                 if(!isWasmInitialized) {
12080                         throw new Error("initializeWasm() must be awaited first!");
12081                 }
12082                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
12083                 return nativeResponseValue;
12084         }
12085         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
12086         export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
12087                 if(!isWasmInitialized) {
12088                         throw new Error("initializeWasm() must be awaited first!");
12089                 }
12090                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
12091                 // debug statements here
12092         }
12093         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12094         export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
12095                 if(!isWasmInitialized) {
12096                         throw new Error("initializeWasm() must be awaited first!");
12097                 }
12098                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
12099                 return nativeResponseValue;
12100         }
12101         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
12102         export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
12103                 if(!isWasmInitialized) {
12104                         throw new Error("initializeWasm() must be awaited first!");
12105                 }
12106                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
12107                 // debug statements here
12108         }
12109         // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12110         export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
12111                 if(!isWasmInitialized) {
12112                         throw new Error("initializeWasm() must be awaited first!");
12113                 }
12114                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
12115                 return nativeResponseValue;
12116         }
12117         // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
12118         export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
12119                 if(!isWasmInitialized) {
12120                         throw new Error("initializeWasm() must be awaited first!");
12121                 }
12122                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
12123                 // debug statements here
12124         }
12125         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12126         export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
12127                 if(!isWasmInitialized) {
12128                         throw new Error("initializeWasm() must be awaited first!");
12129                 }
12130                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
12131                 return nativeResponseValue;
12132         }
12133         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
12134         export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
12135                 if(!isWasmInitialized) {
12136                         throw new Error("initializeWasm() must be awaited first!");
12137                 }
12138                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
12139                 // debug statements here
12140         }
12141         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
12142         export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
12143                 if(!isWasmInitialized) {
12144                         throw new Error("initializeWasm() must be awaited first!");
12145                 }
12146                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
12147                 return nativeResponseValue;
12148         }
12149         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
12150         export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
12151                 if(!isWasmInitialized) {
12152                         throw new Error("initializeWasm() must be awaited first!");
12153                 }
12154                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
12155                 // debug statements here
12156         }
12157         // 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);
12158         export function DirectionalChannelInfo_new(last_update_arg: number, enabled_arg: boolean, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number, htlc_maximum_msat_arg: number, fees_arg: number, last_update_message_arg: number): number {
12159                 if(!isWasmInitialized) {
12160                         throw new Error("initializeWasm() must be awaited first!");
12161                 }
12162                 const nativeResponseValue = wasm.DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg, fees_arg, last_update_message_arg);
12163                 return nativeResponseValue;
12164         }
12165         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
12166         export function DirectionalChannelInfo_clone(orig: number): number {
12167                 if(!isWasmInitialized) {
12168                         throw new Error("initializeWasm() must be awaited first!");
12169                 }
12170                 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
12171                 return nativeResponseValue;
12172         }
12173         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
12174         export function DirectionalChannelInfo_write(obj: number): Uint8Array {
12175                 if(!isWasmInitialized) {
12176                         throw new Error("initializeWasm() must be awaited first!");
12177                 }
12178                 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
12179                 return decodeArray(nativeResponseValue);
12180         }
12181         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
12182         export function DirectionalChannelInfo_read(ser: Uint8Array): number {
12183                 if(!isWasmInitialized) {
12184                         throw new Error("initializeWasm() must be awaited first!");
12185                 }
12186                 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
12187                 return nativeResponseValue;
12188         }
12189         // void ChannelInfo_free(struct LDKChannelInfo this_obj);
12190         export function ChannelInfo_free(this_obj: number): void {
12191                 if(!isWasmInitialized) {
12192                         throw new Error("initializeWasm() must be awaited first!");
12193                 }
12194                 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
12195                 // debug statements here
12196         }
12197         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12198         export function ChannelInfo_get_features(this_ptr: number): number {
12199                 if(!isWasmInitialized) {
12200                         throw new Error("initializeWasm() must be awaited first!");
12201                 }
12202                 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
12203                 return nativeResponseValue;
12204         }
12205         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
12206         export function ChannelInfo_set_features(this_ptr: number, val: number): void {
12207                 if(!isWasmInitialized) {
12208                         throw new Error("initializeWasm() must be awaited first!");
12209                 }
12210                 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
12211                 // debug statements here
12212         }
12213         // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12214         export function ChannelInfo_get_node_one(this_ptr: number): Uint8Array {
12215                 if(!isWasmInitialized) {
12216                         throw new Error("initializeWasm() must be awaited first!");
12217                 }
12218                 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
12219                 return decodeArray(nativeResponseValue);
12220         }
12221         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12222         export function ChannelInfo_set_node_one(this_ptr: number, val: Uint8Array): void {
12223                 if(!isWasmInitialized) {
12224                         throw new Error("initializeWasm() must be awaited first!");
12225                 }
12226                 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, encodeArray(val));
12227                 // debug statements here
12228         }
12229         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12230         export function ChannelInfo_get_one_to_two(this_ptr: number): number {
12231                 if(!isWasmInitialized) {
12232                         throw new Error("initializeWasm() must be awaited first!");
12233                 }
12234                 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
12235                 return nativeResponseValue;
12236         }
12237         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
12238         export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
12239                 if(!isWasmInitialized) {
12240                         throw new Error("initializeWasm() must be awaited first!");
12241                 }
12242                 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
12243                 // debug statements here
12244         }
12245         // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12246         export function ChannelInfo_get_node_two(this_ptr: number): Uint8Array {
12247                 if(!isWasmInitialized) {
12248                         throw new Error("initializeWasm() must be awaited first!");
12249                 }
12250                 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
12251                 return decodeArray(nativeResponseValue);
12252         }
12253         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12254         export function ChannelInfo_set_node_two(this_ptr: number, val: Uint8Array): void {
12255                 if(!isWasmInitialized) {
12256                         throw new Error("initializeWasm() must be awaited first!");
12257                 }
12258                 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, encodeArray(val));
12259                 // debug statements here
12260         }
12261         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12262         export function ChannelInfo_get_two_to_one(this_ptr: number): number {
12263                 if(!isWasmInitialized) {
12264                         throw new Error("initializeWasm() must be awaited first!");
12265                 }
12266                 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
12267                 return nativeResponseValue;
12268         }
12269         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
12270         export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
12271                 if(!isWasmInitialized) {
12272                         throw new Error("initializeWasm() must be awaited first!");
12273                 }
12274                 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
12275                 // debug statements here
12276         }
12277         // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12278         export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
12279                 if(!isWasmInitialized) {
12280                         throw new Error("initializeWasm() must be awaited first!");
12281                 }
12282                 const nativeResponseValue = wasm.ChannelInfo_get_capacity_sats(this_ptr);
12283                 return nativeResponseValue;
12284         }
12285         // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
12286         export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
12287                 if(!isWasmInitialized) {
12288                         throw new Error("initializeWasm() must be awaited first!");
12289                 }
12290                 const nativeResponseValue = wasm.ChannelInfo_set_capacity_sats(this_ptr, val);
12291                 // debug statements here
12292         }
12293         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
12294         export function ChannelInfo_get_announcement_message(this_ptr: number): number {
12295                 if(!isWasmInitialized) {
12296                         throw new Error("initializeWasm() must be awaited first!");
12297                 }
12298                 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
12299                 return nativeResponseValue;
12300         }
12301         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
12302         export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
12303                 if(!isWasmInitialized) {
12304                         throw new Error("initializeWasm() must be awaited first!");
12305                 }
12306                 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
12307                 // debug statements here
12308         }
12309         // MUST_USE_RES struct LDKChannelInfo ChannelInfo_new(struct LDKChannelFeatures features_arg, struct LDKPublicKey node_one_arg, struct LDKDirectionalChannelInfo one_to_two_arg, struct LDKPublicKey node_two_arg, struct LDKDirectionalChannelInfo two_to_one_arg, struct LDKCOption_u64Z capacity_sats_arg, struct LDKChannelAnnouncement announcement_message_arg);
12310         export function ChannelInfo_new(features_arg: number, node_one_arg: Uint8Array, one_to_two_arg: number, node_two_arg: Uint8Array, two_to_one_arg: number, capacity_sats_arg: number, announcement_message_arg: number): number {
12311                 if(!isWasmInitialized) {
12312                         throw new Error("initializeWasm() must be awaited first!");
12313                 }
12314                 const nativeResponseValue = wasm.ChannelInfo_new(features_arg, encodeArray(node_one_arg), one_to_two_arg, encodeArray(node_two_arg), two_to_one_arg, capacity_sats_arg, announcement_message_arg);
12315                 return nativeResponseValue;
12316         }
12317         // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
12318         export function ChannelInfo_clone(orig: number): number {
12319                 if(!isWasmInitialized) {
12320                         throw new Error("initializeWasm() must be awaited first!");
12321                 }
12322                 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
12323                 return nativeResponseValue;
12324         }
12325         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
12326         export function ChannelInfo_write(obj: number): Uint8Array {
12327                 if(!isWasmInitialized) {
12328                         throw new Error("initializeWasm() must be awaited first!");
12329                 }
12330                 const nativeResponseValue = wasm.ChannelInfo_write(obj);
12331                 return decodeArray(nativeResponseValue);
12332         }
12333         // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
12334         export function ChannelInfo_read(ser: Uint8Array): number {
12335                 if(!isWasmInitialized) {
12336                         throw new Error("initializeWasm() must be awaited first!");
12337                 }
12338                 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
12339                 return nativeResponseValue;
12340         }
12341         // void RoutingFees_free(struct LDKRoutingFees this_obj);
12342         export function RoutingFees_free(this_obj: number): void {
12343                 if(!isWasmInitialized) {
12344                         throw new Error("initializeWasm() must be awaited first!");
12345                 }
12346                 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
12347                 // debug statements here
12348         }
12349         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
12350         export function RoutingFees_get_base_msat(this_ptr: number): number {
12351                 if(!isWasmInitialized) {
12352                         throw new Error("initializeWasm() must be awaited first!");
12353                 }
12354                 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
12355                 return nativeResponseValue;
12356         }
12357         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
12358         export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
12359                 if(!isWasmInitialized) {
12360                         throw new Error("initializeWasm() must be awaited first!");
12361                 }
12362                 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
12363                 // debug statements here
12364         }
12365         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
12366         export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
12367                 if(!isWasmInitialized) {
12368                         throw new Error("initializeWasm() must be awaited first!");
12369                 }
12370                 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
12371                 return nativeResponseValue;
12372         }
12373         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
12374         export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
12375                 if(!isWasmInitialized) {
12376                         throw new Error("initializeWasm() must be awaited first!");
12377                 }
12378                 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
12379                 // debug statements here
12380         }
12381         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
12382         export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
12383                 if(!isWasmInitialized) {
12384                         throw new Error("initializeWasm() must be awaited first!");
12385                 }
12386                 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
12387                 return nativeResponseValue;
12388         }
12389         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
12390         export function RoutingFees_clone(orig: number): number {
12391                 if(!isWasmInitialized) {
12392                         throw new Error("initializeWasm() must be awaited first!");
12393                 }
12394                 const nativeResponseValue = wasm.RoutingFees_clone(orig);
12395                 return nativeResponseValue;
12396         }
12397         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
12398         export function RoutingFees_read(ser: Uint8Array): number {
12399                 if(!isWasmInitialized) {
12400                         throw new Error("initializeWasm() must be awaited first!");
12401                 }
12402                 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
12403                 return nativeResponseValue;
12404         }
12405         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
12406         export function RoutingFees_write(obj: number): Uint8Array {
12407                 if(!isWasmInitialized) {
12408                         throw new Error("initializeWasm() must be awaited first!");
12409                 }
12410                 const nativeResponseValue = wasm.RoutingFees_write(obj);
12411                 return decodeArray(nativeResponseValue);
12412         }
12413         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
12414         export function NodeAnnouncementInfo_free(this_obj: number): void {
12415                 if(!isWasmInitialized) {
12416                         throw new Error("initializeWasm() must be awaited first!");
12417                 }
12418                 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
12419                 // debug statements here
12420         }
12421         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12422         export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
12423                 if(!isWasmInitialized) {
12424                         throw new Error("initializeWasm() must be awaited first!");
12425                 }
12426                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
12427                 return nativeResponseValue;
12428         }
12429         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
12430         export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
12431                 if(!isWasmInitialized) {
12432                         throw new Error("initializeWasm() must be awaited first!");
12433                 }
12434                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
12435                 // debug statements here
12436         }
12437         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12438         export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
12439                 if(!isWasmInitialized) {
12440                         throw new Error("initializeWasm() must be awaited first!");
12441                 }
12442                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
12443                 return nativeResponseValue;
12444         }
12445         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
12446         export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
12447                 if(!isWasmInitialized) {
12448                         throw new Error("initializeWasm() must be awaited first!");
12449                 }
12450                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
12451                 // debug statements here
12452         }
12453         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
12454         export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
12455                 if(!isWasmInitialized) {
12456                         throw new Error("initializeWasm() must be awaited first!");
12457                 }
12458                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
12459                 return decodeArray(nativeResponseValue);
12460         }
12461         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
12462         export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
12463                 if(!isWasmInitialized) {
12464                         throw new Error("initializeWasm() must be awaited first!");
12465                 }
12466                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
12467                 // debug statements here
12468         }
12469         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
12470         export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
12471                 if(!isWasmInitialized) {
12472                         throw new Error("initializeWasm() must be awaited first!");
12473                 }
12474                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
12475                 return decodeArray(nativeResponseValue);
12476         }
12477         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12478         export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
12479                 if(!isWasmInitialized) {
12480                         throw new Error("initializeWasm() must be awaited first!");
12481                 }
12482                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
12483                 // debug statements here
12484         }
12485         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
12486         export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
12487                 if(!isWasmInitialized) {
12488                         throw new Error("initializeWasm() must be awaited first!");
12489                 }
12490                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
12491                 // debug statements here
12492         }
12493         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
12494         export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
12495                 if(!isWasmInitialized) {
12496                         throw new Error("initializeWasm() must be awaited first!");
12497                 }
12498                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
12499                 return nativeResponseValue;
12500         }
12501         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
12502         export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
12503                 if(!isWasmInitialized) {
12504                         throw new Error("initializeWasm() must be awaited first!");
12505                 }
12506                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
12507                 // debug statements here
12508         }
12509         // 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);
12510         export function NodeAnnouncementInfo_new(features_arg: number, last_update_arg: number, rgb_arg: Uint8Array, alias_arg: Uint8Array, addresses_arg: number[], announcement_message_arg: number): number {
12511                 if(!isWasmInitialized) {
12512                         throw new Error("initializeWasm() must be awaited first!");
12513                 }
12514                 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
12515                 return nativeResponseValue;
12516         }
12517         // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
12518         export function NodeAnnouncementInfo_clone(orig: number): number {
12519                 if(!isWasmInitialized) {
12520                         throw new Error("initializeWasm() must be awaited first!");
12521                 }
12522                 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
12523                 return nativeResponseValue;
12524         }
12525         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
12526         export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
12527                 if(!isWasmInitialized) {
12528                         throw new Error("initializeWasm() must be awaited first!");
12529                 }
12530                 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
12531                 return decodeArray(nativeResponseValue);
12532         }
12533         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
12534         export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
12535                 if(!isWasmInitialized) {
12536                         throw new Error("initializeWasm() must be awaited first!");
12537                 }
12538                 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
12539                 return nativeResponseValue;
12540         }
12541         // void NodeInfo_free(struct LDKNodeInfo this_obj);
12542         export function NodeInfo_free(this_obj: number): void {
12543                 if(!isWasmInitialized) {
12544                         throw new Error("initializeWasm() must be awaited first!");
12545                 }
12546                 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
12547                 // debug statements here
12548         }
12549         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
12550         export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
12551                 if(!isWasmInitialized) {
12552                         throw new Error("initializeWasm() must be awaited first!");
12553                 }
12554                 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
12555                 // debug statements here
12556         }
12557         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
12558         export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
12559                 if(!isWasmInitialized) {
12560                         throw new Error("initializeWasm() must be awaited first!");
12561                 }
12562                 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
12563                 return nativeResponseValue;
12564         }
12565         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
12566         export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
12567                 if(!isWasmInitialized) {
12568                         throw new Error("initializeWasm() must be awaited first!");
12569                 }
12570                 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
12571                 // debug statements here
12572         }
12573         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
12574         export function NodeInfo_get_announcement_info(this_ptr: number): number {
12575                 if(!isWasmInitialized) {
12576                         throw new Error("initializeWasm() must be awaited first!");
12577                 }
12578                 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
12579                 return nativeResponseValue;
12580         }
12581         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
12582         export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
12583                 if(!isWasmInitialized) {
12584                         throw new Error("initializeWasm() must be awaited first!");
12585                 }
12586                 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
12587                 // debug statements here
12588         }
12589         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
12590         export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
12591                 if(!isWasmInitialized) {
12592                         throw new Error("initializeWasm() must be awaited first!");
12593                 }
12594                 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
12595                 return nativeResponseValue;
12596         }
12597         // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
12598         export function NodeInfo_clone(orig: number): number {
12599                 if(!isWasmInitialized) {
12600                         throw new Error("initializeWasm() must be awaited first!");
12601                 }
12602                 const nativeResponseValue = wasm.NodeInfo_clone(orig);
12603                 return nativeResponseValue;
12604         }
12605         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
12606         export function NodeInfo_write(obj: number): Uint8Array {
12607                 if(!isWasmInitialized) {
12608                         throw new Error("initializeWasm() must be awaited first!");
12609                 }
12610                 const nativeResponseValue = wasm.NodeInfo_write(obj);
12611                 return decodeArray(nativeResponseValue);
12612         }
12613         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
12614         export function NodeInfo_read(ser: Uint8Array): number {
12615                 if(!isWasmInitialized) {
12616                         throw new Error("initializeWasm() must be awaited first!");
12617                 }
12618                 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
12619                 return nativeResponseValue;
12620         }
12621         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
12622         export function NetworkGraph_write(obj: number): Uint8Array {
12623                 if(!isWasmInitialized) {
12624                         throw new Error("initializeWasm() must be awaited first!");
12625                 }
12626                 const nativeResponseValue = wasm.NetworkGraph_write(obj);
12627                 return decodeArray(nativeResponseValue);
12628         }
12629         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
12630         export function NetworkGraph_read(ser: Uint8Array): number {
12631                 if(!isWasmInitialized) {
12632                         throw new Error("initializeWasm() must be awaited first!");
12633                 }
12634                 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
12635                 return nativeResponseValue;
12636         }
12637         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
12638         export function NetworkGraph_new(genesis_hash: Uint8Array): number {
12639                 if(!isWasmInitialized) {
12640                         throw new Error("initializeWasm() must be awaited first!");
12641                 }
12642                 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
12643                 return nativeResponseValue;
12644         }
12645         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
12646         export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
12647                 if(!isWasmInitialized) {
12648                         throw new Error("initializeWasm() must be awaited first!");
12649                 }
12650                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
12651                 return nativeResponseValue;
12652         }
12653         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
12654         export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
12655                 if(!isWasmInitialized) {
12656                         throw new Error("initializeWasm() must be awaited first!");
12657                 }
12658                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
12659                 return nativeResponseValue;
12660         }
12661         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg, struct LDKAccess *chain_access);
12662         export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
12663                 if(!isWasmInitialized) {
12664                         throw new Error("initializeWasm() must be awaited first!");
12665                 }
12666                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
12667                 return nativeResponseValue;
12668         }
12669         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_unsigned_announcement(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg, struct LDKAccess *chain_access);
12670         export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
12671                 if(!isWasmInitialized) {
12672                         throw new Error("initializeWasm() must be awaited first!");
12673                 }
12674                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
12675                 return nativeResponseValue;
12676         }
12677         // void NetworkGraph_close_channel_from_update(struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
12678         export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
12679                 if(!isWasmInitialized) {
12680                         throw new Error("initializeWasm() must be awaited first!");
12681                 }
12682                 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
12683                 // debug statements here
12684         }
12685         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
12686         export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
12687                 if(!isWasmInitialized) {
12688                         throw new Error("initializeWasm() must be awaited first!");
12689                 }
12690                 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
12691                 return nativeResponseValue;
12692         }
12693         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
12694         export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
12695                 if(!isWasmInitialized) {
12696                         throw new Error("initializeWasm() must be awaited first!");
12697                 }
12698                 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
12699                 return nativeResponseValue;
12700         }
12701
12702         export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
12703             if(isWasmInitialized && !allowDoubleInitialization) {
12704                 return;
12705             }
12706             const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
12707             wasm = wasmInstance.exports;
12708             isWasmInitialized = true;
12709         }
12710