Merge pull request #46 from TheBlueMatt/main
[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         // struct LDKCVec_u8Z TxOut_get_script_pubkey (struct LDKTxOut* thing)
156         export function TxOut_get_script_pubkey(thing: number): Uint8Array {
157                 if(!isWasmInitialized) {
158                         throw new Error("initializeWasm() must be awaited first!");
159                 }
160                 const nativeResponseValue = wasm.TxOut_get_script_pubkey(thing);
161                 return decodeArray(nativeResponseValue);
162         }
163         // uint64_t TxOut_get_value (struct LDKTxOut* thing)
164         export function TxOut_get_value(thing: number): number {
165                 if(!isWasmInitialized) {
166                         throw new Error("initializeWasm() must be awaited first!");
167                 }
168                 const nativeResponseValue = wasm.TxOut_get_value(thing);
169                 return nativeResponseValue;
170         }
171         public static native boolean LDKCResult_SecretKeyErrorZ_result_ok(long arg);
172         public static native Uint8Array LDKCResult_SecretKeyErrorZ_get_ok(long arg);
173         public static native Secp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
174         public static native boolean LDKCResult_PublicKeyErrorZ_result_ok(long arg);
175         public static native Uint8Array LDKCResult_PublicKeyErrorZ_get_ok(long arg);
176         public static native Secp256k1Error LDKCResult_PublicKeyErrorZ_get_err(long arg);
177         public static native boolean LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(long arg);
178         public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(long arg);
179         public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_err(long arg);
180         public static native boolean LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(long arg);
181         public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(long arg);
182         public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(long arg);
183         public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
184         public static native number LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
185         public static native Secp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
186         public static class LDKCOption_u32Z {
187                 private LDKCOption_u32Z() {}
188                 export class Some extends LDKCOption_u32Z {
189                         public number some;
190                         Some(number some) { this.some = some; }
191                 }
192                 export class None extends LDKCOption_u32Z {
193                         None() { }
194                 }
195                 static native void init();
196         }
197         static { LDKCOption_u32Z.init(); }
198         public static native LDKCOption_u32Z LDKCOption_u32Z_ref_from_ptr(long ptr);
199         public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
200         public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
201         public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
202         public static native boolean LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
203         public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
204         public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
205         public static native boolean LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
206         public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
207         public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
208         public static native boolean LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(long arg);
209         public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long arg);
210         public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long arg);
211         public static native boolean LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(long arg);
212         public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
213         public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
214         public static native boolean LDKCResult_TrustedClosingTransactionNoneZ_result_ok(long arg);
215         public static native number LDKCResult_TrustedClosingTransactionNoneZ_get_ok(long arg);
216         public static native void LDKCResult_TrustedClosingTransactionNoneZ_get_err(long arg);
217         public static native boolean LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(long arg);
218         public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(long arg);
219         public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(long arg);
220         public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
221         public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
222         public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
223         public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
224         public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
225         public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
226         public static native boolean LDKCResult_ShutdownScriptDecodeErrorZ_result_ok(long arg);
227         public static native number LDKCResult_ShutdownScriptDecodeErrorZ_get_ok(long arg);
228         public static native number LDKCResult_ShutdownScriptDecodeErrorZ_get_err(long arg);
229         public static native boolean LDKCResult_ShutdownScriptInvalidShutdownScriptZ_result_ok(long arg);
230         public static native number LDKCResult_ShutdownScriptInvalidShutdownScriptZ_get_ok(long arg);
231         public static native number LDKCResult_ShutdownScriptInvalidShutdownScriptZ_get_err(long arg);
232         public static native boolean LDKCResult_NoneErrorZ_result_ok(long arg);
233         public static native void LDKCResult_NoneErrorZ_get_ok(long arg);
234         public static native IOError LDKCResult_NoneErrorZ_get_err(long arg);
235         public static native boolean LDKCResult_RouteHopDecodeErrorZ_result_ok(long arg);
236         public static native number LDKCResult_RouteHopDecodeErrorZ_get_ok(long arg);
237         public static native number LDKCResult_RouteHopDecodeErrorZ_get_err(long arg);
238         public static native long LDKCVec_RouteHopZ_new(number[] elems);
239         public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
240         public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
241         public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
242         public static class LDKCOption_u64Z {
243                 private LDKCOption_u64Z() {}
244                 export class Some extends LDKCOption_u64Z {
245                         public number some;
246                         Some(number some) { this.some = some; }
247                 }
248                 export class None extends LDKCOption_u64Z {
249                         None() { }
250                 }
251                 static native void init();
252         }
253         static { LDKCOption_u64Z.init(); }
254         public static native LDKCOption_u64Z LDKCOption_u64Z_ref_from_ptr(long ptr);
255         public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
256         public static native long LDKCVec_RouteHintZ_new(number[] elems);
257         public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
258         public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
259         public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
260         public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
261         public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
262         public static native AccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
263         public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
264         // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
265         export function C2Tuple_usizeTransactionZ_get_a(tuple: number): number {
266                 if(!isWasmInitialized) {
267                         throw new Error("initializeWasm() must be awaited first!");
268                 }
269                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_get_a(tuple);
270                 return nativeResponseValue;
271         }
272         // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
273         export function C2Tuple_usizeTransactionZ_get_b(tuple: number): Uint8Array {
274                 if(!isWasmInitialized) {
275                         throw new Error("initializeWasm() must be awaited first!");
276                 }
277                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_get_b(tuple);
278                 return decodeArray(nativeResponseValue);
279         }
280         public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
281         public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
282         public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
283         public static native ChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
284         public static class LDKMonitorEvent {
285                 private LDKMonitorEvent() {}
286                 export class HTLCEvent extends LDKMonitorEvent {
287                         public number htlc_event;
288                         HTLCEvent(number htlc_event) { this.htlc_event = htlc_event; }
289                 }
290                 export class CommitmentTxConfirmed extends LDKMonitorEvent {
291                         public number commitment_tx_confirmed;
292                         CommitmentTxConfirmed(number commitment_tx_confirmed) { this.commitment_tx_confirmed = commitment_tx_confirmed; }
293                 }
294                 static native void init();
295         }
296         static { LDKMonitorEvent.init(); }
297         public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
298         public static native long LDKCVec_MonitorEventZ_new(number[] elems);
299         public static class LDKCOption_C2Tuple_usizeTransactionZZ {
300                 private LDKCOption_C2Tuple_usizeTransactionZZ() {}
301                 export class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
302                         public number some;
303                         Some(number some) { this.some = some; }
304                 }
305                 export class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
306                         None() { }
307                 }
308                 static native void init();
309         }
310         static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
311         public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
312         public static class LDKNetworkUpdate {
313                 private LDKNetworkUpdate() {}
314                 export class ChannelUpdateMessage extends LDKNetworkUpdate {
315                         public number msg;
316                         ChannelUpdateMessage(number msg) { this.msg = msg; }
317                 }
318                 export class ChannelClosed extends LDKNetworkUpdate {
319                         public number short_channel_id;
320                         public boolean is_permanent;
321                         ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
322                 }
323                 export class NodeFailure extends LDKNetworkUpdate {
324                         public Uint8Array node_id;
325                         public boolean is_permanent;
326                         NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
327                 }
328                 static native void init();
329         }
330         static { LDKNetworkUpdate.init(); }
331         public static native LDKNetworkUpdate LDKNetworkUpdate_ref_from_ptr(long ptr);
332         public static class LDKCOption_NetworkUpdateZ {
333                 private LDKCOption_NetworkUpdateZ() {}
334                 export class Some extends LDKCOption_NetworkUpdateZ {
335                         public number some;
336                         Some(number some) { this.some = some; }
337                 }
338                 export class None extends LDKCOption_NetworkUpdateZ {
339                         None() { }
340                 }
341                 static native void init();
342         }
343         static { LDKCOption_NetworkUpdateZ.init(); }
344         public static native LDKCOption_NetworkUpdateZ LDKCOption_NetworkUpdateZ_ref_from_ptr(long ptr);
345         public static class LDKSpendableOutputDescriptor {
346                 private LDKSpendableOutputDescriptor() {}
347                 export class StaticOutput extends LDKSpendableOutputDescriptor {
348                         public number outpoint;
349                         public number output;
350                         StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
351                 }
352                 export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
353                         public number delayed_payment_output;
354                         DelayedPaymentOutput(number delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
355                 }
356                 export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
357                         public number static_payment_output;
358                         StaticPaymentOutput(number static_payment_output) { this.static_payment_output = static_payment_output; }
359                 }
360                 static native void init();
361         }
362         static { LDKSpendableOutputDescriptor.init(); }
363         public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
364         public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
365         public static class LDKErrorAction {
366                 private LDKErrorAction() {}
367                 export class DisconnectPeer extends LDKErrorAction {
368                         public number msg;
369                         DisconnectPeer(number msg) { this.msg = msg; }
370                 }
371                 export class IgnoreError extends LDKErrorAction {
372                         IgnoreError() { }
373                 }
374                 export class IgnoreAndLog extends LDKErrorAction {
375                         public Level ignore_and_log;
376                         IgnoreAndLog(Level ignore_and_log) { this.ignore_and_log = ignore_and_log; }
377                 }
378                 export class SendErrorMessage extends LDKErrorAction {
379                         public number msg;
380                         SendErrorMessage(number msg) { this.msg = msg; }
381                 }
382                 static native void init();
383         }
384         static { LDKErrorAction.init(); }
385         public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
386         public static class LDKMessageSendEvent {
387                 private LDKMessageSendEvent() {}
388                 export class SendAcceptChannel extends LDKMessageSendEvent {
389                         public Uint8Array node_id;
390                         public number msg;
391                         SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
392                 }
393                 export class SendOpenChannel extends LDKMessageSendEvent {
394                         public Uint8Array node_id;
395                         public number msg;
396                         SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
397                 }
398                 export class SendFundingCreated extends LDKMessageSendEvent {
399                         public Uint8Array node_id;
400                         public number msg;
401                         SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
402                 }
403                 export class SendFundingSigned extends LDKMessageSendEvent {
404                         public Uint8Array node_id;
405                         public number msg;
406                         SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
407                 }
408                 export class SendFundingLocked extends LDKMessageSendEvent {
409                         public Uint8Array node_id;
410                         public number msg;
411                         SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
412                 }
413                 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
414                         public Uint8Array node_id;
415                         public number msg;
416                         SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
417                 }
418                 export class UpdateHTLCs extends LDKMessageSendEvent {
419                         public Uint8Array node_id;
420                         public number updates;
421                         UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
422                 }
423                 export class SendRevokeAndACK extends LDKMessageSendEvent {
424                         public Uint8Array node_id;
425                         public number msg;
426                         SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
427                 }
428                 export class SendClosingSigned extends LDKMessageSendEvent {
429                         public Uint8Array node_id;
430                         public number msg;
431                         SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
432                 }
433                 export class SendShutdown extends LDKMessageSendEvent {
434                         public Uint8Array node_id;
435                         public number msg;
436                         SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
437                 }
438                 export class SendChannelReestablish extends LDKMessageSendEvent {
439                         public Uint8Array node_id;
440                         public number msg;
441                         SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
442                 }
443                 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
444                         public number msg;
445                         public number update_msg;
446                         BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
447                 }
448                 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
449                         public number msg;
450                         BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
451                 }
452                 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
453                         public number msg;
454                         BroadcastChannelUpdate(number msg) { this.msg = msg; }
455                 }
456                 export class SendChannelUpdate extends LDKMessageSendEvent {
457                         public Uint8Array node_id;
458                         public number msg;
459                         SendChannelUpdate(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
460                 }
461                 export class HandleError extends LDKMessageSendEvent {
462                         public Uint8Array node_id;
463                         public number action;
464                         HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
465                 }
466                 export class SendChannelRangeQuery extends LDKMessageSendEvent {
467                         public Uint8Array node_id;
468                         public number msg;
469                         SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
470                 }
471                 export class SendShortIdsQuery extends LDKMessageSendEvent {
472                         public Uint8Array node_id;
473                         public number msg;
474                         SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
475                 }
476                 export class SendReplyChannelRange extends LDKMessageSendEvent {
477                         public Uint8Array node_id;
478                         public number msg;
479                         SendReplyChannelRange(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
480                 }
481                 static native void init();
482         }
483         static { LDKMessageSendEvent.init(); }
484         public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
485         public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
486         public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
487         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
488         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
489         public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
490         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
491         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
492         public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
493         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
494         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
495         public static native boolean LDKCResult_InvoiceFeaturesDecodeErrorZ_result_ok(long arg);
496         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
497         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
498         public static native boolean LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
499         public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
500         public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
501         public static native boolean LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
502         public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
503         public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
504         public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
505         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
506         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
507         public static native boolean LDKCResult_NoneNoneZ_result_ok(long arg);
508         public static native void LDKCResult_NoneNoneZ_get_ok(long arg);
509         public static native void LDKCResult_NoneNoneZ_get_err(long arg);
510         public static native long LDKC2Tuple_SignatureCVec_SignatureZZ_new(Uint8Array a, Uint8Array[] b);
511         // struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
512         export function C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple: number): Uint8Array {
513                 if(!isWasmInitialized) {
514                         throw new Error("initializeWasm() must be awaited first!");
515                 }
516                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple);
517                 return decodeArray(nativeResponseValue);
518         }
519         // struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
520         export function C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple: number): Uint8Array[] {
521                 if(!isWasmInitialized) {
522                         throw new Error("initializeWasm() must be awaited first!");
523                 }
524                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple);
525                 return nativeResponseValue;
526         }
527         public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
528         public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
529         public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
530         public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
531         public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
532         public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
533
534
535
536 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
537
538                 export interface LDKBaseSign {
539                         get_per_commitment_point (idx: number): Uint8Array;
540                         release_commitment_secret (idx: number): Uint8Array;
541                         validate_holder_commitment (holder_tx: number): number;
542                         channel_keys_id (): Uint8Array;
543                         sign_counterparty_commitment (commitment_tx: number): number;
544                         validate_counterparty_revocation (idx: number, secret: Uint8Array): number;
545                         sign_holder_commitment_and_htlcs (commitment_tx: number): number;
546                         sign_justice_revoked_output (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number;
547                         sign_justice_revoked_htlc (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
548                         sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
549                         sign_closing_transaction (closing_tx: number): number;
550                         sign_channel_announcement (msg: number): number;
551                         ready_channel (channel_parameters: number): void;
552                 }
553
554                 export function LDKBaseSign_new(impl: LDKBaseSign, pubkeys: number): number {
555             throw new Error('unimplemented'); // TODO: bind to WASM
556         }
557
558 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
559
560
561         // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
562         export function BaseSign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
563                 if(!isWasmInitialized) {
564                         throw new Error("initializeWasm() must be awaited first!");
565                 }
566                 const nativeResponseValue = wasm.BaseSign_get_per_commitment_point(this_arg, idx);
567                 return decodeArray(nativeResponseValue);
568         }
569         // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
570         export function BaseSign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
571                 if(!isWasmInitialized) {
572                         throw new Error("initializeWasm() must be awaited first!");
573                 }
574                 const nativeResponseValue = wasm.BaseSign_release_commitment_secret(this_arg, idx);
575                 return decodeArray(nativeResponseValue);
576         }
577         // LDKCResult_NoneNoneZ BaseSign_validate_holder_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR holder_tx
578         export function BaseSign_validate_holder_commitment(this_arg: number, holder_tx: number): number {
579                 if(!isWasmInitialized) {
580                         throw new Error("initializeWasm() must be awaited first!");
581                 }
582                 const nativeResponseValue = wasm.BaseSign_validate_holder_commitment(this_arg, holder_tx);
583                 return nativeResponseValue;
584         }
585         // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
586         export function BaseSign_channel_keys_id(this_arg: number): Uint8Array {
587                 if(!isWasmInitialized) {
588                         throw new Error("initializeWasm() must be awaited first!");
589                 }
590                 const nativeResponseValue = wasm.BaseSign_channel_keys_id(this_arg);
591                 return decodeArray(nativeResponseValue);
592         }
593         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
594         export function BaseSign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
595                 if(!isWasmInitialized) {
596                         throw new Error("initializeWasm() must be awaited first!");
597                 }
598                 const nativeResponseValue = wasm.BaseSign_sign_counterparty_commitment(this_arg, commitment_tx);
599                 return nativeResponseValue;
600         }
601         // LDKCResult_NoneNoneZ BaseSign_validate_counterparty_revocation LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx, const uint8_t (*secret)[32]
602         export function BaseSign_validate_counterparty_revocation(this_arg: number, idx: number, secret: Uint8Array): number {
603                 if(!isWasmInitialized) {
604                         throw new Error("initializeWasm() must be awaited first!");
605                 }
606                 const nativeResponseValue = wasm.BaseSign_validate_counterparty_revocation(this_arg, idx, encodeArray(secret));
607                 return nativeResponseValue;
608         }
609         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
610         export function BaseSign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
611                 if(!isWasmInitialized) {
612                         throw new Error("initializeWasm() must be awaited first!");
613                 }
614                 const nativeResponseValue = wasm.BaseSign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
615                 return nativeResponseValue;
616         }
617         // LDKCResult_SignatureNoneZ BaseSign_sign_justice_revoked_output LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32]
618         export function BaseSign_sign_justice_revoked_output(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number {
619                 if(!isWasmInitialized) {
620                         throw new Error("initializeWasm() must be awaited first!");
621                 }
622                 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_output(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key));
623                 return nativeResponseValue;
624         }
625         // LDKCResult_SignatureNoneZ BaseSign_sign_justice_revoked_htlc LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
626         export function BaseSign_sign_justice_revoked_htlc(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
627                 if(!isWasmInitialized) {
628                         throw new Error("initializeWasm() must be awaited first!");
629                 }
630                 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_htlc(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
631                 return nativeResponseValue;
632         }
633         // LDKCResult_SignatureNoneZ BaseSign_sign_counterparty_htlc_transaction LDKBaseSign *NONNULL_PTR this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
634         export function BaseSign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
635                 if(!isWasmInitialized) {
636                         throw new Error("initializeWasm() must be awaited first!");
637                 }
638                 const nativeResponseValue = wasm.BaseSign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
639                 return nativeResponseValue;
640         }
641         // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, const struct LDKClosingTransaction *NONNULL_PTR closing_tx
642         export function BaseSign_sign_closing_transaction(this_arg: number, closing_tx: number): number {
643                 if(!isWasmInitialized) {
644                         throw new Error("initializeWasm() must be awaited first!");
645                 }
646                 const nativeResponseValue = wasm.BaseSign_sign_closing_transaction(this_arg, closing_tx);
647                 return nativeResponseValue;
648         }
649         // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
650         export function BaseSign_sign_channel_announcement(this_arg: number, msg: number): number {
651                 if(!isWasmInitialized) {
652                         throw new Error("initializeWasm() must be awaited first!");
653                 }
654                 const nativeResponseValue = wasm.BaseSign_sign_channel_announcement(this_arg, msg);
655                 return nativeResponseValue;
656         }
657         // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
658         export function BaseSign_ready_channel(this_arg: number, channel_parameters: number): void {
659                 if(!isWasmInitialized) {
660                         throw new Error("initializeWasm() must be awaited first!");
661                 }
662                 const nativeResponseValue = wasm.BaseSign_ready_channel(this_arg, channel_parameters);
663                 // debug statements here
664         }
665         // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
666         export function BaseSign_get_pubkeys(this_arg: number): number {
667                 if(!isWasmInitialized) {
668                         throw new Error("initializeWasm() must be awaited first!");
669                 }
670                 const nativeResponseValue = wasm.BaseSign_get_pubkeys(this_arg);
671                 return nativeResponseValue;
672         }
673
674
675
676 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
677
678                 export interface LDKSign {
679                         write (): Uint8Array;
680                 }
681
682                 export function LDKSign_new(impl: LDKSign, BaseSign: LDKBaseSign, pubkeys: number): number {
683             throw new Error('unimplemented'); // TODO: bind to WASM
684         }
685
686 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
687
688
689         // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
690         export function Sign_write(this_arg: number): Uint8Array {
691                 if(!isWasmInitialized) {
692                         throw new Error("initializeWasm() must be awaited first!");
693                 }
694                 const nativeResponseValue = wasm.Sign_write(this_arg);
695                 return decodeArray(nativeResponseValue);
696         }
697         public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
698         public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
699         public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
700         public static native boolean LDKCResult_RecoverableSignatureNoneZ_result_ok(long arg);
701         public static native Uint8Array LDKCResult_RecoverableSignatureNoneZ_get_ok(long arg);
702         public static native void LDKCResult_RecoverableSignatureNoneZ_get_err(long arg);
703         public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
704         public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
705         public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
706         public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
707         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
708         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
709         public static native long LDKCVec_TxOutZ_new(number[] elems);
710         public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
711         public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
712         public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
713         public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
714         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
715         export function C2Tuple_BlockHashChannelMonitorZ_get_a(tuple: number): Uint8Array {
716                 if(!isWasmInitialized) {
717                         throw new Error("initializeWasm() must be awaited first!");
718                 }
719                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_get_a(tuple);
720                 return decodeArray(nativeResponseValue);
721         }
722         // struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
723         export function C2Tuple_BlockHashChannelMonitorZ_get_b(tuple: number): number {
724                 if(!isWasmInitialized) {
725                         throw new Error("initializeWasm() must be awaited first!");
726                 }
727                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_get_b(tuple);
728                 return nativeResponseValue;
729         }
730         public static native long LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(number[] elems);
731         public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
732         public static native number[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
733         public static native IOError LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_err(long arg);
734         public static class LDKCOption_u16Z {
735                 private LDKCOption_u16Z() {}
736                 export class Some extends LDKCOption_u16Z {
737                         public number some;
738                         Some(number some) { this.some = some; }
739                 }
740                 export class None extends LDKCOption_u16Z {
741                         None() { }
742                 }
743                 static native void init();
744         }
745         static { LDKCOption_u16Z.init(); }
746         public static native LDKCOption_u16Z LDKCOption_u16Z_ref_from_ptr(long ptr);
747         public static class LDKAPIError {
748                 private LDKAPIError() {}
749                 export class APIMisuseError extends LDKAPIError {
750                         public String err;
751                         APIMisuseError(String err) { this.err = err; }
752                 }
753                 export class FeeRateTooHigh extends LDKAPIError {
754                         public String err;
755                         public number feerate;
756                         FeeRateTooHigh(String err, number feerate) { this.err = err; this.feerate = feerate; }
757                 }
758                 export class RouteError extends LDKAPIError {
759                         public String err;
760                         RouteError(String err) { this.err = err; }
761                 }
762                 export class ChannelUnavailable extends LDKAPIError {
763                         public String err;
764                         ChannelUnavailable(String err) { this.err = err; }
765                 }
766                 export class MonitorUpdateFailed extends LDKAPIError {
767                         MonitorUpdateFailed() { }
768                 }
769                 export class IncompatibleShutdownScript extends LDKAPIError {
770                         public number script;
771                         IncompatibleShutdownScript(number script) { this.script = script; }
772                 }
773                 static native void init();
774         }
775         static { LDKAPIError.init(); }
776         public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
777         public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
778         public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
779         public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
780         public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
781         public static native long LDKCVec_APIErrorZ_new(number[] elems);
782         public static class LDKPaymentSendFailure {
783                 private LDKPaymentSendFailure() {}
784                 export class ParameterError extends LDKPaymentSendFailure {
785                         public number parameter_error;
786                         ParameterError(number parameter_error) { this.parameter_error = parameter_error; }
787                 }
788                 export class PathParameterError extends LDKPaymentSendFailure {
789                         public number[] path_parameter_error;
790                         PathParameterError(number[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
791                 }
792                 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
793                         public number[] all_failed_retry_safe;
794                         AllFailedRetrySafe(number[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
795                 }
796                 export class PartialFailure extends LDKPaymentSendFailure {
797                         public number[] partial_failure;
798                         PartialFailure(number[] partial_failure) { this.partial_failure = partial_failure; }
799                 }
800                 static native void init();
801         }
802         static { LDKPaymentSendFailure.init(); }
803         public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
804         public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
805         public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
806         public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
807         public static native boolean LDKCResult_PaymentHashPaymentSendFailureZ_result_ok(long arg);
808         public static native Uint8Array LDKCResult_PaymentHashPaymentSendFailureZ_get_ok(long arg);
809         public static native number LDKCResult_PaymentHashPaymentSendFailureZ_get_err(long arg);
810         public static class LDKNetAddress {
811                 private LDKNetAddress() {}
812                 export class IPv4 extends LDKNetAddress {
813                         public Uint8Array addr;
814                         public number port;
815                         IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
816                 }
817                 export class IPv6 extends LDKNetAddress {
818                         public Uint8Array addr;
819                         public number port;
820                         IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
821                 }
822                 export class OnionV2 extends LDKNetAddress {
823                         public Uint8Array addr;
824                         public number port;
825                         OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
826                 }
827                 export class OnionV3 extends LDKNetAddress {
828                         public Uint8Array ed25519_pubkey;
829                         public number checksum;
830                         public number version;
831                         public number port;
832                         OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
833                 }
834                 static native void init();
835         }
836         static { LDKNetAddress.init(); }
837         public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
838         public static native long LDKCVec_NetAddressZ_new(number[] elems);
839         public static native long LDKC2Tuple_PaymentHashPaymentSecretZ_new(Uint8Array a, Uint8Array b);
840         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
841         export function C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple: number): Uint8Array {
842                 if(!isWasmInitialized) {
843                         throw new Error("initializeWasm() must be awaited first!");
844                 }
845                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple);
846                 return decodeArray(nativeResponseValue);
847         }
848         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
849         export function C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple: number): Uint8Array {
850                 if(!isWasmInitialized) {
851                         throw new Error("initializeWasm() must be awaited first!");
852                 }
853                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple);
854                 return decodeArray(nativeResponseValue);
855         }
856         public static native boolean LDKCResult_PaymentSecretAPIErrorZ_result_ok(long arg);
857         public static native Uint8Array LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
858         public static native number LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
859         public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
860
861
862
863 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
864
865                 export interface LDKWatch {
866                         watch_channel (funding_txo: number, monitor: number): number;
867                         update_channel (funding_txo: number, update: number): number;
868                         release_pending_monitor_events (): number[];
869                 }
870
871                 export function LDKWatch_new(impl: LDKWatch): number {
872             throw new Error('unimplemented'); // TODO: bind to WASM
873         }
874
875 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
876
877
878         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
879         export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
880                 if(!isWasmInitialized) {
881                         throw new Error("initializeWasm() must be awaited first!");
882                 }
883                 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
884                 return nativeResponseValue;
885         }
886         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
887         export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
888                 if(!isWasmInitialized) {
889                         throw new Error("initializeWasm() must be awaited first!");
890                 }
891                 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
892                 return nativeResponseValue;
893         }
894         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
895         export function Watch_release_pending_monitor_events(this_arg: number): number[] {
896                 if(!isWasmInitialized) {
897                         throw new Error("initializeWasm() must be awaited first!");
898                 }
899                 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
900                 return nativeResponseValue;
901         }
902
903
904
905 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
906
907                 export interface LDKBroadcasterInterface {
908                         broadcast_transaction (tx: Uint8Array): void;
909                 }
910
911                 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
912             throw new Error('unimplemented'); // TODO: bind to WASM
913         }
914
915 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
916
917
918         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
919         export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
920                 if(!isWasmInitialized) {
921                         throw new Error("initializeWasm() must be awaited first!");
922                 }
923                 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
924                 // debug statements here
925         }
926
927
928
929 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
930
931                 export interface LDKKeysInterface {
932                         get_node_secret (): Uint8Array;
933                         get_destination_script (): Uint8Array;
934                         get_shutdown_scriptpubkey (): number;
935                         get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
936                         get_secure_random_bytes (): Uint8Array;
937                         read_chan_signer (reader: Uint8Array): number;
938                         sign_invoice (invoice_preimage: Uint8Array): number;
939                 }
940
941                 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
942             throw new Error('unimplemented'); // TODO: bind to WASM
943         }
944
945 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
946
947
948         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
949         export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
950                 if(!isWasmInitialized) {
951                         throw new Error("initializeWasm() must be awaited first!");
952                 }
953                 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
954                 return decodeArray(nativeResponseValue);
955         }
956         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
957         export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
958                 if(!isWasmInitialized) {
959                         throw new Error("initializeWasm() must be awaited first!");
960                 }
961                 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
962                 return decodeArray(nativeResponseValue);
963         }
964         // LDKShutdownScript KeysInterface_get_shutdown_scriptpubkey LDKKeysInterface *NONNULL_PTR this_arg
965         export function KeysInterface_get_shutdown_scriptpubkey(this_arg: number): number {
966                 if(!isWasmInitialized) {
967                         throw new Error("initializeWasm() must be awaited first!");
968                 }
969                 const nativeResponseValue = wasm.KeysInterface_get_shutdown_scriptpubkey(this_arg);
970                 return nativeResponseValue;
971         }
972         // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
973         export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
974                 if(!isWasmInitialized) {
975                         throw new Error("initializeWasm() must be awaited first!");
976                 }
977                 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
978                 return nativeResponseValue;
979         }
980         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
981         export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
982                 if(!isWasmInitialized) {
983                         throw new Error("initializeWasm() must be awaited first!");
984                 }
985                 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
986                 return decodeArray(nativeResponseValue);
987         }
988         // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
989         export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
990                 if(!isWasmInitialized) {
991                         throw new Error("initializeWasm() must be awaited first!");
992                 }
993                 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
994                 return nativeResponseValue;
995         }
996         // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
997         export function KeysInterface_sign_invoice(this_arg: number, invoice_preimage: Uint8Array): number {
998                 if(!isWasmInitialized) {
999                         throw new Error("initializeWasm() must be awaited first!");
1000                 }
1001                 const nativeResponseValue = wasm.KeysInterface_sign_invoice(this_arg, encodeArray(invoice_preimage));
1002                 return nativeResponseValue;
1003         }
1004
1005
1006
1007 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1008
1009                 export interface LDKFeeEstimator {
1010                         get_est_sat_per_1000_weight (confirmation_target: ConfirmationTarget): number;
1011                 }
1012
1013                 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
1014             throw new Error('unimplemented'); // TODO: bind to WASM
1015         }
1016
1017 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1018
1019
1020         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
1021         export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: ConfirmationTarget): number {
1022                 if(!isWasmInitialized) {
1023                         throw new Error("initializeWasm() must be awaited first!");
1024                 }
1025                 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
1026                 return nativeResponseValue;
1027         }
1028
1029
1030
1031 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1032
1033                 export interface LDKLogger {
1034                         log (record: String): void;
1035                 }
1036
1037                 export function LDKLogger_new(impl: LDKLogger): number {
1038             throw new Error('unimplemented'); // TODO: bind to WASM
1039         }
1040
1041 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1042
1043
1044         public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
1045         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
1046         export function C2Tuple_BlockHashChannelManagerZ_get_a(tuple: number): Uint8Array {
1047                 if(!isWasmInitialized) {
1048                         throw new Error("initializeWasm() must be awaited first!");
1049                 }
1050                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_get_a(tuple);
1051                 return decodeArray(nativeResponseValue);
1052         }
1053         // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
1054         export function C2Tuple_BlockHashChannelManagerZ_get_b(tuple: number): number {
1055                 if(!isWasmInitialized) {
1056                         throw new Error("initializeWasm() must be awaited first!");
1057                 }
1058                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_get_b(tuple);
1059                 return nativeResponseValue;
1060         }
1061         public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
1062         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
1063         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
1064         public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
1065         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
1066         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
1067         public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
1068         public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
1069         public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
1070
1071
1072
1073 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1074
1075                 export interface LDKType {
1076                         type_id (): number;
1077                         debug_str (): String;
1078                         write (): Uint8Array;
1079                 }
1080
1081                 export function LDKType_new(impl: LDKType): number {
1082             throw new Error('unimplemented'); // TODO: bind to WASM
1083         }
1084
1085 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1086
1087
1088         // uint16_t Type_type_id LDKType *NONNULL_PTR this_arg
1089         export function Type_type_id(this_arg: number): number {
1090                 if(!isWasmInitialized) {
1091                         throw new Error("initializeWasm() must be awaited first!");
1092                 }
1093                 const nativeResponseValue = wasm.Type_type_id(this_arg);
1094                 return nativeResponseValue;
1095         }
1096         // LDKStr Type_debug_str LDKType *NONNULL_PTR this_arg
1097         export function Type_debug_str(this_arg: number): String {
1098                 if(!isWasmInitialized) {
1099                         throw new Error("initializeWasm() must be awaited first!");
1100                 }
1101                 const nativeResponseValue = wasm.Type_debug_str(this_arg);
1102                 return nativeResponseValue;
1103         }
1104         // LDKCVec_u8Z Type_write LDKType *NONNULL_PTR this_arg
1105         export function Type_write(this_arg: number): Uint8Array {
1106                 if(!isWasmInitialized) {
1107                         throw new Error("initializeWasm() must be awaited first!");
1108                 }
1109                 const nativeResponseValue = wasm.Type_write(this_arg);
1110                 return decodeArray(nativeResponseValue);
1111         }
1112         public static class LDKCOption_TypeZ {
1113                 private LDKCOption_TypeZ() {}
1114                 export class Some extends LDKCOption_TypeZ {
1115                         public number some;
1116                         Some(number some) { this.some = some; }
1117                 }
1118                 export class None extends LDKCOption_TypeZ {
1119                         None() { }
1120                 }
1121                 static native void init();
1122         }
1123         static { LDKCOption_TypeZ.init(); }
1124         public static native LDKCOption_TypeZ LDKCOption_TypeZ_ref_from_ptr(long ptr);
1125         public static native boolean LDKCResult_COption_TypeZDecodeErrorZ_result_ok(long arg);
1126         public static native number LDKCResult_COption_TypeZDecodeErrorZ_get_ok(long arg);
1127         public static native number LDKCResult_COption_TypeZDecodeErrorZ_get_err(long arg);
1128         public static native boolean LDKCResult_SiPrefixNoneZ_result_ok(long arg);
1129         public static native SiPrefix LDKCResult_SiPrefixNoneZ_get_ok(long arg);
1130         public static native void LDKCResult_SiPrefixNoneZ_get_err(long arg);
1131         public static native boolean LDKCResult_InvoiceNoneZ_result_ok(long arg);
1132         public static native number LDKCResult_InvoiceNoneZ_get_ok(long arg);
1133         public static native void LDKCResult_InvoiceNoneZ_get_err(long arg);
1134         public static native boolean LDKCResult_SignedRawInvoiceNoneZ_result_ok(long arg);
1135         public static native number LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
1136         public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
1137         public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_new(number a, Uint8Array b, number c);
1138         // struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
1139         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple: number): number {
1140                 if(!isWasmInitialized) {
1141                         throw new Error("initializeWasm() must be awaited first!");
1142                 }
1143                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple);
1144                 return nativeResponseValue;
1145         }
1146         // struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
1147         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple: number): Uint8Array {
1148                 if(!isWasmInitialized) {
1149                         throw new Error("initializeWasm() must be awaited first!");
1150                 }
1151                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple);
1152                 return decodeArray(nativeResponseValue);
1153         }
1154         // struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
1155         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple: number): number {
1156                 if(!isWasmInitialized) {
1157                         throw new Error("initializeWasm() must be awaited first!");
1158                 }
1159                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple);
1160                 return nativeResponseValue;
1161         }
1162         public static native boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
1163         public static native number LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
1164         public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
1165         public static native long LDKCVec_PrivateRouteZ_new(number[] elems);
1166         public static native boolean LDKCResult_PositiveTimestampCreationErrorZ_result_ok(long arg);
1167         public static native number LDKCResult_PositiveTimestampCreationErrorZ_get_ok(long arg);
1168         public static native CreationError LDKCResult_PositiveTimestampCreationErrorZ_get_err(long arg);
1169         public static native boolean LDKCResult_NoneSemanticErrorZ_result_ok(long arg);
1170         public static native void LDKCResult_NoneSemanticErrorZ_get_ok(long arg);
1171         public static native SemanticError LDKCResult_NoneSemanticErrorZ_get_err(long arg);
1172         public static native boolean LDKCResult_InvoiceSemanticErrorZ_result_ok(long arg);
1173         public static native number LDKCResult_InvoiceSemanticErrorZ_get_ok(long arg);
1174         public static native SemanticError LDKCResult_InvoiceSemanticErrorZ_get_err(long arg);
1175         public static native boolean LDKCResult_DescriptionCreationErrorZ_result_ok(long arg);
1176         public static native number LDKCResult_DescriptionCreationErrorZ_get_ok(long arg);
1177         public static native CreationError LDKCResult_DescriptionCreationErrorZ_get_err(long arg);
1178         public static native boolean LDKCResult_ExpiryTimeCreationErrorZ_result_ok(long arg);
1179         public static native number LDKCResult_ExpiryTimeCreationErrorZ_get_ok(long arg);
1180         public static native CreationError LDKCResult_ExpiryTimeCreationErrorZ_get_err(long arg);
1181         public static native boolean LDKCResult_PrivateRouteCreationErrorZ_result_ok(long arg);
1182         public static native number LDKCResult_PrivateRouteCreationErrorZ_get_ok(long arg);
1183         public static native CreationError LDKCResult_PrivateRouteCreationErrorZ_get_err(long arg);
1184         public static native boolean LDKCResult_StringErrorZ_result_ok(long arg);
1185         public static native String LDKCResult_StringErrorZ_get_ok(long arg);
1186         public static native Secp256k1Error LDKCResult_StringErrorZ_get_err(long arg);
1187         public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
1188         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
1189         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
1190         public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
1191         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
1192         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
1193         public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
1194         public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
1195         public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
1196         public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
1197         // struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
1198         export function C2Tuple_OutPointScriptZ_get_a(tuple: number): number {
1199                 if(!isWasmInitialized) {
1200                         throw new Error("initializeWasm() must be awaited first!");
1201                 }
1202                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_get_a(tuple);
1203                 return nativeResponseValue;
1204         }
1205         // struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
1206         export function C2Tuple_OutPointScriptZ_get_b(tuple: number): Uint8Array {
1207                 if(!isWasmInitialized) {
1208                         throw new Error("initializeWasm() must be awaited first!");
1209                 }
1210                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_get_b(tuple);
1211                 return decodeArray(nativeResponseValue);
1212         }
1213         public static native long LDKC2Tuple_u32ScriptZ_new(number a, Uint8Array b);
1214         // uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
1215         export function C2Tuple_u32ScriptZ_get_a(tuple: number): number {
1216                 if(!isWasmInitialized) {
1217                         throw new Error("initializeWasm() must be awaited first!");
1218                 }
1219                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_get_a(tuple);
1220                 return nativeResponseValue;
1221         }
1222         // struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
1223         export function C2Tuple_u32ScriptZ_get_b(tuple: number): Uint8Array {
1224                 if(!isWasmInitialized) {
1225                         throw new Error("initializeWasm() must be awaited first!");
1226                 }
1227                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_get_b(tuple);
1228                 return decodeArray(nativeResponseValue);
1229         }
1230         public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
1231         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Uint8Array a, number[] b);
1232         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
1233         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple: number): Uint8Array {
1234                 if(!isWasmInitialized) {
1235                         throw new Error("initializeWasm() must be awaited first!");
1236                 }
1237                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple);
1238                 return decodeArray(nativeResponseValue);
1239         }
1240         // struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
1241         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple: number): number[] {
1242                 if(!isWasmInitialized) {
1243                         throw new Error("initializeWasm() must be awaited first!");
1244                 }
1245                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple);
1246                 return nativeResponseValue;
1247         }
1248         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
1249         public static class LDKPaymentPurpose {
1250                 private LDKPaymentPurpose() {}
1251                 export class InvoicePayment extends LDKPaymentPurpose {
1252                         public Uint8Array payment_preimage;
1253                         public Uint8Array payment_secret;
1254                         public number user_payment_id;
1255                         InvoicePayment(Uint8Array payment_preimage, Uint8Array payment_secret, number user_payment_id) { this.payment_preimage = payment_preimage; this.payment_secret = payment_secret; this.user_payment_id = user_payment_id; }
1256                 }
1257                 export class SpontaneousPayment extends LDKPaymentPurpose {
1258                         public Uint8Array spontaneous_payment;
1259                         SpontaneousPayment(Uint8Array spontaneous_payment) { this.spontaneous_payment = spontaneous_payment; }
1260                 }
1261                 static native void init();
1262         }
1263         static { LDKPaymentPurpose.init(); }
1264         public static native LDKPaymentPurpose LDKPaymentPurpose_ref_from_ptr(long ptr);
1265         public static class LDKClosureReason {
1266                 private LDKClosureReason() {}
1267                 export class CounterpartyForceClosed extends LDKClosureReason {
1268                         public String peer_msg;
1269                         CounterpartyForceClosed(String peer_msg) { this.peer_msg = peer_msg; }
1270                 }
1271                 export class HolderForceClosed extends LDKClosureReason {
1272                         HolderForceClosed() { }
1273                 }
1274                 export class CooperativeClosure extends LDKClosureReason {
1275                         CooperativeClosure() { }
1276                 }
1277                 export class CommitmentTxConfirmed extends LDKClosureReason {
1278                         CommitmentTxConfirmed() { }
1279                 }
1280                 export class ProcessingError extends LDKClosureReason {
1281                         public String err;
1282                         ProcessingError(String err) { this.err = err; }
1283                 }
1284                 export class DisconnectedPeer extends LDKClosureReason {
1285                         DisconnectedPeer() { }
1286                 }
1287                 export class OutdatedChannelManager extends LDKClosureReason {
1288                         OutdatedChannelManager() { }
1289                 }
1290                 static native void init();
1291         }
1292         static { LDKClosureReason.init(); }
1293         public static native LDKClosureReason LDKClosureReason_ref_from_ptr(long ptr);
1294         public static class LDKEvent {
1295                 private LDKEvent() {}
1296                 export class FundingGenerationReady extends LDKEvent {
1297                         public Uint8Array temporary_channel_id;
1298                         public number channel_value_satoshis;
1299                         public Uint8Array output_script;
1300                         public number user_channel_id;
1301                         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; }
1302                 }
1303                 export class PaymentReceived extends LDKEvent {
1304                         public Uint8Array payment_hash;
1305                         public number amt;
1306                         public number purpose;
1307                         PaymentReceived(Uint8Array payment_hash, number amt, number purpose) { this.payment_hash = payment_hash; this.amt = amt; this.purpose = purpose; }
1308                 }
1309                 export class PaymentSent extends LDKEvent {
1310                         public Uint8Array payment_preimage;
1311                         PaymentSent(Uint8Array payment_preimage) { this.payment_preimage = payment_preimage; }
1312                 }
1313                 export class PaymentPathFailed extends LDKEvent {
1314                         public Uint8Array payment_hash;
1315                         public boolean rejected_by_dest;
1316                         public number network_update;
1317                         public boolean all_paths_failed;
1318                         public number[] path;
1319                         PaymentPathFailed(Uint8Array payment_hash, boolean rejected_by_dest, number network_update, boolean all_paths_failed, number[] path) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; this.network_update = network_update; this.all_paths_failed = all_paths_failed; this.path = path; }
1320                 }
1321                 export class PendingHTLCsForwardable extends LDKEvent {
1322                         public number time_forwardable;
1323                         PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
1324                 }
1325                 export class SpendableOutputs extends LDKEvent {
1326                         public number[] outputs;
1327                         SpendableOutputs(number[] outputs) { this.outputs = outputs; }
1328                 }
1329                 export class PaymentForwarded extends LDKEvent {
1330                         public number fee_earned_msat;
1331                         public boolean claim_from_onchain_tx;
1332                         PaymentForwarded(number fee_earned_msat, boolean claim_from_onchain_tx) { this.fee_earned_msat = fee_earned_msat; this.claim_from_onchain_tx = claim_from_onchain_tx; }
1333                 }
1334                 export class ChannelClosed extends LDKEvent {
1335                         public Uint8Array channel_id;
1336                         public number reason;
1337                         ChannelClosed(Uint8Array channel_id, number reason) { this.channel_id = channel_id; this.reason = reason; }
1338                 }
1339                 static native void init();
1340         }
1341         static { LDKEvent.init(); }
1342         public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
1343         public static native long LDKCVec_EventZ_new(number[] elems);
1344         public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
1345         // uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
1346         export function C2Tuple_u32TxOutZ_get_a(tuple: number): number {
1347                 if(!isWasmInitialized) {
1348                         throw new Error("initializeWasm() must be awaited first!");
1349                 }
1350                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_get_a(tuple);
1351                 return nativeResponseValue;
1352         }
1353         // struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
1354         export function C2Tuple_u32TxOutZ_get_b(tuple: number): number {
1355                 if(!isWasmInitialized) {
1356                         throw new Error("initializeWasm() must be awaited first!");
1357                 }
1358                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_get_b(tuple);
1359                 return nativeResponseValue;
1360         }
1361         public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
1362         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
1363         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
1364         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple: number): Uint8Array {
1365                 if(!isWasmInitialized) {
1366                         throw new Error("initializeWasm() must be awaited first!");
1367                 }
1368                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple);
1369                 return decodeArray(nativeResponseValue);
1370         }
1371         // struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
1372         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple: number): number[] {
1373                 if(!isWasmInitialized) {
1374                         throw new Error("initializeWasm() must be awaited first!");
1375                 }
1376                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple);
1377                 return nativeResponseValue;
1378         }
1379         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
1380         public static class LDKBalance {
1381                 private LDKBalance() {}
1382                 export class ClaimableOnChannelClose extends LDKBalance {
1383                         public number claimable_amount_satoshis;
1384                         ClaimableOnChannelClose(number claimable_amount_satoshis) { this.claimable_amount_satoshis = claimable_amount_satoshis; }
1385                 }
1386                 export class ClaimableAwaitingConfirmations extends LDKBalance {
1387                         public number claimable_amount_satoshis;
1388                         public number confirmation_height;
1389                         ClaimableAwaitingConfirmations(number claimable_amount_satoshis, number confirmation_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.confirmation_height = confirmation_height; }
1390                 }
1391                 export class ContentiousClaimable extends LDKBalance {
1392                         public number claimable_amount_satoshis;
1393                         public number timeout_height;
1394                         ContentiousClaimable(number claimable_amount_satoshis, number timeout_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.timeout_height = timeout_height; }
1395                 }
1396                 export class MaybeClaimableHTLCAwaitingTimeout extends LDKBalance {
1397                         public number claimable_amount_satoshis;
1398                         public number claimable_height;
1399                         MaybeClaimableHTLCAwaitingTimeout(number claimable_amount_satoshis, number claimable_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.claimable_height = claimable_height; }
1400                 }
1401                 static native void init();
1402         }
1403         static { LDKBalance.init(); }
1404         public static native LDKBalance LDKBalance_ref_from_ptr(long ptr);
1405         public static native long LDKCVec_BalanceZ_new(number[] elems);
1406         public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
1407         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
1408         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
1409         public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
1410         public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
1411         public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
1412         public static native long LDKC2Tuple_PublicKeyTypeZ_new(Uint8Array a, number b);
1413         // struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
1414         export function C2Tuple_PublicKeyTypeZ_get_a(tuple: number): Uint8Array {
1415                 if(!isWasmInitialized) {
1416                         throw new Error("initializeWasm() must be awaited first!");
1417                 }
1418                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_get_a(tuple);
1419                 return decodeArray(nativeResponseValue);
1420         }
1421         // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
1422         export function C2Tuple_PublicKeyTypeZ_get_b(tuple: number): number {
1423                 if(!isWasmInitialized) {
1424                         throw new Error("initializeWasm() must be awaited first!");
1425                 }
1426                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_get_b(tuple);
1427                 return nativeResponseValue;
1428         }
1429         public static native long LDKCVec_C2Tuple_PublicKeyTypeZZ_new(number[] elems);
1430         public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
1431         public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
1432         public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
1433         public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
1434         // struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
1435         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple: number): number {
1436                 if(!isWasmInitialized) {
1437                         throw new Error("initializeWasm() must be awaited first!");
1438                 }
1439                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple);
1440                 return nativeResponseValue;
1441         }
1442         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
1443         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple: number): number {
1444                 if(!isWasmInitialized) {
1445                         throw new Error("initializeWasm() must be awaited first!");
1446                 }
1447                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple);
1448                 return nativeResponseValue;
1449         }
1450         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
1451         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple: number): number {
1452                 if(!isWasmInitialized) {
1453                         throw new Error("initializeWasm() must be awaited first!");
1454                 }
1455                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple);
1456                 return nativeResponseValue;
1457         }
1458         public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
1459         public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
1460         public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
1461         public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
1462         public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
1463         public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
1464         public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
1465         public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
1466         public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
1467         public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
1468         public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
1469
1470
1471
1472 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1473
1474                 export interface LDKAccess {
1475                         get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1476                 }
1477
1478                 export function LDKAccess_new(impl: LDKAccess): number {
1479             throw new Error('unimplemented'); // TODO: bind to WASM
1480         }
1481
1482 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1483
1484
1485         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1486         export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1487                 if(!isWasmInitialized) {
1488                         throw new Error("initializeWasm() must be awaited first!");
1489                 }
1490                 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1491                 return nativeResponseValue;
1492         }
1493         public static class LDKCOption_AccessZ {
1494                 private LDKCOption_AccessZ() {}
1495                 export class Some extends LDKCOption_AccessZ {
1496                         public number some;
1497                         Some(number some) { this.some = some; }
1498                 }
1499                 export class None extends LDKCOption_AccessZ {
1500                         None() { }
1501                 }
1502                 static native void init();
1503         }
1504         static { LDKCOption_AccessZ.init(); }
1505         public static native LDKCOption_AccessZ LDKCOption_AccessZ_ref_from_ptr(long ptr);
1506         public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
1507         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
1508         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
1509         public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
1510         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
1511         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
1512         public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
1513         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
1514         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
1515         public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
1516         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
1517         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
1518         public static native long LDKCVec_u64Z_new(number[] elems);
1519         public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
1520         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
1521         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
1522         public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
1523         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
1524         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
1525         public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
1526         public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
1527         public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
1528         public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
1529         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
1530         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
1531         public static native boolean LDKCResult_NetAddressDecodeErrorZ_result_ok(long arg);
1532         public static native number LDKCResult_NetAddressDecodeErrorZ_get_ok(long arg);
1533         public static native number LDKCResult_NetAddressDecodeErrorZ_get_err(long arg);
1534         public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
1535         public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
1536         public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
1537         public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
1538         public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
1539         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
1540         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
1541         public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
1542         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
1543         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
1544         public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
1545         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
1546         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
1547         public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
1548         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
1549         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
1550         public static native boolean LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_result_ok(long arg);
1551         public static native number LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(long arg);
1552         public static native number LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(long arg);
1553         public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
1554         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
1555         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
1556         public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
1557         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
1558         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
1559         public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
1560         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
1561         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
1562         public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
1563         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
1564         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
1565         public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
1566         public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
1567         public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
1568         public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
1569         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
1570         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
1571         public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
1572         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
1573         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
1574         public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
1575         public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
1576         public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
1577         public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
1578         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
1579         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
1580         public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
1581         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
1582         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
1583         public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
1584         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
1585         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
1586         public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
1587         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
1588         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
1589         public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
1590         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
1591         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
1592         public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
1593         public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
1594         public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
1595         public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
1596         public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
1597         public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
1598         public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1599         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1600         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
1601         public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1602         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1603         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
1604         public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
1605         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
1606         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
1607         public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
1608         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
1609         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
1610         public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
1611         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
1612         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
1613         public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
1614         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
1615         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
1616         public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
1617         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
1618         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
1619         public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
1620         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
1621         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
1622         public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
1623         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1624         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1625         public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
1626         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1627         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1628         public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
1629         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1630         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1631         public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
1632         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1633         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1634         public static class LDKSignOrCreationError {
1635                 private LDKSignOrCreationError() {}
1636                 export class SignError extends LDKSignOrCreationError {
1637                         SignError() { }
1638                 }
1639                 export class CreationError extends LDKSignOrCreationError {
1640                         public CreationError creation_error;
1641                         CreationError(CreationError creation_error) { this.creation_error = creation_error; }
1642                 }
1643                 static native void init();
1644         }
1645         static { LDKSignOrCreationError.init(); }
1646         public static native LDKSignOrCreationError LDKSignOrCreationError_ref_from_ptr(long ptr);
1647         public static native boolean LDKCResult_InvoiceSignOrCreationErrorZ_result_ok(long arg);
1648         public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_ok(long arg);
1649         public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_err(long arg);
1650
1651
1652
1653 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1654
1655                 export interface LDKFilter {
1656                         register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1657                         register_output (output: number): number;
1658                 }
1659
1660                 export function LDKFilter_new(impl: LDKFilter): number {
1661             throw new Error('unimplemented'); // TODO: bind to WASM
1662         }
1663
1664 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1665
1666
1667         // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1668         export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1669                 if(!isWasmInitialized) {
1670                         throw new Error("initializeWasm() must be awaited first!");
1671                 }
1672                 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1673                 // debug statements here
1674         }
1675         // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
1676         export function Filter_register_output(this_arg: number, output: number): number {
1677                 if(!isWasmInitialized) {
1678                         throw new Error("initializeWasm() must be awaited first!");
1679                 }
1680                 const nativeResponseValue = wasm.Filter_register_output(this_arg, output);
1681                 return nativeResponseValue;
1682         }
1683         public static class LDKCOption_FilterZ {
1684                 private LDKCOption_FilterZ() {}
1685                 export class Some extends LDKCOption_FilterZ {
1686                         public number some;
1687                         Some(number some) { this.some = some; }
1688                 }
1689                 export class None extends LDKCOption_FilterZ {
1690                         None() { }
1691                 }
1692                 static native void init();
1693         }
1694         static { LDKCOption_FilterZ.init(); }
1695         public static native LDKCOption_FilterZ LDKCOption_FilterZ_ref_from_ptr(long ptr);
1696
1697
1698
1699 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1700
1701                 export interface LDKMessageSendEventsProvider {
1702                         get_and_clear_pending_msg_events (): number[];
1703                 }
1704
1705                 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1706             throw new Error('unimplemented'); // TODO: bind to WASM
1707         }
1708
1709 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1710
1711
1712         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1713         export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1714                 if(!isWasmInitialized) {
1715                         throw new Error("initializeWasm() must be awaited first!");
1716                 }
1717                 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1718                 return nativeResponseValue;
1719         }
1720
1721
1722
1723 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1724
1725                 export interface LDKEventHandler {
1726                         handle_event (event: number): void;
1727                 }
1728
1729                 export function LDKEventHandler_new(impl: LDKEventHandler): number {
1730             throw new Error('unimplemented'); // TODO: bind to WASM
1731         }
1732
1733 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1734
1735
1736         // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, const struct LDKEvent *NONNULL_PTR event
1737         export function EventHandler_handle_event(this_arg: number, event: number): void {
1738                 if(!isWasmInitialized) {
1739                         throw new Error("initializeWasm() must be awaited first!");
1740                 }
1741                 const nativeResponseValue = wasm.EventHandler_handle_event(this_arg, event);
1742                 // debug statements here
1743         }
1744
1745
1746
1747 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1748
1749                 export interface LDKEventsProvider {
1750                         process_pending_events (handler: number): void;
1751                 }
1752
1753                 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1754             throw new Error('unimplemented'); // TODO: bind to WASM
1755         }
1756
1757 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1758
1759
1760         // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
1761         export function EventsProvider_process_pending_events(this_arg: number, handler: number): void {
1762                 if(!isWasmInitialized) {
1763                         throw new Error("initializeWasm() must be awaited first!");
1764                 }
1765                 const nativeResponseValue = wasm.EventsProvider_process_pending_events(this_arg, handler);
1766                 // debug statements here
1767         }
1768
1769
1770
1771 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1772
1773                 export interface LDKListen {
1774                         block_connected (block: Uint8Array, height: number): void;
1775                         block_disconnected (header: Uint8Array, height: number): void;
1776                 }
1777
1778                 export function LDKListen_new(impl: LDKListen): number {
1779             throw new Error('unimplemented'); // TODO: bind to WASM
1780         }
1781
1782 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1783
1784
1785         // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1786         export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1787                 if(!isWasmInitialized) {
1788                         throw new Error("initializeWasm() must be awaited first!");
1789                 }
1790                 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1791                 // debug statements here
1792         }
1793         // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1794         export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1795                 if(!isWasmInitialized) {
1796                         throw new Error("initializeWasm() must be awaited first!");
1797                 }
1798                 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1799                 // debug statements here
1800         }
1801
1802
1803
1804 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1805
1806                 export interface LDKConfirm {
1807                         transactions_confirmed (header: Uint8Array, txdata: number[], height: number): void;
1808                         transaction_unconfirmed (txid: Uint8Array): void;
1809                         best_block_updated (header: Uint8Array, height: number): void;
1810                         get_relevant_txids (): Uint8Array[];
1811                 }
1812
1813                 export function LDKConfirm_new(impl: LDKConfirm): number {
1814             throw new Error('unimplemented'); // TODO: bind to WASM
1815         }
1816
1817 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1818
1819
1820         // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
1821         export function Confirm_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
1822                 if(!isWasmInitialized) {
1823                         throw new Error("initializeWasm() must be awaited first!");
1824                 }
1825                 const nativeResponseValue = wasm.Confirm_transactions_confirmed(this_arg, encodeArray(header), txdata, height);
1826                 // debug statements here
1827         }
1828         // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
1829         export function Confirm_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
1830                 if(!isWasmInitialized) {
1831                         throw new Error("initializeWasm() must be awaited first!");
1832                 }
1833                 const nativeResponseValue = wasm.Confirm_transaction_unconfirmed(this_arg, encodeArray(txid));
1834                 // debug statements here
1835         }
1836         // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1837         export function Confirm_best_block_updated(this_arg: number, header: Uint8Array, height: number): void {
1838                 if(!isWasmInitialized) {
1839                         throw new Error("initializeWasm() must be awaited first!");
1840                 }
1841                 const nativeResponseValue = wasm.Confirm_best_block_updated(this_arg, encodeArray(header), height);
1842                 // debug statements here
1843         }
1844         // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
1845         export function Confirm_get_relevant_txids(this_arg: number): Uint8Array[] {
1846                 if(!isWasmInitialized) {
1847                         throw new Error("initializeWasm() must be awaited first!");
1848                 }
1849                 const nativeResponseValue = wasm.Confirm_get_relevant_txids(this_arg);
1850                 return nativeResponseValue;
1851         }
1852
1853
1854
1855 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1856
1857                 export interface LDKPersist {
1858                         persist_new_channel (id: number, data: number): number;
1859                         update_persisted_channel (id: number, update: number, data: number): number;
1860                 }
1861
1862                 export function LDKPersist_new(impl: LDKPersist): number {
1863             throw new Error('unimplemented'); // TODO: bind to WASM
1864         }
1865
1866 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1867
1868
1869         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1870         export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1871                 if(!isWasmInitialized) {
1872                         throw new Error("initializeWasm() must be awaited first!");
1873                 }
1874                 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1875                 return nativeResponseValue;
1876         }
1877         // 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
1878         export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1879                 if(!isWasmInitialized) {
1880                         throw new Error("initializeWasm() must be awaited first!");
1881                 }
1882                 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1883                 return nativeResponseValue;
1884         }
1885
1886
1887
1888 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1889
1890                 export interface LDKChannelMessageHandler {
1891                         handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1892                         handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1893                         handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1894                         handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1895                         handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1896                         handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1897                         handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1898                         handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1899                         handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1900                         handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1901                         handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1902                         handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1903                         handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1904                         handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1905                         handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1906                         peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1907                         peer_connected (their_node_id: Uint8Array, msg: number): void;
1908                         handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1909                         handle_channel_update (their_node_id: Uint8Array, msg: number): void;
1910                         handle_error (their_node_id: Uint8Array, msg: number): void;
1911                 }
1912
1913                 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1914             throw new Error('unimplemented'); // TODO: bind to WASM
1915         }
1916
1917 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1918
1919
1920         // 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
1921         export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1922                 if(!isWasmInitialized) {
1923                         throw new Error("initializeWasm() must be awaited first!");
1924                 }
1925                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1926                 // debug statements here
1927         }
1928         // 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
1929         export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1930                 if(!isWasmInitialized) {
1931                         throw new Error("initializeWasm() must be awaited first!");
1932                 }
1933                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1934                 // debug statements here
1935         }
1936         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1937         export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1938                 if(!isWasmInitialized) {
1939                         throw new Error("initializeWasm() must be awaited first!");
1940                 }
1941                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1942                 // debug statements here
1943         }
1944         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1945         export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1946                 if(!isWasmInitialized) {
1947                         throw new Error("initializeWasm() must be awaited first!");
1948                 }
1949                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1950                 // debug statements here
1951         }
1952         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1953         export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1954                 if(!isWasmInitialized) {
1955                         throw new Error("initializeWasm() must be awaited first!");
1956                 }
1957                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1958                 // debug statements here
1959         }
1960         // 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
1961         export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1962                 if(!isWasmInitialized) {
1963                         throw new Error("initializeWasm() must be awaited first!");
1964                 }
1965                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
1966                 // debug statements here
1967         }
1968         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
1969         export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1970                 if(!isWasmInitialized) {
1971                         throw new Error("initializeWasm() must be awaited first!");
1972                 }
1973                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
1974                 // debug statements here
1975         }
1976         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
1977         export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1978                 if(!isWasmInitialized) {
1979                         throw new Error("initializeWasm() must be awaited first!");
1980                 }
1981                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
1982                 // debug statements here
1983         }
1984         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
1985         export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1986                 if(!isWasmInitialized) {
1987                         throw new Error("initializeWasm() must be awaited first!");
1988                 }
1989                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
1990                 // debug statements here
1991         }
1992         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
1993         export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1994                 if(!isWasmInitialized) {
1995                         throw new Error("initializeWasm() must be awaited first!");
1996                 }
1997                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
1998                 // debug statements here
1999         }
2000         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
2001         export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2002                 if(!isWasmInitialized) {
2003                         throw new Error("initializeWasm() must be awaited first!");
2004                 }
2005                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
2006                 // debug statements here
2007         }
2008         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
2009         export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2010                 if(!isWasmInitialized) {
2011                         throw new Error("initializeWasm() must be awaited first!");
2012                 }
2013                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
2014                 // debug statements here
2015         }
2016         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
2017         export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2018                 if(!isWasmInitialized) {
2019                         throw new Error("initializeWasm() must be awaited first!");
2020                 }
2021                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
2022                 // debug statements here
2023         }
2024         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
2025         export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2026                 if(!isWasmInitialized) {
2027                         throw new Error("initializeWasm() must be awaited first!");
2028                 }
2029                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
2030                 // debug statements here
2031         }
2032         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
2033         export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2034                 if(!isWasmInitialized) {
2035                         throw new Error("initializeWasm() must be awaited first!");
2036                 }
2037                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
2038                 // debug statements here
2039         }
2040         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
2041         export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
2042                 if(!isWasmInitialized) {
2043                         throw new Error("initializeWasm() must be awaited first!");
2044                 }
2045                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
2046                 // debug statements here
2047         }
2048         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
2049         export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2050                 if(!isWasmInitialized) {
2051                         throw new Error("initializeWasm() must be awaited first!");
2052                 }
2053                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
2054                 // debug statements here
2055         }
2056         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
2057         export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2058                 if(!isWasmInitialized) {
2059                         throw new Error("initializeWasm() must be awaited first!");
2060                 }
2061                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
2062                 // debug statements here
2063         }
2064         // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
2065         export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2066                 if(!isWasmInitialized) {
2067                         throw new Error("initializeWasm() must be awaited first!");
2068                 }
2069                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_update(this_arg, encodeArray(their_node_id), msg);
2070                 // debug statements here
2071         }
2072         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
2073         export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2074                 if(!isWasmInitialized) {
2075                         throw new Error("initializeWasm() must be awaited first!");
2076                 }
2077                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
2078                 // debug statements here
2079         }
2080
2081
2082
2083 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2084
2085                 export interface LDKRoutingMessageHandler {
2086                         handle_node_announcement (msg: number): number;
2087                         handle_channel_announcement (msg: number): number;
2088                         handle_channel_update (msg: number): number;
2089                         get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
2090                         get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
2091                         sync_routing_table (their_node_id: Uint8Array, init: number): void;
2092                         handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
2093                         handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
2094                         handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
2095                         handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
2096                 }
2097
2098                 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
2099             throw new Error('unimplemented'); // TODO: bind to WASM
2100         }
2101
2102 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2103
2104
2105         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
2106         export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
2107                 if(!isWasmInitialized) {
2108                         throw new Error("initializeWasm() must be awaited first!");
2109                 }
2110                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
2111                 return nativeResponseValue;
2112         }
2113         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
2114         export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
2115                 if(!isWasmInitialized) {
2116                         throw new Error("initializeWasm() must be awaited first!");
2117                 }
2118                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
2119                 return nativeResponseValue;
2120         }
2121         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
2122         export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
2123                 if(!isWasmInitialized) {
2124                         throw new Error("initializeWasm() must be awaited first!");
2125                 }
2126                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
2127                 return nativeResponseValue;
2128         }
2129         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
2130         export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
2131                 if(!isWasmInitialized) {
2132                         throw new Error("initializeWasm() must be awaited first!");
2133                 }
2134                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
2135                 return nativeResponseValue;
2136         }
2137         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
2138         export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
2139                 if(!isWasmInitialized) {
2140                         throw new Error("initializeWasm() must be awaited first!");
2141                 }
2142                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
2143                 return nativeResponseValue;
2144         }
2145         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
2146         export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
2147                 if(!isWasmInitialized) {
2148                         throw new Error("initializeWasm() must be awaited first!");
2149                 }
2150                 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
2151                 // debug statements here
2152         }
2153         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
2154         export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2155                 if(!isWasmInitialized) {
2156                         throw new Error("initializeWasm() must be awaited first!");
2157                 }
2158                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
2159                 return nativeResponseValue;
2160         }
2161         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
2162         export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2163                 if(!isWasmInitialized) {
2164                         throw new Error("initializeWasm() must be awaited first!");
2165                 }
2166                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
2167                 return nativeResponseValue;
2168         }
2169         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
2170         export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2171                 if(!isWasmInitialized) {
2172                         throw new Error("initializeWasm() must be awaited first!");
2173                 }
2174                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
2175                 return nativeResponseValue;
2176         }
2177         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
2178         export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2179                 if(!isWasmInitialized) {
2180                         throw new Error("initializeWasm() must be awaited first!");
2181                 }
2182                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
2183                 return nativeResponseValue;
2184         }
2185
2186
2187
2188 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2189
2190                 export interface LDKCustomMessageReader {
2191                         read (message_type: number, buffer: Uint8Array): number;
2192                 }
2193
2194                 export function LDKCustomMessageReader_new(impl: LDKCustomMessageReader): number {
2195             throw new Error('unimplemented'); // TODO: bind to WASM
2196         }
2197
2198 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2199
2200
2201         // LDKCResult_COption_TypeZDecodeErrorZ CustomMessageReader_read LDKCustomMessageReader *NONNULL_PTR this_arg, uint16_t message_type, struct LDKu8slice buffer
2202         export function CustomMessageReader_read(this_arg: number, message_type: number, buffer: Uint8Array): number {
2203                 if(!isWasmInitialized) {
2204                         throw new Error("initializeWasm() must be awaited first!");
2205                 }
2206                 const nativeResponseValue = wasm.CustomMessageReader_read(this_arg, message_type, encodeArray(buffer));
2207                 return nativeResponseValue;
2208         }
2209
2210
2211
2212 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2213
2214                 export interface LDKCustomMessageHandler {
2215                         handle_custom_message (msg: number, sender_node_id: Uint8Array): number;
2216                         get_and_clear_pending_msg (): number[];
2217                 }
2218
2219                 export function LDKCustomMessageHandler_new(impl: LDKCustomMessageHandler, CustomMessageReader: LDKCustomMessageReader): number {
2220             throw new Error('unimplemented'); // TODO: bind to WASM
2221         }
2222
2223 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2224
2225
2226         // LDKCResult_NoneLightningErrorZ CustomMessageHandler_handle_custom_message LDKCustomMessageHandler *NONNULL_PTR this_arg, struct LDKType msg, struct LDKPublicKey sender_node_id
2227         export function CustomMessageHandler_handle_custom_message(this_arg: number, msg: number, sender_node_id: Uint8Array): number {
2228                 if(!isWasmInitialized) {
2229                         throw new Error("initializeWasm() must be awaited first!");
2230                 }
2231                 const nativeResponseValue = wasm.CustomMessageHandler_handle_custom_message(this_arg, msg, encodeArray(sender_node_id));
2232                 return nativeResponseValue;
2233         }
2234         // LDKCVec_C2Tuple_PublicKeyTypeZZ CustomMessageHandler_get_and_clear_pending_msg LDKCustomMessageHandler *NONNULL_PTR this_arg
2235         export function CustomMessageHandler_get_and_clear_pending_msg(this_arg: number): number[] {
2236                 if(!isWasmInitialized) {
2237                         throw new Error("initializeWasm() must be awaited first!");
2238                 }
2239                 const nativeResponseValue = wasm.CustomMessageHandler_get_and_clear_pending_msg(this_arg);
2240                 return nativeResponseValue;
2241         }
2242
2243
2244
2245 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2246
2247                 export interface LDKSocketDescriptor {
2248                         send_data (data: Uint8Array, resume_read: boolean): number;
2249                         disconnect_socket (): void;
2250                         eq (other_arg: number): boolean;
2251                         hash (): number;
2252                 }
2253
2254                 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
2255             throw new Error('unimplemented'); // TODO: bind to WASM
2256         }
2257
2258 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2259
2260
2261         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
2262         export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
2263                 if(!isWasmInitialized) {
2264                         throw new Error("initializeWasm() must be awaited first!");
2265                 }
2266                 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
2267                 return nativeResponseValue;
2268         }
2269         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
2270         export function SocketDescriptor_disconnect_socket(this_arg: number): void {
2271                 if(!isWasmInitialized) {
2272                         throw new Error("initializeWasm() must be awaited first!");
2273                 }
2274                 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
2275                 // debug statements here
2276         }
2277         // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
2278         export function SocketDescriptor_hash(this_arg: number): number {
2279                 if(!isWasmInitialized) {
2280                         throw new Error("initializeWasm() must be awaited first!");
2281                 }
2282                 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
2283                 return nativeResponseValue;
2284         }
2285
2286
2287
2288 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2289
2290                 export interface LDKChannelManagerPersister {
2291                         persist_manager (channel_manager: number): number;
2292                 }
2293
2294                 export function LDKChannelManagerPersister_new(impl: LDKChannelManagerPersister): number {
2295             throw new Error('unimplemented'); // TODO: bind to WASM
2296         }
2297
2298 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2299
2300
2301         // LDKCResult_NoneErrorZ ChannelManagerPersister_persist_manager LDKChannelManagerPersister *NONNULL_PTR this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager
2302         export function ChannelManagerPersister_persist_manager(this_arg: number, channel_manager: number): number {
2303                 if(!isWasmInitialized) {
2304                         throw new Error("initializeWasm() must be awaited first!");
2305                 }
2306                 const nativeResponseValue = wasm.ChannelManagerPersister_persist_manager(this_arg, channel_manager);
2307                 return nativeResponseValue;
2308         }
2309         public static class LDKFallback {
2310                 private LDKFallback() {}
2311                 export class SegWitProgram extends LDKFallback {
2312                         public number version;
2313                         public Uint8Array program;
2314                         SegWitProgram(number version, Uint8Array program) { this.version = version; this.program = program; }
2315                 }
2316                 export class PubKeyHash extends LDKFallback {
2317                         public Uint8Array pub_key_hash;
2318                         PubKeyHash(Uint8Array pub_key_hash) { this.pub_key_hash = pub_key_hash; }
2319                 }
2320                 export class ScriptHash extends LDKFallback {
2321                         public Uint8Array script_hash;
2322                         ScriptHash(Uint8Array script_hash) { this.script_hash = script_hash; }
2323                 }
2324                 static native void init();
2325         }
2326         static { LDKFallback.init(); }
2327         public static native LDKFallback LDKFallback_ref_from_ptr(long ptr);
2328         // struct LDKStr _ldk_get_compiled_version(void);
2329         export function _ldk_get_compiled_version(): String {
2330                 if(!isWasmInitialized) {
2331                         throw new Error("initializeWasm() must be awaited first!");
2332                 }
2333                 const nativeResponseValue = wasm._ldk_get_compiled_version();
2334                 return nativeResponseValue;
2335         }
2336         // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
2337         export function _ldk_c_bindings_get_compiled_version(): String {
2338                 if(!isWasmInitialized) {
2339                         throw new Error("initializeWasm() must be awaited first!");
2340                 }
2341                 const nativeResponseValue = wasm._ldk_c_bindings_get_compiled_version();
2342                 return nativeResponseValue;
2343         }
2344         // void Transaction_free(struct LDKTransaction _res);
2345         export function Transaction_free(_res: Uint8Array): void {
2346                 if(!isWasmInitialized) {
2347                         throw new Error("initializeWasm() must be awaited first!");
2348                 }
2349                 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
2350                 // debug statements here
2351         }
2352         // struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
2353         export function TxOut_new(script_pubkey: Uint8Array, value: number): number {
2354                 if(!isWasmInitialized) {
2355                         throw new Error("initializeWasm() must be awaited first!");
2356                 }
2357                 const nativeResponseValue = wasm.TxOut_new(encodeArray(script_pubkey), value);
2358                 return nativeResponseValue;
2359         }
2360         // void TxOut_free(struct LDKTxOut _res);
2361         export function TxOut_free(_res: number): void {
2362                 if(!isWasmInitialized) {
2363                         throw new Error("initializeWasm() must be awaited first!");
2364                 }
2365                 const nativeResponseValue = wasm.TxOut_free(_res);
2366                 // debug statements here
2367         }
2368         // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
2369         export function TxOut_clone(orig: number): number {
2370                 if(!isWasmInitialized) {
2371                         throw new Error("initializeWasm() must be awaited first!");
2372                 }
2373                 const nativeResponseValue = wasm.TxOut_clone(orig);
2374                 return nativeResponseValue;
2375         }
2376         // void Str_free(struct LDKStr _res);
2377         export function Str_free(_res: String): void {
2378                 if(!isWasmInitialized) {
2379                         throw new Error("initializeWasm() must be awaited first!");
2380                 }
2381                 const nativeResponseValue = wasm.Str_free(_res);
2382                 // debug statements here
2383         }
2384         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
2385         export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
2386                 if(!isWasmInitialized) {
2387                         throw new Error("initializeWasm() must be awaited first!");
2388                 }
2389                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
2390                 return nativeResponseValue;
2391         }
2392         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
2393         export function CResult_SecretKeyErrorZ_err(e: Secp256k1Error): number {
2394                 if(!isWasmInitialized) {
2395                         throw new Error("initializeWasm() must be awaited first!");
2396                 }
2397                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
2398                 return nativeResponseValue;
2399         }
2400         // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
2401         export function CResult_SecretKeyErrorZ_free(_res: number): void {
2402                 if(!isWasmInitialized) {
2403                         throw new Error("initializeWasm() must be awaited first!");
2404                 }
2405                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
2406                 // debug statements here
2407         }
2408         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
2409         export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
2410                 if(!isWasmInitialized) {
2411                         throw new Error("initializeWasm() must be awaited first!");
2412                 }
2413                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
2414                 return nativeResponseValue;
2415         }
2416         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
2417         export function CResult_PublicKeyErrorZ_err(e: Secp256k1Error): number {
2418                 if(!isWasmInitialized) {
2419                         throw new Error("initializeWasm() must be awaited first!");
2420                 }
2421                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
2422                 return nativeResponseValue;
2423         }
2424         // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
2425         export function CResult_PublicKeyErrorZ_free(_res: number): void {
2426                 if(!isWasmInitialized) {
2427                         throw new Error("initializeWasm() must be awaited first!");
2428                 }
2429                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
2430                 // debug statements here
2431         }
2432         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
2433         export function CResult_PublicKeyErrorZ_clone(orig: number): number {
2434                 if(!isWasmInitialized) {
2435                         throw new Error("initializeWasm() must be awaited first!");
2436                 }
2437                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_clone(orig);
2438                 return nativeResponseValue;
2439         }
2440         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
2441         export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
2442                 if(!isWasmInitialized) {
2443                         throw new Error("initializeWasm() must be awaited first!");
2444                 }
2445                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
2446                 return nativeResponseValue;
2447         }
2448         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
2449         export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
2450                 if(!isWasmInitialized) {
2451                         throw new Error("initializeWasm() must be awaited first!");
2452                 }
2453                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
2454                 return nativeResponseValue;
2455         }
2456         // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
2457         export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
2458                 if(!isWasmInitialized) {
2459                         throw new Error("initializeWasm() must be awaited first!");
2460                 }
2461                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
2462                 // debug statements here
2463         }
2464         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
2465         export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
2466                 if(!isWasmInitialized) {
2467                         throw new Error("initializeWasm() must be awaited first!");
2468                 }
2469                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
2470                 return nativeResponseValue;
2471         }
2472         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
2473         export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
2474                 if(!isWasmInitialized) {
2475                         throw new Error("initializeWasm() must be awaited first!");
2476                 }
2477                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
2478                 return nativeResponseValue;
2479         }
2480         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
2481         export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
2482                 if(!isWasmInitialized) {
2483                         throw new Error("initializeWasm() must be awaited first!");
2484                 }
2485                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
2486                 return nativeResponseValue;
2487         }
2488         // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
2489         export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
2490                 if(!isWasmInitialized) {
2491                         throw new Error("initializeWasm() must be awaited first!");
2492                 }
2493                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
2494                 // debug statements here
2495         }
2496         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
2497         export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
2498                 if(!isWasmInitialized) {
2499                         throw new Error("initializeWasm() must be awaited first!");
2500                 }
2501                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
2502                 return nativeResponseValue;
2503         }
2504         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
2505         export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
2506                 if(!isWasmInitialized) {
2507                         throw new Error("initializeWasm() must be awaited first!");
2508                 }
2509                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
2510                 return nativeResponseValue;
2511         }
2512         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
2513         export function CResult_TxCreationKeysErrorZ_err(e: Secp256k1Error): number {
2514                 if(!isWasmInitialized) {
2515                         throw new Error("initializeWasm() must be awaited first!");
2516                 }
2517                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
2518                 return nativeResponseValue;
2519         }
2520         // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
2521         export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
2522                 if(!isWasmInitialized) {
2523                         throw new Error("initializeWasm() must be awaited first!");
2524                 }
2525                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
2526                 // debug statements here
2527         }
2528         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
2529         export function CResult_TxCreationKeysErrorZ_clone(orig: number): number {
2530                 if(!isWasmInitialized) {
2531                         throw new Error("initializeWasm() must be awaited first!");
2532                 }
2533                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_clone(orig);
2534                 return nativeResponseValue;
2535         }
2536         // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
2537         export function COption_u32Z_some(o: number): number {
2538                 if(!isWasmInitialized) {
2539                         throw new Error("initializeWasm() must be awaited first!");
2540                 }
2541                 const nativeResponseValue = wasm.COption_u32Z_some(o);
2542                 return nativeResponseValue;
2543         }
2544         // struct LDKCOption_u32Z COption_u32Z_none(void);
2545         export function COption_u32Z_none(): number {
2546                 if(!isWasmInitialized) {
2547                         throw new Error("initializeWasm() must be awaited first!");
2548                 }
2549                 const nativeResponseValue = wasm.COption_u32Z_none();
2550                 return nativeResponseValue;
2551         }
2552         // void COption_u32Z_free(struct LDKCOption_u32Z _res);
2553         export function COption_u32Z_free(_res: number): void {
2554                 if(!isWasmInitialized) {
2555                         throw new Error("initializeWasm() must be awaited first!");
2556                 }
2557                 const nativeResponseValue = wasm.COption_u32Z_free(_res);
2558                 // debug statements here
2559         }
2560         // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
2561         export function COption_u32Z_clone(orig: number): number {
2562                 if(!isWasmInitialized) {
2563                         throw new Error("initializeWasm() must be awaited first!");
2564                 }
2565                 const nativeResponseValue = wasm.COption_u32Z_clone(orig);
2566                 return nativeResponseValue;
2567         }
2568         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
2569         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
2570                 if(!isWasmInitialized) {
2571                         throw new Error("initializeWasm() must be awaited first!");
2572                 }
2573                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
2574                 return nativeResponseValue;
2575         }
2576         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
2577         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
2578                 if(!isWasmInitialized) {
2579                         throw new Error("initializeWasm() must be awaited first!");
2580                 }
2581                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
2582                 return nativeResponseValue;
2583         }
2584         // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
2585         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
2586                 if(!isWasmInitialized) {
2587                         throw new Error("initializeWasm() must be awaited first!");
2588                 }
2589                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
2590                 // debug statements here
2591         }
2592         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
2593         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
2594                 if(!isWasmInitialized) {
2595                         throw new Error("initializeWasm() must be awaited first!");
2596                 }
2597                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
2598                 return nativeResponseValue;
2599         }
2600         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
2601         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2602                 if(!isWasmInitialized) {
2603                         throw new Error("initializeWasm() must be awaited first!");
2604                 }
2605                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
2606                 return nativeResponseValue;
2607         }
2608         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2609         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2610                 if(!isWasmInitialized) {
2611                         throw new Error("initializeWasm() must be awaited first!");
2612                 }
2613                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
2614                 return nativeResponseValue;
2615         }
2616         // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
2617         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2618                 if(!isWasmInitialized) {
2619                         throw new Error("initializeWasm() must be awaited first!");
2620                 }
2621                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
2622                 // debug statements here
2623         }
2624         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2625         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2626                 if(!isWasmInitialized) {
2627                         throw new Error("initializeWasm() must be awaited first!");
2628                 }
2629                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
2630                 return nativeResponseValue;
2631         }
2632         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
2633         export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2634                 if(!isWasmInitialized) {
2635                         throw new Error("initializeWasm() must be awaited first!");
2636                 }
2637                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
2638                 return nativeResponseValue;
2639         }
2640         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2641         export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2642                 if(!isWasmInitialized) {
2643                         throw new Error("initializeWasm() must be awaited first!");
2644                 }
2645                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
2646                 return nativeResponseValue;
2647         }
2648         // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
2649         export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2650                 if(!isWasmInitialized) {
2651                         throw new Error("initializeWasm() must be awaited first!");
2652                 }
2653                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
2654                 // debug statements here
2655         }
2656         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2657         export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2658                 if(!isWasmInitialized) {
2659                         throw new Error("initializeWasm() must be awaited first!");
2660                 }
2661                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
2662                 return nativeResponseValue;
2663         }
2664         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
2665         export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
2666                 if(!isWasmInitialized) {
2667                         throw new Error("initializeWasm() must be awaited first!");
2668                 }
2669                 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
2670                 // debug statements here
2671         }
2672         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
2673         export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2674                 if(!isWasmInitialized) {
2675                         throw new Error("initializeWasm() must be awaited first!");
2676                 }
2677                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
2678                 return nativeResponseValue;
2679         }
2680         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2681         export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
2682                 if(!isWasmInitialized) {
2683                         throw new Error("initializeWasm() must be awaited first!");
2684                 }
2685                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
2686                 return nativeResponseValue;
2687         }
2688         // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
2689         export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2690                 if(!isWasmInitialized) {
2691                         throw new Error("initializeWasm() must be awaited first!");
2692                 }
2693                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
2694                 // debug statements here
2695         }
2696         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2697         export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2698                 if(!isWasmInitialized) {
2699                         throw new Error("initializeWasm() must be awaited first!");
2700                 }
2701                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
2702                 return nativeResponseValue;
2703         }
2704         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
2705         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2706                 if(!isWasmInitialized) {
2707                         throw new Error("initializeWasm() must be awaited first!");
2708                 }
2709                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
2710                 return nativeResponseValue;
2711         }
2712         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2713         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
2714                 if(!isWasmInitialized) {
2715                         throw new Error("initializeWasm() must be awaited first!");
2716                 }
2717                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
2718                 return nativeResponseValue;
2719         }
2720         // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
2721         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2722                 if(!isWasmInitialized) {
2723                         throw new Error("initializeWasm() must be awaited first!");
2724                 }
2725                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
2726                 // debug statements here
2727         }
2728         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2729         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2730                 if(!isWasmInitialized) {
2731                         throw new Error("initializeWasm() must be awaited first!");
2732                 }
2733                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
2734                 return nativeResponseValue;
2735         }
2736         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_ok(struct LDKTrustedClosingTransaction o);
2737         export function CResult_TrustedClosingTransactionNoneZ_ok(o: number): number {
2738                 if(!isWasmInitialized) {
2739                         throw new Error("initializeWasm() must be awaited first!");
2740                 }
2741                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_ok(o);
2742                 return nativeResponseValue;
2743         }
2744         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_err(void);
2745         export function CResult_TrustedClosingTransactionNoneZ_err(): number {
2746                 if(!isWasmInitialized) {
2747                         throw new Error("initializeWasm() must be awaited first!");
2748                 }
2749                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_err();
2750                 return nativeResponseValue;
2751         }
2752         // void CResult_TrustedClosingTransactionNoneZ_free(struct LDKCResult_TrustedClosingTransactionNoneZ _res);
2753         export function CResult_TrustedClosingTransactionNoneZ_free(_res: number): void {
2754                 if(!isWasmInitialized) {
2755                         throw new Error("initializeWasm() must be awaited first!");
2756                 }
2757                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_free(_res);
2758                 // debug statements here
2759         }
2760         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
2761         export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
2762                 if(!isWasmInitialized) {
2763                         throw new Error("initializeWasm() must be awaited first!");
2764                 }
2765                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
2766                 return nativeResponseValue;
2767         }
2768         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2769         export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
2770                 if(!isWasmInitialized) {
2771                         throw new Error("initializeWasm() must be awaited first!");
2772                 }
2773                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
2774                 return nativeResponseValue;
2775         }
2776         // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
2777         export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
2778                 if(!isWasmInitialized) {
2779                         throw new Error("initializeWasm() must be awaited first!");
2780                 }
2781                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
2782                 // debug statements here
2783         }
2784         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2785         export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2786                 if(!isWasmInitialized) {
2787                         throw new Error("initializeWasm() must be awaited first!");
2788                 }
2789                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
2790                 return nativeResponseValue;
2791         }
2792         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
2793         export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
2794                 if(!isWasmInitialized) {
2795                         throw new Error("initializeWasm() must be awaited first!");
2796                 }
2797                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
2798                 return nativeResponseValue;
2799         }
2800         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
2801         export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
2802                 if(!isWasmInitialized) {
2803                         throw new Error("initializeWasm() must be awaited first!");
2804                 }
2805                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
2806                 return nativeResponseValue;
2807         }
2808         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
2809         export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
2810                 if(!isWasmInitialized) {
2811                         throw new Error("initializeWasm() must be awaited first!");
2812                 }
2813                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
2814                 // debug statements here
2815         }
2816         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
2817         export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
2818                 if(!isWasmInitialized) {
2819                         throw new Error("initializeWasm() must be awaited first!");
2820                 }
2821                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
2822                 return nativeResponseValue;
2823         }
2824         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
2825         export function CResult_CVec_SignatureZNoneZ_err(): number {
2826                 if(!isWasmInitialized) {
2827                         throw new Error("initializeWasm() must be awaited first!");
2828                 }
2829                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
2830                 return nativeResponseValue;
2831         }
2832         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
2833         export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
2834                 if(!isWasmInitialized) {
2835                         throw new Error("initializeWasm() must be awaited first!");
2836                 }
2837                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
2838                 // debug statements here
2839         }
2840         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
2841         export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
2842                 if(!isWasmInitialized) {
2843                         throw new Error("initializeWasm() must be awaited first!");
2844                 }
2845                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
2846                 return nativeResponseValue;
2847         }
2848         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_ok(struct LDKShutdownScript o);
2849         export function CResult_ShutdownScriptDecodeErrorZ_ok(o: number): number {
2850                 if(!isWasmInitialized) {
2851                         throw new Error("initializeWasm() must be awaited first!");
2852                 }
2853                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_ok(o);
2854                 return nativeResponseValue;
2855         }
2856         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_err(struct LDKDecodeError e);
2857         export function CResult_ShutdownScriptDecodeErrorZ_err(e: number): number {
2858                 if(!isWasmInitialized) {
2859                         throw new Error("initializeWasm() must be awaited first!");
2860                 }
2861                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_err(e);
2862                 return nativeResponseValue;
2863         }
2864         // void CResult_ShutdownScriptDecodeErrorZ_free(struct LDKCResult_ShutdownScriptDecodeErrorZ _res);
2865         export function CResult_ShutdownScriptDecodeErrorZ_free(_res: number): void {
2866                 if(!isWasmInitialized) {
2867                         throw new Error("initializeWasm() must be awaited first!");
2868                 }
2869                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_free(_res);
2870                 // debug statements here
2871         }
2872         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_clone(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR orig);
2873         export function CResult_ShutdownScriptDecodeErrorZ_clone(orig: number): number {
2874                 if(!isWasmInitialized) {
2875                         throw new Error("initializeWasm() must be awaited first!");
2876                 }
2877                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_clone(orig);
2878                 return nativeResponseValue;
2879         }
2880         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_ok(struct LDKShutdownScript o);
2881         export function CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o: number): number {
2882                 if(!isWasmInitialized) {
2883                         throw new Error("initializeWasm() must be awaited first!");
2884                 }
2885                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o);
2886                 return nativeResponseValue;
2887         }
2888         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_err(struct LDKInvalidShutdownScript e);
2889         export function CResult_ShutdownScriptInvalidShutdownScriptZ_err(e: number): number {
2890                 if(!isWasmInitialized) {
2891                         throw new Error("initializeWasm() must be awaited first!");
2892                 }
2893                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_err(e);
2894                 return nativeResponseValue;
2895         }
2896         // void CResult_ShutdownScriptInvalidShutdownScriptZ_free(struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ _res);
2897         export function CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res: number): void {
2898                 if(!isWasmInitialized) {
2899                         throw new Error("initializeWasm() must be awaited first!");
2900                 }
2901                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res);
2902                 // debug statements here
2903         }
2904         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
2905         export function CResult_NoneErrorZ_ok(): number {
2906                 if(!isWasmInitialized) {
2907                         throw new Error("initializeWasm() must be awaited first!");
2908                 }
2909                 const nativeResponseValue = wasm.CResult_NoneErrorZ_ok();
2910                 return nativeResponseValue;
2911         }
2912         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
2913         export function CResult_NoneErrorZ_err(e: IOError): number {
2914                 if(!isWasmInitialized) {
2915                         throw new Error("initializeWasm() must be awaited first!");
2916                 }
2917                 const nativeResponseValue = wasm.CResult_NoneErrorZ_err(e);
2918                 return nativeResponseValue;
2919         }
2920         // void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
2921         export function CResult_NoneErrorZ_free(_res: number): void {
2922                 if(!isWasmInitialized) {
2923                         throw new Error("initializeWasm() must be awaited first!");
2924                 }
2925                 const nativeResponseValue = wasm.CResult_NoneErrorZ_free(_res);
2926                 // debug statements here
2927         }
2928         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig);
2929         export function CResult_NoneErrorZ_clone(orig: number): number {
2930                 if(!isWasmInitialized) {
2931                         throw new Error("initializeWasm() must be awaited first!");
2932                 }
2933                 const nativeResponseValue = wasm.CResult_NoneErrorZ_clone(orig);
2934                 return nativeResponseValue;
2935         }
2936         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
2937         export function CResult_RouteHopDecodeErrorZ_ok(o: number): number {
2938                 if(!isWasmInitialized) {
2939                         throw new Error("initializeWasm() must be awaited first!");
2940                 }
2941                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_ok(o);
2942                 return nativeResponseValue;
2943         }
2944         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
2945         export function CResult_RouteHopDecodeErrorZ_err(e: number): number {
2946                 if(!isWasmInitialized) {
2947                         throw new Error("initializeWasm() must be awaited first!");
2948                 }
2949                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_err(e);
2950                 return nativeResponseValue;
2951         }
2952         // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
2953         export function CResult_RouteHopDecodeErrorZ_free(_res: number): void {
2954                 if(!isWasmInitialized) {
2955                         throw new Error("initializeWasm() must be awaited first!");
2956                 }
2957                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_free(_res);
2958                 // debug statements here
2959         }
2960         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
2961         export function CResult_RouteHopDecodeErrorZ_clone(orig: number): number {
2962                 if(!isWasmInitialized) {
2963                         throw new Error("initializeWasm() must be awaited first!");
2964                 }
2965                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_clone(orig);
2966                 return nativeResponseValue;
2967         }
2968         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
2969         export function CVec_RouteHopZ_free(_res: number[]): void {
2970                 if(!isWasmInitialized) {
2971                         throw new Error("initializeWasm() must be awaited first!");
2972                 }
2973                 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
2974                 // debug statements here
2975         }
2976         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
2977         export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
2978                 if(!isWasmInitialized) {
2979                         throw new Error("initializeWasm() must be awaited first!");
2980                 }
2981                 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
2982                 // debug statements here
2983         }
2984         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
2985         export function CResult_RouteDecodeErrorZ_ok(o: number): number {
2986                 if(!isWasmInitialized) {
2987                         throw new Error("initializeWasm() must be awaited first!");
2988                 }
2989                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
2990                 return nativeResponseValue;
2991         }
2992         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
2993         export function CResult_RouteDecodeErrorZ_err(e: number): number {
2994                 if(!isWasmInitialized) {
2995                         throw new Error("initializeWasm() must be awaited first!");
2996                 }
2997                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
2998                 return nativeResponseValue;
2999         }
3000         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
3001         export function CResult_RouteDecodeErrorZ_free(_res: number): void {
3002                 if(!isWasmInitialized) {
3003                         throw new Error("initializeWasm() must be awaited first!");
3004                 }
3005                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
3006                 // debug statements here
3007         }
3008         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
3009         export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
3010                 if(!isWasmInitialized) {
3011                         throw new Error("initializeWasm() must be awaited first!");
3012                 }
3013                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
3014                 return nativeResponseValue;
3015         }
3016         // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
3017         export function COption_u64Z_some(o: number): number {
3018                 if(!isWasmInitialized) {
3019                         throw new Error("initializeWasm() must be awaited first!");
3020                 }
3021                 const nativeResponseValue = wasm.COption_u64Z_some(o);
3022                 return nativeResponseValue;
3023         }
3024         // struct LDKCOption_u64Z COption_u64Z_none(void);
3025         export function COption_u64Z_none(): number {
3026                 if(!isWasmInitialized) {
3027                         throw new Error("initializeWasm() must be awaited first!");
3028                 }
3029                 const nativeResponseValue = wasm.COption_u64Z_none();
3030                 return nativeResponseValue;
3031         }
3032         // void COption_u64Z_free(struct LDKCOption_u64Z _res);
3033         export function COption_u64Z_free(_res: number): void {
3034                 if(!isWasmInitialized) {
3035                         throw new Error("initializeWasm() must be awaited first!");
3036                 }
3037                 const nativeResponseValue = wasm.COption_u64Z_free(_res);
3038                 // debug statements here
3039         }
3040         // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
3041         export function COption_u64Z_clone(orig: number): number {
3042                 if(!isWasmInitialized) {
3043                         throw new Error("initializeWasm() must be awaited first!");
3044                 }
3045                 const nativeResponseValue = wasm.COption_u64Z_clone(orig);
3046                 return nativeResponseValue;
3047         }
3048         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
3049         export function CVec_ChannelDetailsZ_free(_res: number[]): void {
3050                 if(!isWasmInitialized) {
3051                         throw new Error("initializeWasm() must be awaited first!");
3052                 }
3053                 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
3054                 // debug statements here
3055         }
3056         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
3057         export function CVec_RouteHintZ_free(_res: number[]): void {
3058                 if(!isWasmInitialized) {
3059                         throw new Error("initializeWasm() must be awaited first!");
3060                 }
3061                 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
3062                 // debug statements here
3063         }
3064         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
3065         export function CResult_RouteLightningErrorZ_ok(o: number): number {
3066                 if(!isWasmInitialized) {
3067                         throw new Error("initializeWasm() must be awaited first!");
3068                 }
3069                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
3070                 return nativeResponseValue;
3071         }
3072         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
3073         export function CResult_RouteLightningErrorZ_err(e: number): number {
3074                 if(!isWasmInitialized) {
3075                         throw new Error("initializeWasm() must be awaited first!");
3076                 }
3077                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
3078                 return nativeResponseValue;
3079         }
3080         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
3081         export function CResult_RouteLightningErrorZ_free(_res: number): void {
3082                 if(!isWasmInitialized) {
3083                         throw new Error("initializeWasm() must be awaited first!");
3084                 }
3085                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
3086                 // debug statements here
3087         }
3088         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
3089         export function CResult_RouteLightningErrorZ_clone(orig: number): number {
3090                 if(!isWasmInitialized) {
3091                         throw new Error("initializeWasm() must be awaited first!");
3092                 }
3093                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
3094                 return nativeResponseValue;
3095         }
3096         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
3097         export function CResult_TxOutAccessErrorZ_ok(o: number): number {
3098                 if(!isWasmInitialized) {
3099                         throw new Error("initializeWasm() must be awaited first!");
3100                 }
3101                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
3102                 return nativeResponseValue;
3103         }
3104         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
3105         export function CResult_TxOutAccessErrorZ_err(e: AccessError): number {
3106                 if(!isWasmInitialized) {
3107                         throw new Error("initializeWasm() must be awaited first!");
3108                 }
3109                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
3110                 return nativeResponseValue;
3111         }
3112         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
3113         export function CResult_TxOutAccessErrorZ_free(_res: number): void {
3114                 if(!isWasmInitialized) {
3115                         throw new Error("initializeWasm() must be awaited first!");
3116                 }
3117                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
3118                 // debug statements here
3119         }
3120         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
3121         export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
3122                 if(!isWasmInitialized) {
3123                         throw new Error("initializeWasm() must be awaited first!");
3124                 }
3125                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
3126                 return nativeResponseValue;
3127         }
3128         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
3129         export function C2Tuple_usizeTransactionZ_clone(orig: number): number {
3130                 if(!isWasmInitialized) {
3131                         throw new Error("initializeWasm() must be awaited first!");
3132                 }
3133                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_clone(orig);
3134                 return nativeResponseValue;
3135         }
3136         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
3137         export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
3138                 if(!isWasmInitialized) {
3139                         throw new Error("initializeWasm() must be awaited first!");
3140                 }
3141                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
3142                 return nativeResponseValue;
3143         }
3144         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
3145         export function C2Tuple_usizeTransactionZ_free(_res: number): void {
3146                 if(!isWasmInitialized) {
3147                         throw new Error("initializeWasm() must be awaited first!");
3148                 }
3149                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
3150                 // debug statements here
3151         }
3152         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
3153         export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
3154                 if(!isWasmInitialized) {
3155                         throw new Error("initializeWasm() must be awaited first!");
3156                 }
3157                 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
3158                 // debug statements here
3159         }
3160         // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
3161         export function CVec_TxidZ_free(_res: Uint8Array[]): void {
3162                 if(!isWasmInitialized) {
3163                         throw new Error("initializeWasm() must be awaited first!");
3164                 }
3165                 const nativeResponseValue = wasm.CVec_TxidZ_free(_res);
3166                 // debug statements here
3167         }
3168         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
3169         export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
3170                 if(!isWasmInitialized) {
3171                         throw new Error("initializeWasm() must be awaited first!");
3172                 }
3173                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
3174                 return nativeResponseValue;
3175         }
3176         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
3177         export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): number {
3178                 if(!isWasmInitialized) {
3179                         throw new Error("initializeWasm() must be awaited first!");
3180                 }
3181                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
3182                 return nativeResponseValue;
3183         }
3184         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
3185         export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
3186                 if(!isWasmInitialized) {
3187                         throw new Error("initializeWasm() must be awaited first!");
3188                 }
3189                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
3190                 // debug statements here
3191         }
3192         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
3193         export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
3194                 if(!isWasmInitialized) {
3195                         throw new Error("initializeWasm() must be awaited first!");
3196                 }
3197                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
3198                 return nativeResponseValue;
3199         }
3200         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
3201         export function CVec_MonitorEventZ_free(_res: number[]): void {
3202                 if(!isWasmInitialized) {
3203                         throw new Error("initializeWasm() must be awaited first!");
3204                 }
3205                 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
3206                 // debug statements here
3207         }
3208         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
3209         export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
3210                 if(!isWasmInitialized) {
3211                         throw new Error("initializeWasm() must be awaited first!");
3212                 }
3213                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
3214                 return nativeResponseValue;
3215         }
3216         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
3217         export function COption_C2Tuple_usizeTransactionZZ_none(): number {
3218                 if(!isWasmInitialized) {
3219                         throw new Error("initializeWasm() must be awaited first!");
3220                 }
3221                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
3222                 return nativeResponseValue;
3223         }
3224         // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
3225         export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
3226                 if(!isWasmInitialized) {
3227                         throw new Error("initializeWasm() must be awaited first!");
3228                 }
3229                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
3230                 // debug statements here
3231         }
3232         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
3233         export function COption_C2Tuple_usizeTransactionZZ_clone(orig: number): number {
3234                 if(!isWasmInitialized) {
3235                         throw new Error("initializeWasm() must be awaited first!");
3236                 }
3237                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_clone(orig);
3238                 return nativeResponseValue;
3239         }
3240         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o);
3241         export function COption_NetworkUpdateZ_some(o: number): number {
3242                 if(!isWasmInitialized) {
3243                         throw new Error("initializeWasm() must be awaited first!");
3244                 }
3245                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_some(o);
3246                 return nativeResponseValue;
3247         }
3248         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void);
3249         export function COption_NetworkUpdateZ_none(): number {
3250                 if(!isWasmInitialized) {
3251                         throw new Error("initializeWasm() must be awaited first!");
3252                 }
3253                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_none();
3254                 return nativeResponseValue;
3255         }
3256         // void COption_NetworkUpdateZ_free(struct LDKCOption_NetworkUpdateZ _res);
3257         export function COption_NetworkUpdateZ_free(_res: number): void {
3258                 if(!isWasmInitialized) {
3259                         throw new Error("initializeWasm() must be awaited first!");
3260                 }
3261                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_free(_res);
3262                 // debug statements here
3263         }
3264         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_clone(const struct LDKCOption_NetworkUpdateZ *NONNULL_PTR orig);
3265         export function COption_NetworkUpdateZ_clone(orig: number): number {
3266                 if(!isWasmInitialized) {
3267                         throw new Error("initializeWasm() must be awaited first!");
3268                 }
3269                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_clone(orig);
3270                 return nativeResponseValue;
3271         }
3272         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
3273         export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
3274                 if(!isWasmInitialized) {
3275                         throw new Error("initializeWasm() must be awaited first!");
3276                 }
3277                 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
3278                 // debug statements here
3279         }
3280         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
3281         export function CVec_MessageSendEventZ_free(_res: number[]): void {
3282                 if(!isWasmInitialized) {
3283                         throw new Error("initializeWasm() must be awaited first!");
3284                 }
3285                 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
3286                 // debug statements here
3287         }
3288         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
3289         export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
3290                 if(!isWasmInitialized) {
3291                         throw new Error("initializeWasm() must be awaited first!");
3292                 }
3293                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
3294                 return nativeResponseValue;
3295         }
3296         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3297         export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
3298                 if(!isWasmInitialized) {
3299                         throw new Error("initializeWasm() must be awaited first!");
3300                 }
3301                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
3302                 return nativeResponseValue;
3303         }
3304         // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
3305         export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
3306                 if(!isWasmInitialized) {
3307                         throw new Error("initializeWasm() must be awaited first!");
3308                 }
3309                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
3310                 // debug statements here
3311         }
3312         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
3313         export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
3314                 if(!isWasmInitialized) {
3315                         throw new Error("initializeWasm() must be awaited first!");
3316                 }
3317                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
3318                 return nativeResponseValue;
3319         }
3320         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3321         export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
3322                 if(!isWasmInitialized) {
3323                         throw new Error("initializeWasm() must be awaited first!");
3324                 }
3325                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
3326                 return nativeResponseValue;
3327         }
3328         // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
3329         export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
3330                 if(!isWasmInitialized) {
3331                         throw new Error("initializeWasm() must be awaited first!");
3332                 }
3333                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
3334                 // debug statements here
3335         }
3336         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
3337         export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
3338                 if(!isWasmInitialized) {
3339                         throw new Error("initializeWasm() must be awaited first!");
3340                 }
3341                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
3342                 return nativeResponseValue;
3343         }
3344         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3345         export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
3346                 if(!isWasmInitialized) {
3347                         throw new Error("initializeWasm() must be awaited first!");
3348                 }
3349                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
3350                 return nativeResponseValue;
3351         }
3352         // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
3353         export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
3354                 if(!isWasmInitialized) {
3355                         throw new Error("initializeWasm() must be awaited first!");
3356                 }
3357                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
3358                 // debug statements here
3359         }
3360         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
3361         export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
3362                 if(!isWasmInitialized) {
3363                         throw new Error("initializeWasm() must be awaited first!");
3364                 }
3365                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
3366                 return nativeResponseValue;
3367         }
3368         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3369         export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
3370                 if(!isWasmInitialized) {
3371                         throw new Error("initializeWasm() must be awaited first!");
3372                 }
3373                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
3374                 return nativeResponseValue;
3375         }
3376         // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
3377         export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
3378                 if(!isWasmInitialized) {
3379                         throw new Error("initializeWasm() must be awaited first!");
3380                 }
3381                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
3382                 // debug statements here
3383         }
3384         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
3385         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
3386                 if(!isWasmInitialized) {
3387                         throw new Error("initializeWasm() must be awaited first!");
3388                 }
3389                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
3390                 return nativeResponseValue;
3391         }
3392         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3393         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
3394                 if(!isWasmInitialized) {
3395                         throw new Error("initializeWasm() must be awaited first!");
3396                 }
3397                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
3398                 return nativeResponseValue;
3399         }
3400         // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
3401         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
3402                 if(!isWasmInitialized) {
3403                         throw new Error("initializeWasm() must be awaited first!");
3404                 }
3405                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
3406                 // debug statements here
3407         }
3408         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3409         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3410                 if(!isWasmInitialized) {
3411                         throw new Error("initializeWasm() must be awaited first!");
3412                 }
3413                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
3414                 return nativeResponseValue;
3415         }
3416         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
3417         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
3418                 if(!isWasmInitialized) {
3419                         throw new Error("initializeWasm() must be awaited first!");
3420                 }
3421                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
3422                 return nativeResponseValue;
3423         }
3424         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3425         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
3426                 if(!isWasmInitialized) {
3427                         throw new Error("initializeWasm() must be awaited first!");
3428                 }
3429                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
3430                 return nativeResponseValue;
3431         }
3432         // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
3433         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
3434                 if(!isWasmInitialized) {
3435                         throw new Error("initializeWasm() must be awaited first!");
3436                 }
3437                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
3438                 // debug statements here
3439         }
3440         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3441         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3442                 if(!isWasmInitialized) {
3443                         throw new Error("initializeWasm() must be awaited first!");
3444                 }
3445                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
3446                 return nativeResponseValue;
3447         }
3448         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
3449         export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
3450                 if(!isWasmInitialized) {
3451                         throw new Error("initializeWasm() must be awaited first!");
3452                 }
3453                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
3454                 return nativeResponseValue;
3455         }
3456         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3457         export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
3458                 if(!isWasmInitialized) {
3459                         throw new Error("initializeWasm() must be awaited first!");
3460                 }
3461                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
3462                 return nativeResponseValue;
3463         }
3464         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
3465         export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
3466                 if(!isWasmInitialized) {
3467                         throw new Error("initializeWasm() must be awaited first!");
3468                 }
3469                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
3470                 // debug statements here
3471         }
3472         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3473         export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3474                 if(!isWasmInitialized) {
3475                         throw new Error("initializeWasm() must be awaited first!");
3476                 }
3477                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
3478                 return nativeResponseValue;
3479         }
3480         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_ok(void);
3481         export function CResult_NoneNoneZ_ok(): number {
3482                 if(!isWasmInitialized) {
3483                         throw new Error("initializeWasm() must be awaited first!");
3484                 }
3485                 const nativeResponseValue = wasm.CResult_NoneNoneZ_ok();
3486                 return nativeResponseValue;
3487         }
3488         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_err(void);
3489         export function CResult_NoneNoneZ_err(): number {
3490                 if(!isWasmInitialized) {
3491                         throw new Error("initializeWasm() must be awaited first!");
3492                 }
3493                 const nativeResponseValue = wasm.CResult_NoneNoneZ_err();
3494                 return nativeResponseValue;
3495         }
3496         // void CResult_NoneNoneZ_free(struct LDKCResult_NoneNoneZ _res);
3497         export function CResult_NoneNoneZ_free(_res: number): void {
3498                 if(!isWasmInitialized) {
3499                         throw new Error("initializeWasm() must be awaited first!");
3500                 }
3501                 const nativeResponseValue = wasm.CResult_NoneNoneZ_free(_res);
3502                 // debug statements here
3503         }
3504         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_clone(const struct LDKCResult_NoneNoneZ *NONNULL_PTR orig);
3505         export function CResult_NoneNoneZ_clone(orig: number): number {
3506                 if(!isWasmInitialized) {
3507                         throw new Error("initializeWasm() must be awaited first!");
3508                 }
3509                 const nativeResponseValue = wasm.CResult_NoneNoneZ_clone(orig);
3510                 return nativeResponseValue;
3511         }
3512         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
3513         export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
3514                 if(!isWasmInitialized) {
3515                         throw new Error("initializeWasm() must be awaited first!");
3516                 }
3517                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
3518                 return nativeResponseValue;
3519         }
3520         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
3521         export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
3522                 if(!isWasmInitialized) {
3523                         throw new Error("initializeWasm() must be awaited first!");
3524                 }
3525                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
3526                 return nativeResponseValue;
3527         }
3528         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
3529         export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
3530                 if(!isWasmInitialized) {
3531                         throw new Error("initializeWasm() must be awaited first!");
3532                 }
3533                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
3534                 // debug statements here
3535         }
3536         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
3537         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
3538                 if(!isWasmInitialized) {
3539                         throw new Error("initializeWasm() must be awaited first!");
3540                 }
3541                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
3542                 return nativeResponseValue;
3543         }
3544         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
3545         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
3546                 if(!isWasmInitialized) {
3547                         throw new Error("initializeWasm() must be awaited first!");
3548                 }
3549                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
3550                 return nativeResponseValue;
3551         }
3552         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
3553         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
3554                 if(!isWasmInitialized) {
3555                         throw new Error("initializeWasm() must be awaited first!");
3556                 }
3557                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
3558                 // debug statements here
3559         }
3560         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
3561         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
3562                 if(!isWasmInitialized) {
3563                         throw new Error("initializeWasm() must be awaited first!");
3564                 }
3565                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
3566                 return nativeResponseValue;
3567         }
3568         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
3569         export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
3570                 if(!isWasmInitialized) {
3571                         throw new Error("initializeWasm() must be awaited first!");
3572                 }
3573                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
3574                 return nativeResponseValue;
3575         }
3576         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
3577         export function CResult_SignatureNoneZ_err(): number {
3578                 if(!isWasmInitialized) {
3579                         throw new Error("initializeWasm() must be awaited first!");
3580                 }
3581                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
3582                 return nativeResponseValue;
3583         }
3584         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
3585         export function CResult_SignatureNoneZ_free(_res: number): void {
3586                 if(!isWasmInitialized) {
3587                         throw new Error("initializeWasm() must be awaited first!");
3588                 }
3589                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
3590                 // debug statements here
3591         }
3592         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
3593         export function CResult_SignatureNoneZ_clone(orig: number): number {
3594                 if(!isWasmInitialized) {
3595                         throw new Error("initializeWasm() must be awaited first!");
3596                 }
3597                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
3598                 return nativeResponseValue;
3599         }
3600         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
3601         export function CResult_SignDecodeErrorZ_ok(o: number): number {
3602                 if(!isWasmInitialized) {
3603                         throw new Error("initializeWasm() must be awaited first!");
3604                 }
3605                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
3606                 return nativeResponseValue;
3607         }
3608         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
3609         export function CResult_SignDecodeErrorZ_err(e: number): number {
3610                 if(!isWasmInitialized) {
3611                         throw new Error("initializeWasm() must be awaited first!");
3612                 }
3613                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
3614                 return nativeResponseValue;
3615         }
3616         // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
3617         export function CResult_SignDecodeErrorZ_free(_res: number): void {
3618                 if(!isWasmInitialized) {
3619                         throw new Error("initializeWasm() must be awaited first!");
3620                 }
3621                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
3622                 // debug statements here
3623         }
3624         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
3625         export function CResult_SignDecodeErrorZ_clone(orig: number): number {
3626                 if(!isWasmInitialized) {
3627                         throw new Error("initializeWasm() must be awaited first!");
3628                 }
3629                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
3630                 return nativeResponseValue;
3631         }
3632         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
3633         export function CVec_u8Z_free(_res: Uint8Array): void {
3634                 if(!isWasmInitialized) {
3635                         throw new Error("initializeWasm() must be awaited first!");
3636                 }
3637                 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
3638                 // debug statements here
3639         }
3640         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
3641         export function CResult_RecoverableSignatureNoneZ_ok(arg: Uint8Array): number {
3642                 if(!isWasmInitialized) {
3643                         throw new Error("initializeWasm() must be awaited first!");
3644                 }
3645                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_ok(encodeArray(arg));
3646                 return nativeResponseValue;
3647         }
3648         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
3649         export function CResult_RecoverableSignatureNoneZ_err(): number {
3650                 if(!isWasmInitialized) {
3651                         throw new Error("initializeWasm() must be awaited first!");
3652                 }
3653                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_err();
3654                 return nativeResponseValue;
3655         }
3656         // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
3657         export function CResult_RecoverableSignatureNoneZ_free(_res: number): void {
3658                 if(!isWasmInitialized) {
3659                         throw new Error("initializeWasm() must be awaited first!");
3660                 }
3661                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_free(_res);
3662                 // debug statements here
3663         }
3664         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
3665         export function CResult_RecoverableSignatureNoneZ_clone(orig: number): number {
3666                 if(!isWasmInitialized) {
3667                         throw new Error("initializeWasm() must be awaited first!");
3668                 }
3669                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_clone(orig);
3670                 return nativeResponseValue;
3671         }
3672         // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
3673         export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
3674                 if(!isWasmInitialized) {
3675                         throw new Error("initializeWasm() must be awaited first!");
3676                 }
3677                 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
3678                 // debug statements here
3679         }
3680         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
3681         export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
3682                 if(!isWasmInitialized) {
3683                         throw new Error("initializeWasm() must be awaited first!");
3684                 }
3685                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
3686                 return nativeResponseValue;
3687         }
3688         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
3689         export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
3690                 if(!isWasmInitialized) {
3691                         throw new Error("initializeWasm() must be awaited first!");
3692                 }
3693                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
3694                 return nativeResponseValue;
3695         }
3696         // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
3697         export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
3698                 if(!isWasmInitialized) {
3699                         throw new Error("initializeWasm() must be awaited first!");
3700                 }
3701                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
3702                 // debug statements here
3703         }
3704         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
3705         export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
3706                 if(!isWasmInitialized) {
3707                         throw new Error("initializeWasm() must be awaited first!");
3708                 }
3709                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
3710                 return nativeResponseValue;
3711         }
3712         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
3713         export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
3714                 if(!isWasmInitialized) {
3715                         throw new Error("initializeWasm() must be awaited first!");
3716                 }
3717                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
3718                 return nativeResponseValue;
3719         }
3720         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
3721         export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
3722                 if(!isWasmInitialized) {
3723                         throw new Error("initializeWasm() must be awaited first!");
3724                 }
3725                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
3726                 return nativeResponseValue;
3727         }
3728         // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
3729         export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
3730                 if(!isWasmInitialized) {
3731                         throw new Error("initializeWasm() must be awaited first!");
3732                 }
3733                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
3734                 // debug statements here
3735         }
3736         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
3737         export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
3738                 if(!isWasmInitialized) {
3739                         throw new Error("initializeWasm() must be awaited first!");
3740                 }
3741                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
3742                 return nativeResponseValue;
3743         }
3744         // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
3745         export function CVec_TxOutZ_free(_res: number[]): void {
3746                 if(!isWasmInitialized) {
3747                         throw new Error("initializeWasm() must be awaited first!");
3748                 }
3749                 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
3750                 // debug statements here
3751         }
3752         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
3753         export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
3754                 if(!isWasmInitialized) {
3755                         throw new Error("initializeWasm() must be awaited first!");
3756                 }
3757                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
3758                 return nativeResponseValue;
3759         }
3760         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
3761         export function CResult_TransactionNoneZ_err(): number {
3762                 if(!isWasmInitialized) {
3763                         throw new Error("initializeWasm() must be awaited first!");
3764                 }
3765                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
3766                 return nativeResponseValue;
3767         }
3768         // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
3769         export function CResult_TransactionNoneZ_free(_res: number): void {
3770                 if(!isWasmInitialized) {
3771                         throw new Error("initializeWasm() must be awaited first!");
3772                 }
3773                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
3774                 // debug statements here
3775         }
3776         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
3777         export function CResult_TransactionNoneZ_clone(orig: number): number {
3778                 if(!isWasmInitialized) {
3779                         throw new Error("initializeWasm() must be awaited first!");
3780                 }
3781                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_clone(orig);
3782                 return nativeResponseValue;
3783         }
3784         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_clone(const struct LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR orig);
3785         export function C2Tuple_BlockHashChannelMonitorZ_clone(orig: number): number {
3786                 if(!isWasmInitialized) {
3787                         throw new Error("initializeWasm() must be awaited first!");
3788                 }
3789                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_clone(orig);
3790                 return nativeResponseValue;
3791         }
3792         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
3793         export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
3794                 if(!isWasmInitialized) {
3795                         throw new Error("initializeWasm() must be awaited first!");
3796                 }
3797                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
3798                 return nativeResponseValue;
3799         }
3800         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
3801         export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
3802                 if(!isWasmInitialized) {
3803                         throw new Error("initializeWasm() must be awaited first!");
3804                 }
3805                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
3806                 // debug statements here
3807         }
3808         // void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res);
3809         export function CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res: number[]): void {
3810                 if(!isWasmInitialized) {
3811                         throw new Error("initializeWasm() must be awaited first!");
3812                 }
3813                 const nativeResponseValue = wasm.CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res);
3814                 // debug statements here
3815         }
3816         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o);
3817         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o: number[]): number {
3818                 if(!isWasmInitialized) {
3819                         throw new Error("initializeWasm() must be awaited first!");
3820                 }
3821                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o);
3822                 return nativeResponseValue;
3823         }
3824         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e);
3825         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e: IOError): number {
3826                 if(!isWasmInitialized) {
3827                         throw new Error("initializeWasm() must be awaited first!");
3828                 }
3829                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e);
3830                 return nativeResponseValue;
3831         }
3832         // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
3833         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res: number): void {
3834                 if(!isWasmInitialized) {
3835                         throw new Error("initializeWasm() must be awaited first!");
3836                 }
3837                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res);
3838                 // debug statements here
3839         }
3840         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(const struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR orig);
3841         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig: number): number {
3842                 if(!isWasmInitialized) {
3843                         throw new Error("initializeWasm() must be awaited first!");
3844                 }
3845                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig);
3846                 return nativeResponseValue;
3847         }
3848         // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
3849         export function COption_u16Z_some(o: number): number {
3850                 if(!isWasmInitialized) {
3851                         throw new Error("initializeWasm() must be awaited first!");
3852                 }
3853                 const nativeResponseValue = wasm.COption_u16Z_some(o);
3854                 return nativeResponseValue;
3855         }
3856         // struct LDKCOption_u16Z COption_u16Z_none(void);
3857         export function COption_u16Z_none(): number {
3858                 if(!isWasmInitialized) {
3859                         throw new Error("initializeWasm() must be awaited first!");
3860                 }
3861                 const nativeResponseValue = wasm.COption_u16Z_none();
3862                 return nativeResponseValue;
3863         }
3864         // void COption_u16Z_free(struct LDKCOption_u16Z _res);
3865         export function COption_u16Z_free(_res: number): void {
3866                 if(!isWasmInitialized) {
3867                         throw new Error("initializeWasm() must be awaited first!");
3868                 }
3869                 const nativeResponseValue = wasm.COption_u16Z_free(_res);
3870                 // debug statements here
3871         }
3872         // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
3873         export function COption_u16Z_clone(orig: number): number {
3874                 if(!isWasmInitialized) {
3875                         throw new Error("initializeWasm() must be awaited first!");
3876                 }
3877                 const nativeResponseValue = wasm.COption_u16Z_clone(orig);
3878                 return nativeResponseValue;
3879         }
3880         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
3881         export function CResult_NoneAPIErrorZ_ok(): number {
3882                 if(!isWasmInitialized) {
3883                         throw new Error("initializeWasm() must be awaited first!");
3884                 }
3885                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
3886                 return nativeResponseValue;
3887         }
3888         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
3889         export function CResult_NoneAPIErrorZ_err(e: number): number {
3890                 if(!isWasmInitialized) {
3891                         throw new Error("initializeWasm() must be awaited first!");
3892                 }
3893                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
3894                 return nativeResponseValue;
3895         }
3896         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
3897         export function CResult_NoneAPIErrorZ_free(_res: number): void {
3898                 if(!isWasmInitialized) {
3899                         throw new Error("initializeWasm() must be awaited first!");
3900                 }
3901                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
3902                 // debug statements here
3903         }
3904         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
3905         export function CResult_NoneAPIErrorZ_clone(orig: number): number {
3906                 if(!isWasmInitialized) {
3907                         throw new Error("initializeWasm() must be awaited first!");
3908                 }
3909                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
3910                 return nativeResponseValue;
3911         }
3912         // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
3913         export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
3914                 if(!isWasmInitialized) {
3915                         throw new Error("initializeWasm() must be awaited first!");
3916                 }
3917                 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
3918                 // debug statements here
3919         }
3920         // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
3921         export function CVec_APIErrorZ_free(_res: number[]): void {
3922                 if(!isWasmInitialized) {
3923                         throw new Error("initializeWasm() must be awaited first!");
3924                 }
3925                 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
3926                 // debug statements here
3927         }
3928         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
3929         export function CResult_NonePaymentSendFailureZ_ok(): number {
3930                 if(!isWasmInitialized) {
3931                         throw new Error("initializeWasm() must be awaited first!");
3932                 }
3933                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
3934                 return nativeResponseValue;
3935         }
3936         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
3937         export function CResult_NonePaymentSendFailureZ_err(e: number): number {
3938                 if(!isWasmInitialized) {
3939                         throw new Error("initializeWasm() must be awaited first!");
3940                 }
3941                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
3942                 return nativeResponseValue;
3943         }
3944         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
3945         export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
3946                 if(!isWasmInitialized) {
3947                         throw new Error("initializeWasm() must be awaited first!");
3948                 }
3949                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
3950                 // debug statements here
3951         }
3952         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
3953         export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
3954                 if(!isWasmInitialized) {
3955                         throw new Error("initializeWasm() must be awaited first!");
3956                 }
3957                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
3958                 return nativeResponseValue;
3959         }
3960         // struct LDKCResult_PaymentHashPaymentSendFailureZ CResult_PaymentHashPaymentSendFailureZ_ok(struct LDKThirtyTwoBytes o);
3961         export function CResult_PaymentHashPaymentSendFailureZ_ok(o: Uint8Array): number {
3962                 if(!isWasmInitialized) {
3963                         throw new Error("initializeWasm() must be awaited first!");
3964                 }
3965                 const nativeResponseValue = wasm.CResult_PaymentHashPaymentSendFailureZ_ok(encodeArray(o));
3966                 return nativeResponseValue;
3967         }
3968         // struct LDKCResult_PaymentHashPaymentSendFailureZ CResult_PaymentHashPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
3969         export function CResult_PaymentHashPaymentSendFailureZ_err(e: number): number {
3970                 if(!isWasmInitialized) {
3971                         throw new Error("initializeWasm() must be awaited first!");
3972                 }
3973                 const nativeResponseValue = wasm.CResult_PaymentHashPaymentSendFailureZ_err(e);
3974                 return nativeResponseValue;
3975         }
3976         // void CResult_PaymentHashPaymentSendFailureZ_free(struct LDKCResult_PaymentHashPaymentSendFailureZ _res);
3977         export function CResult_PaymentHashPaymentSendFailureZ_free(_res: number): void {
3978                 if(!isWasmInitialized) {
3979                         throw new Error("initializeWasm() must be awaited first!");
3980                 }
3981                 const nativeResponseValue = wasm.CResult_PaymentHashPaymentSendFailureZ_free(_res);
3982                 // debug statements here
3983         }
3984         // struct LDKCResult_PaymentHashPaymentSendFailureZ CResult_PaymentHashPaymentSendFailureZ_clone(const struct LDKCResult_PaymentHashPaymentSendFailureZ *NONNULL_PTR orig);
3985         export function CResult_PaymentHashPaymentSendFailureZ_clone(orig: number): number {
3986                 if(!isWasmInitialized) {
3987                         throw new Error("initializeWasm() must be awaited first!");
3988                 }
3989                 const nativeResponseValue = wasm.CResult_PaymentHashPaymentSendFailureZ_clone(orig);
3990                 return nativeResponseValue;
3991         }
3992         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
3993         export function CVec_NetAddressZ_free(_res: number[]): void {
3994                 if(!isWasmInitialized) {
3995                         throw new Error("initializeWasm() must be awaited first!");
3996                 }
3997                 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
3998                 // debug statements here
3999         }
4000         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
4001         export function C2Tuple_PaymentHashPaymentSecretZ_clone(orig: number): number {
4002                 if(!isWasmInitialized) {
4003                         throw new Error("initializeWasm() must be awaited first!");
4004                 }
4005                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_clone(orig);
4006                 return nativeResponseValue;
4007         }
4008         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
4009         export function C2Tuple_PaymentHashPaymentSecretZ_new(a: Uint8Array, b: Uint8Array): number {
4010                 if(!isWasmInitialized) {
4011                         throw new Error("initializeWasm() must be awaited first!");
4012                 }
4013                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_new(encodeArray(a), encodeArray(b));
4014                 return nativeResponseValue;
4015         }
4016         // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
4017         export function C2Tuple_PaymentHashPaymentSecretZ_free(_res: number): void {
4018                 if(!isWasmInitialized) {
4019                         throw new Error("initializeWasm() must be awaited first!");
4020                 }
4021                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_free(_res);
4022                 // debug statements here
4023         }
4024         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
4025         export function CResult_PaymentSecretAPIErrorZ_ok(o: Uint8Array): number {
4026                 if(!isWasmInitialized) {
4027                         throw new Error("initializeWasm() must be awaited first!");
4028                 }
4029                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_ok(encodeArray(o));
4030                 return nativeResponseValue;
4031         }
4032         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
4033         export function CResult_PaymentSecretAPIErrorZ_err(e: number): number {
4034                 if(!isWasmInitialized) {
4035                         throw new Error("initializeWasm() must be awaited first!");
4036                 }
4037                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_err(e);
4038                 return nativeResponseValue;
4039         }
4040         // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
4041         export function CResult_PaymentSecretAPIErrorZ_free(_res: number): void {
4042                 if(!isWasmInitialized) {
4043                         throw new Error("initializeWasm() must be awaited first!");
4044                 }
4045                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_free(_res);
4046                 // debug statements here
4047         }
4048         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
4049         export function CResult_PaymentSecretAPIErrorZ_clone(orig: number): number {
4050                 if(!isWasmInitialized) {
4051                         throw new Error("initializeWasm() must be awaited first!");
4052                 }
4053                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_clone(orig);
4054                 return nativeResponseValue;
4055         }
4056         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
4057         export function CVec_ChannelMonitorZ_free(_res: number[]): void {
4058                 if(!isWasmInitialized) {
4059                         throw new Error("initializeWasm() must be awaited first!");
4060                 }
4061                 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
4062                 // debug statements here
4063         }
4064         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
4065         export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
4066                 if(!isWasmInitialized) {
4067                         throw new Error("initializeWasm() must be awaited first!");
4068                 }
4069                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
4070                 return nativeResponseValue;
4071         }
4072         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
4073         export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
4074                 if(!isWasmInitialized) {
4075                         throw new Error("initializeWasm() must be awaited first!");
4076                 }
4077                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
4078                 // debug statements here
4079         }
4080         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
4081         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
4082                 if(!isWasmInitialized) {
4083                         throw new Error("initializeWasm() must be awaited first!");
4084                 }
4085                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
4086                 return nativeResponseValue;
4087         }
4088         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
4089         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
4090                 if(!isWasmInitialized) {
4091                         throw new Error("initializeWasm() must be awaited first!");
4092                 }
4093                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
4094                 return nativeResponseValue;
4095         }
4096         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
4097         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
4098                 if(!isWasmInitialized) {
4099                         throw new Error("initializeWasm() must be awaited first!");
4100                 }
4101                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
4102                 // debug statements here
4103         }
4104         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
4105         export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
4106                 if(!isWasmInitialized) {
4107                         throw new Error("initializeWasm() must be awaited first!");
4108                 }
4109                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
4110                 return nativeResponseValue;
4111         }
4112         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
4113         export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
4114                 if(!isWasmInitialized) {
4115                         throw new Error("initializeWasm() must be awaited first!");
4116                 }
4117                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
4118                 return nativeResponseValue;
4119         }
4120         // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
4121         export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
4122                 if(!isWasmInitialized) {
4123                         throw new Error("initializeWasm() must be awaited first!");
4124                 }
4125                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
4126                 // debug statements here
4127         }
4128         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
4129         export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
4130                 if(!isWasmInitialized) {
4131                         throw new Error("initializeWasm() must be awaited first!");
4132                 }
4133                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
4134                 return nativeResponseValue;
4135         }
4136         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
4137         export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
4138                 if(!isWasmInitialized) {
4139                         throw new Error("initializeWasm() must be awaited first!");
4140                 }
4141                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
4142                 return nativeResponseValue;
4143         }
4144         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
4145         export function CResult_OutPointDecodeErrorZ_err(e: number): number {
4146                 if(!isWasmInitialized) {
4147                         throw new Error("initializeWasm() must be awaited first!");
4148                 }
4149                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
4150                 return nativeResponseValue;
4151         }
4152         // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
4153         export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
4154                 if(!isWasmInitialized) {
4155                         throw new Error("initializeWasm() must be awaited first!");
4156                 }
4157                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
4158                 // debug statements here
4159         }
4160         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
4161         export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
4162                 if(!isWasmInitialized) {
4163                         throw new Error("initializeWasm() must be awaited first!");
4164                 }
4165                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
4166                 return nativeResponseValue;
4167         }
4168         // struct LDKCOption_TypeZ COption_TypeZ_some(struct LDKType o);
4169         export function COption_TypeZ_some(o: number): number {
4170                 if(!isWasmInitialized) {
4171                         throw new Error("initializeWasm() must be awaited first!");
4172                 }
4173                 const nativeResponseValue = wasm.COption_TypeZ_some(o);
4174                 return nativeResponseValue;
4175         }
4176         // struct LDKCOption_TypeZ COption_TypeZ_none(void);
4177         export function COption_TypeZ_none(): number {
4178                 if(!isWasmInitialized) {
4179                         throw new Error("initializeWasm() must be awaited first!");
4180                 }
4181                 const nativeResponseValue = wasm.COption_TypeZ_none();
4182                 return nativeResponseValue;
4183         }
4184         // void COption_TypeZ_free(struct LDKCOption_TypeZ _res);
4185         export function COption_TypeZ_free(_res: number): void {
4186                 if(!isWasmInitialized) {
4187                         throw new Error("initializeWasm() must be awaited first!");
4188                 }
4189                 const nativeResponseValue = wasm.COption_TypeZ_free(_res);
4190                 // debug statements here
4191         }
4192         // struct LDKCOption_TypeZ COption_TypeZ_clone(const struct LDKCOption_TypeZ *NONNULL_PTR orig);
4193         export function COption_TypeZ_clone(orig: number): number {
4194                 if(!isWasmInitialized) {
4195                         throw new Error("initializeWasm() must be awaited first!");
4196                 }
4197                 const nativeResponseValue = wasm.COption_TypeZ_clone(orig);
4198                 return nativeResponseValue;
4199         }
4200         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_ok(struct LDKCOption_TypeZ o);
4201         export function CResult_COption_TypeZDecodeErrorZ_ok(o: number): number {
4202                 if(!isWasmInitialized) {
4203                         throw new Error("initializeWasm() must be awaited first!");
4204                 }
4205                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_ok(o);
4206                 return nativeResponseValue;
4207         }
4208         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_err(struct LDKDecodeError e);
4209         export function CResult_COption_TypeZDecodeErrorZ_err(e: number): number {
4210                 if(!isWasmInitialized) {
4211                         throw new Error("initializeWasm() must be awaited first!");
4212                 }
4213                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_err(e);
4214                 return nativeResponseValue;
4215         }
4216         // void CResult_COption_TypeZDecodeErrorZ_free(struct LDKCResult_COption_TypeZDecodeErrorZ _res);
4217         export function CResult_COption_TypeZDecodeErrorZ_free(_res: number): void {
4218                 if(!isWasmInitialized) {
4219                         throw new Error("initializeWasm() must be awaited first!");
4220                 }
4221                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_free(_res);
4222                 // debug statements here
4223         }
4224         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_clone(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR orig);
4225         export function CResult_COption_TypeZDecodeErrorZ_clone(orig: number): number {
4226                 if(!isWasmInitialized) {
4227                         throw new Error("initializeWasm() must be awaited first!");
4228                 }
4229                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_clone(orig);
4230                 return nativeResponseValue;
4231         }
4232         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o);
4233         export function CResult_SiPrefixNoneZ_ok(o: SiPrefix): number {
4234                 if(!isWasmInitialized) {
4235                         throw new Error("initializeWasm() must be awaited first!");
4236                 }
4237                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_ok(o);
4238                 return nativeResponseValue;
4239         }
4240         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void);
4241         export function CResult_SiPrefixNoneZ_err(): number {
4242                 if(!isWasmInitialized) {
4243                         throw new Error("initializeWasm() must be awaited first!");
4244                 }
4245                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_err();
4246                 return nativeResponseValue;
4247         }
4248         // void CResult_SiPrefixNoneZ_free(struct LDKCResult_SiPrefixNoneZ _res);
4249         export function CResult_SiPrefixNoneZ_free(_res: number): void {
4250                 if(!isWasmInitialized) {
4251                         throw new Error("initializeWasm() must be awaited first!");
4252                 }
4253                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_free(_res);
4254                 // debug statements here
4255         }
4256         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_clone(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR orig);
4257         export function CResult_SiPrefixNoneZ_clone(orig: number): number {
4258                 if(!isWasmInitialized) {
4259                         throw new Error("initializeWasm() must be awaited first!");
4260                 }
4261                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_clone(orig);
4262                 return nativeResponseValue;
4263         }
4264         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_ok(struct LDKInvoice o);
4265         export function CResult_InvoiceNoneZ_ok(o: number): number {
4266                 if(!isWasmInitialized) {
4267                         throw new Error("initializeWasm() must be awaited first!");
4268                 }
4269                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_ok(o);
4270                 return nativeResponseValue;
4271         }
4272         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_err(void);
4273         export function CResult_InvoiceNoneZ_err(): number {
4274                 if(!isWasmInitialized) {
4275                         throw new Error("initializeWasm() must be awaited first!");
4276                 }
4277                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_err();
4278                 return nativeResponseValue;
4279         }
4280         // void CResult_InvoiceNoneZ_free(struct LDKCResult_InvoiceNoneZ _res);
4281         export function CResult_InvoiceNoneZ_free(_res: number): void {
4282                 if(!isWasmInitialized) {
4283                         throw new Error("initializeWasm() must be awaited first!");
4284                 }
4285                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_free(_res);
4286                 // debug statements here
4287         }
4288         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_clone(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR orig);
4289         export function CResult_InvoiceNoneZ_clone(orig: number): number {
4290                 if(!isWasmInitialized) {
4291                         throw new Error("initializeWasm() must be awaited first!");
4292                 }
4293                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_clone(orig);
4294                 return nativeResponseValue;
4295         }
4296         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_ok(struct LDKSignedRawInvoice o);
4297         export function CResult_SignedRawInvoiceNoneZ_ok(o: number): number {
4298                 if(!isWasmInitialized) {
4299                         throw new Error("initializeWasm() must be awaited first!");
4300                 }
4301                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_ok(o);
4302                 return nativeResponseValue;
4303         }
4304         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_err(void);
4305         export function CResult_SignedRawInvoiceNoneZ_err(): number {
4306                 if(!isWasmInitialized) {
4307                         throw new Error("initializeWasm() must be awaited first!");
4308                 }
4309                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_err();
4310                 return nativeResponseValue;
4311         }
4312         // void CResult_SignedRawInvoiceNoneZ_free(struct LDKCResult_SignedRawInvoiceNoneZ _res);
4313         export function CResult_SignedRawInvoiceNoneZ_free(_res: number): void {
4314                 if(!isWasmInitialized) {
4315                         throw new Error("initializeWasm() must be awaited first!");
4316                 }
4317                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_free(_res);
4318                 // debug statements here
4319         }
4320         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_clone(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR orig);
4321         export function CResult_SignedRawInvoiceNoneZ_clone(orig: number): number {
4322                 if(!isWasmInitialized) {
4323                         throw new Error("initializeWasm() must be awaited first!");
4324                 }
4325                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_clone(orig);
4326                 return nativeResponseValue;
4327         }
4328         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(const struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR orig);
4329         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig: number): number {
4330                 if(!isWasmInitialized) {
4331                         throw new Error("initializeWasm() must be awaited first!");
4332                 }
4333                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig);
4334                 return nativeResponseValue;
4335         }
4336         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(struct LDKRawInvoice a, struct LDKThirtyTwoBytes b, struct LDKInvoiceSignature c);
4337         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a: number, b: Uint8Array, c: number): number {
4338                 if(!isWasmInitialized) {
4339                         throw new Error("initializeWasm() must be awaited first!");
4340                 }
4341                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a, encodeArray(b), c);
4342                 return nativeResponseValue;
4343         }
4344         // void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ _res);
4345         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res: number): void {
4346                 if(!isWasmInitialized) {
4347                         throw new Error("initializeWasm() must be awaited first!");
4348                 }
4349                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res);
4350                 // debug statements here
4351         }
4352         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o);
4353         export function CResult_PayeePubKeyErrorZ_ok(o: number): number {
4354                 if(!isWasmInitialized) {
4355                         throw new Error("initializeWasm() must be awaited first!");
4356                 }
4357                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_ok(o);
4358                 return nativeResponseValue;
4359         }
4360         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e);
4361         export function CResult_PayeePubKeyErrorZ_err(e: Secp256k1Error): number {
4362                 if(!isWasmInitialized) {
4363                         throw new Error("initializeWasm() must be awaited first!");
4364                 }
4365                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_err(e);
4366                 return nativeResponseValue;
4367         }
4368         // void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res);
4369         export function CResult_PayeePubKeyErrorZ_free(_res: number): void {
4370                 if(!isWasmInitialized) {
4371                         throw new Error("initializeWasm() must be awaited first!");
4372                 }
4373                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_free(_res);
4374                 // debug statements here
4375         }
4376         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_clone(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR orig);
4377         export function CResult_PayeePubKeyErrorZ_clone(orig: number): number {
4378                 if(!isWasmInitialized) {
4379                         throw new Error("initializeWasm() must be awaited first!");
4380                 }
4381                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_clone(orig);
4382                 return nativeResponseValue;
4383         }
4384         // void CVec_PrivateRouteZ_free(struct LDKCVec_PrivateRouteZ _res);
4385         export function CVec_PrivateRouteZ_free(_res: number[]): void {
4386                 if(!isWasmInitialized) {
4387                         throw new Error("initializeWasm() must be awaited first!");
4388                 }
4389                 const nativeResponseValue = wasm.CVec_PrivateRouteZ_free(_res);
4390                 // debug statements here
4391         }
4392         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_ok(struct LDKPositiveTimestamp o);
4393         export function CResult_PositiveTimestampCreationErrorZ_ok(o: number): number {
4394                 if(!isWasmInitialized) {
4395                         throw new Error("initializeWasm() must be awaited first!");
4396                 }
4397                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_ok(o);
4398                 return nativeResponseValue;
4399         }
4400         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_err(enum LDKCreationError e);
4401         export function CResult_PositiveTimestampCreationErrorZ_err(e: CreationError): number {
4402                 if(!isWasmInitialized) {
4403                         throw new Error("initializeWasm() must be awaited first!");
4404                 }
4405                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_err(e);
4406                 return nativeResponseValue;
4407         }
4408         // void CResult_PositiveTimestampCreationErrorZ_free(struct LDKCResult_PositiveTimestampCreationErrorZ _res);
4409         export function CResult_PositiveTimestampCreationErrorZ_free(_res: number): void {
4410                 if(!isWasmInitialized) {
4411                         throw new Error("initializeWasm() must be awaited first!");
4412                 }
4413                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_free(_res);
4414                 // debug statements here
4415         }
4416         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_clone(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR orig);
4417         export function CResult_PositiveTimestampCreationErrorZ_clone(orig: number): number {
4418                 if(!isWasmInitialized) {
4419                         throw new Error("initializeWasm() must be awaited first!");
4420                 }
4421                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_clone(orig);
4422                 return nativeResponseValue;
4423         }
4424         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_ok(void);
4425         export function CResult_NoneSemanticErrorZ_ok(): number {
4426                 if(!isWasmInitialized) {
4427                         throw new Error("initializeWasm() must be awaited first!");
4428                 }
4429                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_ok();
4430                 return nativeResponseValue;
4431         }
4432         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_err(enum LDKSemanticError e);
4433         export function CResult_NoneSemanticErrorZ_err(e: SemanticError): number {
4434                 if(!isWasmInitialized) {
4435                         throw new Error("initializeWasm() must be awaited first!");
4436                 }
4437                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_err(e);
4438                 return nativeResponseValue;
4439         }
4440         // void CResult_NoneSemanticErrorZ_free(struct LDKCResult_NoneSemanticErrorZ _res);
4441         export function CResult_NoneSemanticErrorZ_free(_res: number): void {
4442                 if(!isWasmInitialized) {
4443                         throw new Error("initializeWasm() must be awaited first!");
4444                 }
4445                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_free(_res);
4446                 // debug statements here
4447         }
4448         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_clone(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR orig);
4449         export function CResult_NoneSemanticErrorZ_clone(orig: number): number {
4450                 if(!isWasmInitialized) {
4451                         throw new Error("initializeWasm() must be awaited first!");
4452                 }
4453                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_clone(orig);
4454                 return nativeResponseValue;
4455         }
4456         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_ok(struct LDKInvoice o);
4457         export function CResult_InvoiceSemanticErrorZ_ok(o: number): number {
4458                 if(!isWasmInitialized) {
4459                         throw new Error("initializeWasm() must be awaited first!");
4460                 }
4461                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_ok(o);
4462                 return nativeResponseValue;
4463         }
4464         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_err(enum LDKSemanticError e);
4465         export function CResult_InvoiceSemanticErrorZ_err(e: SemanticError): number {
4466                 if(!isWasmInitialized) {
4467                         throw new Error("initializeWasm() must be awaited first!");
4468                 }
4469                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_err(e);
4470                 return nativeResponseValue;
4471         }
4472         // void CResult_InvoiceSemanticErrorZ_free(struct LDKCResult_InvoiceSemanticErrorZ _res);
4473         export function CResult_InvoiceSemanticErrorZ_free(_res: number): void {
4474                 if(!isWasmInitialized) {
4475                         throw new Error("initializeWasm() must be awaited first!");
4476                 }
4477                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_free(_res);
4478                 // debug statements here
4479         }
4480         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_clone(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR orig);
4481         export function CResult_InvoiceSemanticErrorZ_clone(orig: number): number {
4482                 if(!isWasmInitialized) {
4483                         throw new Error("initializeWasm() must be awaited first!");
4484                 }
4485                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_clone(orig);
4486                 return nativeResponseValue;
4487         }
4488         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_ok(struct LDKDescription o);
4489         export function CResult_DescriptionCreationErrorZ_ok(o: number): number {
4490                 if(!isWasmInitialized) {
4491                         throw new Error("initializeWasm() must be awaited first!");
4492                 }
4493                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_ok(o);
4494                 return nativeResponseValue;
4495         }
4496         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_err(enum LDKCreationError e);
4497         export function CResult_DescriptionCreationErrorZ_err(e: CreationError): number {
4498                 if(!isWasmInitialized) {
4499                         throw new Error("initializeWasm() must be awaited first!");
4500                 }
4501                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_err(e);
4502                 return nativeResponseValue;
4503         }
4504         // void CResult_DescriptionCreationErrorZ_free(struct LDKCResult_DescriptionCreationErrorZ _res);
4505         export function CResult_DescriptionCreationErrorZ_free(_res: number): void {
4506                 if(!isWasmInitialized) {
4507                         throw new Error("initializeWasm() must be awaited first!");
4508                 }
4509                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_free(_res);
4510                 // debug statements here
4511         }
4512         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_clone(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR orig);
4513         export function CResult_DescriptionCreationErrorZ_clone(orig: number): number {
4514                 if(!isWasmInitialized) {
4515                         throw new Error("initializeWasm() must be awaited first!");
4516                 }
4517                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_clone(orig);
4518                 return nativeResponseValue;
4519         }
4520         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_ok(struct LDKExpiryTime o);
4521         export function CResult_ExpiryTimeCreationErrorZ_ok(o: number): number {
4522                 if(!isWasmInitialized) {
4523                         throw new Error("initializeWasm() must be awaited first!");
4524                 }
4525                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_ok(o);
4526                 return nativeResponseValue;
4527         }
4528         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_err(enum LDKCreationError e);
4529         export function CResult_ExpiryTimeCreationErrorZ_err(e: CreationError): number {
4530                 if(!isWasmInitialized) {
4531                         throw new Error("initializeWasm() must be awaited first!");
4532                 }
4533                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_err(e);
4534                 return nativeResponseValue;
4535         }
4536         // void CResult_ExpiryTimeCreationErrorZ_free(struct LDKCResult_ExpiryTimeCreationErrorZ _res);
4537         export function CResult_ExpiryTimeCreationErrorZ_free(_res: number): void {
4538                 if(!isWasmInitialized) {
4539                         throw new Error("initializeWasm() must be awaited first!");
4540                 }
4541                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_free(_res);
4542                 // debug statements here
4543         }
4544         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_clone(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR orig);
4545         export function CResult_ExpiryTimeCreationErrorZ_clone(orig: number): number {
4546                 if(!isWasmInitialized) {
4547                         throw new Error("initializeWasm() must be awaited first!");
4548                 }
4549                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_clone(orig);
4550                 return nativeResponseValue;
4551         }
4552         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_ok(struct LDKPrivateRoute o);
4553         export function CResult_PrivateRouteCreationErrorZ_ok(o: number): number {
4554                 if(!isWasmInitialized) {
4555                         throw new Error("initializeWasm() must be awaited first!");
4556                 }
4557                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_ok(o);
4558                 return nativeResponseValue;
4559         }
4560         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_err(enum LDKCreationError e);
4561         export function CResult_PrivateRouteCreationErrorZ_err(e: CreationError): number {
4562                 if(!isWasmInitialized) {
4563                         throw new Error("initializeWasm() must be awaited first!");
4564                 }
4565                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_err(e);
4566                 return nativeResponseValue;
4567         }
4568         // void CResult_PrivateRouteCreationErrorZ_free(struct LDKCResult_PrivateRouteCreationErrorZ _res);
4569         export function CResult_PrivateRouteCreationErrorZ_free(_res: number): void {
4570                 if(!isWasmInitialized) {
4571                         throw new Error("initializeWasm() must be awaited first!");
4572                 }
4573                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_free(_res);
4574                 // debug statements here
4575         }
4576         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_clone(const struct LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR orig);
4577         export function CResult_PrivateRouteCreationErrorZ_clone(orig: number): number {
4578                 if(!isWasmInitialized) {
4579                         throw new Error("initializeWasm() must be awaited first!");
4580                 }
4581                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_clone(orig);
4582                 return nativeResponseValue;
4583         }
4584         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
4585         export function CResult_StringErrorZ_ok(o: String): number {
4586                 if(!isWasmInitialized) {
4587                         throw new Error("initializeWasm() must be awaited first!");
4588                 }
4589                 const nativeResponseValue = wasm.CResult_StringErrorZ_ok(o);
4590                 return nativeResponseValue;
4591         }
4592         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
4593         export function CResult_StringErrorZ_err(e: Secp256k1Error): number {
4594                 if(!isWasmInitialized) {
4595                         throw new Error("initializeWasm() must be awaited first!");
4596                 }
4597                 const nativeResponseValue = wasm.CResult_StringErrorZ_err(e);
4598                 return nativeResponseValue;
4599         }
4600         // void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
4601         export function CResult_StringErrorZ_free(_res: number): void {
4602                 if(!isWasmInitialized) {
4603                         throw new Error("initializeWasm() must be awaited first!");
4604                 }
4605                 const nativeResponseValue = wasm.CResult_StringErrorZ_free(_res);
4606                 // debug statements here
4607         }
4608         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
4609         export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
4610                 if(!isWasmInitialized) {
4611                         throw new Error("initializeWasm() must be awaited first!");
4612                 }
4613                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
4614                 return nativeResponseValue;
4615         }
4616         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4617         export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
4618                 if(!isWasmInitialized) {
4619                         throw new Error("initializeWasm() must be awaited first!");
4620                 }
4621                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
4622                 return nativeResponseValue;
4623         }
4624         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
4625         export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
4626                 if(!isWasmInitialized) {
4627                         throw new Error("initializeWasm() must be awaited first!");
4628                 }
4629                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
4630                 // debug statements here
4631         }
4632         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
4633         export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
4634                 if(!isWasmInitialized) {
4635                         throw new Error("initializeWasm() must be awaited first!");
4636                 }
4637                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
4638                 return nativeResponseValue;
4639         }
4640         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
4641         export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
4642                 if(!isWasmInitialized) {
4643                         throw new Error("initializeWasm() must be awaited first!");
4644                 }
4645                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
4646                 return nativeResponseValue;
4647         }
4648         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4649         export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
4650                 if(!isWasmInitialized) {
4651                         throw new Error("initializeWasm() must be awaited first!");
4652                 }
4653                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
4654                 return nativeResponseValue;
4655         }
4656         // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
4657         export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
4658                 if(!isWasmInitialized) {
4659                         throw new Error("initializeWasm() must be awaited first!");
4660                 }
4661                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
4662                 // debug statements here
4663         }
4664         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
4665         export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
4666                 if(!isWasmInitialized) {
4667                         throw new Error("initializeWasm() must be awaited first!");
4668                 }
4669                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
4670                 return nativeResponseValue;
4671         }
4672         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
4673         export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
4674                 if(!isWasmInitialized) {
4675                         throw new Error("initializeWasm() must be awaited first!");
4676                 }
4677                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
4678                 return nativeResponseValue;
4679         }
4680         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
4681         export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
4682                 if(!isWasmInitialized) {
4683                         throw new Error("initializeWasm() must be awaited first!");
4684                 }
4685                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
4686                 return nativeResponseValue;
4687         }
4688         // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
4689         export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
4690                 if(!isWasmInitialized) {
4691                         throw new Error("initializeWasm() must be awaited first!");
4692                 }
4693                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
4694                 // debug statements here
4695         }
4696         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
4697         export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
4698                 if(!isWasmInitialized) {
4699                         throw new Error("initializeWasm() must be awaited first!");
4700                 }
4701                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
4702                 return nativeResponseValue;
4703         }
4704         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
4705         export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
4706                 if(!isWasmInitialized) {
4707                         throw new Error("initializeWasm() must be awaited first!");
4708                 }
4709                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
4710                 return nativeResponseValue;
4711         }
4712         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
4713         export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
4714                 if(!isWasmInitialized) {
4715                         throw new Error("initializeWasm() must be awaited first!");
4716                 }
4717                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
4718                 return nativeResponseValue;
4719         }
4720         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
4721         export function C2Tuple_OutPointScriptZ_free(_res: number): void {
4722                 if(!isWasmInitialized) {
4723                         throw new Error("initializeWasm() must be awaited first!");
4724                 }
4725                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
4726                 // debug statements here
4727         }
4728         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
4729         export function C2Tuple_u32ScriptZ_clone(orig: number): number {
4730                 if(!isWasmInitialized) {
4731                         throw new Error("initializeWasm() must be awaited first!");
4732                 }
4733                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone(orig);
4734                 return nativeResponseValue;
4735         }
4736         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
4737         export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
4738                 if(!isWasmInitialized) {
4739                         throw new Error("initializeWasm() must be awaited first!");
4740                 }
4741                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
4742                 return nativeResponseValue;
4743         }
4744         // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
4745         export function C2Tuple_u32ScriptZ_free(_res: number): void {
4746                 if(!isWasmInitialized) {
4747                         throw new Error("initializeWasm() must be awaited first!");
4748                 }
4749                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
4750                 // debug statements here
4751         }
4752         // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
4753         export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
4754                 if(!isWasmInitialized) {
4755                         throw new Error("initializeWasm() must be awaited first!");
4756                 }
4757                 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
4758                 // debug statements here
4759         }
4760         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR orig);
4761         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig: number): number {
4762                 if(!isWasmInitialized) {
4763                         throw new Error("initializeWasm() must be awaited first!");
4764                 }
4765                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig);
4766                 return nativeResponseValue;
4767         }
4768         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
4769         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
4770                 if(!isWasmInitialized) {
4771                         throw new Error("initializeWasm() must be awaited first!");
4772                 }
4773                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
4774                 return nativeResponseValue;
4775         }
4776         // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
4777         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
4778                 if(!isWasmInitialized) {
4779                         throw new Error("initializeWasm() must be awaited first!");
4780                 }
4781                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
4782                 // debug statements here
4783         }
4784         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
4785         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
4786                 if(!isWasmInitialized) {
4787                         throw new Error("initializeWasm() must be awaited first!");
4788                 }
4789                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
4790                 // debug statements here
4791         }
4792         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
4793         export function CVec_EventZ_free(_res: number[]): void {
4794                 if(!isWasmInitialized) {
4795                         throw new Error("initializeWasm() must be awaited first!");
4796                 }
4797                 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
4798                 // debug statements here
4799         }
4800         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
4801         export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
4802                 if(!isWasmInitialized) {
4803                         throw new Error("initializeWasm() must be awaited first!");
4804                 }
4805                 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
4806                 // debug statements here
4807         }
4808         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
4809         export function C2Tuple_u32TxOutZ_clone(orig: number): number {
4810                 if(!isWasmInitialized) {
4811                         throw new Error("initializeWasm() must be awaited first!");
4812                 }
4813                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
4814                 return nativeResponseValue;
4815         }
4816         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
4817         export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
4818                 if(!isWasmInitialized) {
4819                         throw new Error("initializeWasm() must be awaited first!");
4820                 }
4821                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
4822                 return nativeResponseValue;
4823         }
4824         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
4825         export function C2Tuple_u32TxOutZ_free(_res: number): void {
4826                 if(!isWasmInitialized) {
4827                         throw new Error("initializeWasm() must be awaited first!");
4828                 }
4829                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
4830                 // debug statements here
4831         }
4832         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
4833         export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
4834                 if(!isWasmInitialized) {
4835                         throw new Error("initializeWasm() must be awaited first!");
4836                 }
4837                 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
4838                 // debug statements here
4839         }
4840         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
4841         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig: number): number {
4842                 if(!isWasmInitialized) {
4843                         throw new Error("initializeWasm() must be awaited first!");
4844                 }
4845                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig);
4846                 return nativeResponseValue;
4847         }
4848         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
4849         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
4850                 if(!isWasmInitialized) {
4851                         throw new Error("initializeWasm() must be awaited first!");
4852                 }
4853                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
4854                 return nativeResponseValue;
4855         }
4856         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
4857         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
4858                 if(!isWasmInitialized) {
4859                         throw new Error("initializeWasm() must be awaited first!");
4860                 }
4861                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
4862                 // debug statements here
4863         }
4864         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
4865         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
4866                 if(!isWasmInitialized) {
4867                         throw new Error("initializeWasm() must be awaited first!");
4868                 }
4869                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
4870                 // debug statements here
4871         }
4872         // void CVec_BalanceZ_free(struct LDKCVec_BalanceZ _res);
4873         export function CVec_BalanceZ_free(_res: number[]): void {
4874                 if(!isWasmInitialized) {
4875                         throw new Error("initializeWasm() must be awaited first!");
4876                 }
4877                 const nativeResponseValue = wasm.CVec_BalanceZ_free(_res);
4878                 // debug statements here
4879         }
4880         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
4881         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
4882                 if(!isWasmInitialized) {
4883                         throw new Error("initializeWasm() must be awaited first!");
4884                 }
4885                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
4886                 return nativeResponseValue;
4887         }
4888         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
4889         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
4890                 if(!isWasmInitialized) {
4891                         throw new Error("initializeWasm() must be awaited first!");
4892                 }
4893                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
4894                 return nativeResponseValue;
4895         }
4896         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
4897         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
4898                 if(!isWasmInitialized) {
4899                         throw new Error("initializeWasm() must be awaited first!");
4900                 }
4901                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
4902                 // debug statements here
4903         }
4904         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR orig);
4905         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig: number): number {
4906                 if(!isWasmInitialized) {
4907                         throw new Error("initializeWasm() must be awaited first!");
4908                 }
4909                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig);
4910                 return nativeResponseValue;
4911         }
4912         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
4913         export function CResult_NoneLightningErrorZ_ok(): number {
4914                 if(!isWasmInitialized) {
4915                         throw new Error("initializeWasm() must be awaited first!");
4916                 }
4917                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
4918                 return nativeResponseValue;
4919         }
4920         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
4921         export function CResult_NoneLightningErrorZ_err(e: number): number {
4922                 if(!isWasmInitialized) {
4923                         throw new Error("initializeWasm() must be awaited first!");
4924                 }
4925                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
4926                 return nativeResponseValue;
4927         }
4928         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
4929         export function CResult_NoneLightningErrorZ_free(_res: number): void {
4930                 if(!isWasmInitialized) {
4931                         throw new Error("initializeWasm() must be awaited first!");
4932                 }
4933                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
4934                 // debug statements here
4935         }
4936         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
4937         export function CResult_NoneLightningErrorZ_clone(orig: number): number {
4938                 if(!isWasmInitialized) {
4939                         throw new Error("initializeWasm() must be awaited first!");
4940                 }
4941                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
4942                 return nativeResponseValue;
4943         }
4944         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_clone(const struct LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR orig);
4945         export function C2Tuple_PublicKeyTypeZ_clone(orig: number): number {
4946                 if(!isWasmInitialized) {
4947                         throw new Error("initializeWasm() must be awaited first!");
4948                 }
4949                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_clone(orig);
4950                 return nativeResponseValue;
4951         }
4952         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_new(struct LDKPublicKey a, struct LDKType b);
4953         export function C2Tuple_PublicKeyTypeZ_new(a: Uint8Array, b: number): number {
4954                 if(!isWasmInitialized) {
4955                         throw new Error("initializeWasm() must be awaited first!");
4956                 }
4957                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_new(encodeArray(a), b);
4958                 return nativeResponseValue;
4959         }
4960         // void C2Tuple_PublicKeyTypeZ_free(struct LDKC2Tuple_PublicKeyTypeZ _res);
4961         export function C2Tuple_PublicKeyTypeZ_free(_res: number): void {
4962                 if(!isWasmInitialized) {
4963                         throw new Error("initializeWasm() must be awaited first!");
4964                 }
4965                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_free(_res);
4966                 // debug statements here
4967         }
4968         // void CVec_C2Tuple_PublicKeyTypeZZ_free(struct LDKCVec_C2Tuple_PublicKeyTypeZZ _res);
4969         export function CVec_C2Tuple_PublicKeyTypeZZ_free(_res: number[]): void {
4970                 if(!isWasmInitialized) {
4971                         throw new Error("initializeWasm() must be awaited first!");
4972                 }
4973                 const nativeResponseValue = wasm.CVec_C2Tuple_PublicKeyTypeZZ_free(_res);
4974                 // debug statements here
4975         }
4976         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
4977         export function CResult_boolLightningErrorZ_ok(o: boolean): number {
4978                 if(!isWasmInitialized) {
4979                         throw new Error("initializeWasm() must be awaited first!");
4980                 }
4981                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
4982                 return nativeResponseValue;
4983         }
4984         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
4985         export function CResult_boolLightningErrorZ_err(e: number): number {
4986                 if(!isWasmInitialized) {
4987                         throw new Error("initializeWasm() must be awaited first!");
4988                 }
4989                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
4990                 return nativeResponseValue;
4991         }
4992         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
4993         export function CResult_boolLightningErrorZ_free(_res: number): void {
4994                 if(!isWasmInitialized) {
4995                         throw new Error("initializeWasm() must be awaited first!");
4996                 }
4997                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
4998                 // debug statements here
4999         }
5000         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
5001         export function CResult_boolLightningErrorZ_clone(orig: number): number {
5002                 if(!isWasmInitialized) {
5003                         throw new Error("initializeWasm() must be awaited first!");
5004                 }
5005                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
5006                 return nativeResponseValue;
5007         }
5008         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
5009         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
5010                 if(!isWasmInitialized) {
5011                         throw new Error("initializeWasm() must be awaited first!");
5012                 }
5013                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
5014                 return nativeResponseValue;
5015         }
5016         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
5017         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
5018                 if(!isWasmInitialized) {
5019                         throw new Error("initializeWasm() must be awaited first!");
5020                 }
5021                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
5022                 return nativeResponseValue;
5023         }
5024         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
5025         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
5026                 if(!isWasmInitialized) {
5027                         throw new Error("initializeWasm() must be awaited first!");
5028                 }
5029                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
5030                 // debug statements here
5031         }
5032         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
5033         export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
5034                 if(!isWasmInitialized) {
5035                         throw new Error("initializeWasm() must be awaited first!");
5036                 }
5037                 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
5038                 // debug statements here
5039         }
5040         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
5041         export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
5042                 if(!isWasmInitialized) {
5043                         throw new Error("initializeWasm() must be awaited first!");
5044                 }
5045                 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
5046                 // debug statements here
5047         }
5048         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
5049         export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
5050                 if(!isWasmInitialized) {
5051                         throw new Error("initializeWasm() must be awaited first!");
5052                 }
5053                 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
5054                 // debug statements here
5055         }
5056         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
5057         export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
5058                 if(!isWasmInitialized) {
5059                         throw new Error("initializeWasm() must be awaited first!");
5060                 }
5061                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
5062                 return nativeResponseValue;
5063         }
5064         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
5065         export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
5066                 if(!isWasmInitialized) {
5067                         throw new Error("initializeWasm() must be awaited first!");
5068                 }
5069                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
5070                 return nativeResponseValue;
5071         }
5072         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
5073         export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
5074                 if(!isWasmInitialized) {
5075                         throw new Error("initializeWasm() must be awaited first!");
5076                 }
5077                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
5078                 // debug statements here
5079         }
5080         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
5081         export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
5082                 if(!isWasmInitialized) {
5083                         throw new Error("initializeWasm() must be awaited first!");
5084                 }
5085                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
5086                 return nativeResponseValue;
5087         }
5088         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
5089         export function CResult_NonePeerHandleErrorZ_ok(): number {
5090                 if(!isWasmInitialized) {
5091                         throw new Error("initializeWasm() must be awaited first!");
5092                 }
5093                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
5094                 return nativeResponseValue;
5095         }
5096         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
5097         export function CResult_NonePeerHandleErrorZ_err(e: number): number {
5098                 if(!isWasmInitialized) {
5099                         throw new Error("initializeWasm() must be awaited first!");
5100                 }
5101                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
5102                 return nativeResponseValue;
5103         }
5104         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
5105         export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
5106                 if(!isWasmInitialized) {
5107                         throw new Error("initializeWasm() must be awaited first!");
5108                 }
5109                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
5110                 // debug statements here
5111         }
5112         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
5113         export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
5114                 if(!isWasmInitialized) {
5115                         throw new Error("initializeWasm() must be awaited first!");
5116                 }
5117                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
5118                 return nativeResponseValue;
5119         }
5120         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
5121         export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
5122                 if(!isWasmInitialized) {
5123                         throw new Error("initializeWasm() must be awaited first!");
5124                 }
5125                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
5126                 return nativeResponseValue;
5127         }
5128         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
5129         export function CResult_boolPeerHandleErrorZ_err(e: number): number {
5130                 if(!isWasmInitialized) {
5131                         throw new Error("initializeWasm() must be awaited first!");
5132                 }
5133                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
5134                 return nativeResponseValue;
5135         }
5136         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
5137         export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
5138                 if(!isWasmInitialized) {
5139                         throw new Error("initializeWasm() must be awaited first!");
5140                 }
5141                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
5142                 // debug statements here
5143         }
5144         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
5145         export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
5146                 if(!isWasmInitialized) {
5147                         throw new Error("initializeWasm() must be awaited first!");
5148                 }
5149                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
5150                 return nativeResponseValue;
5151         }
5152         // struct LDKCOption_AccessZ COption_AccessZ_some(struct LDKAccess o);
5153         export function COption_AccessZ_some(o: number): number {
5154                 if(!isWasmInitialized) {
5155                         throw new Error("initializeWasm() must be awaited first!");
5156                 }
5157                 const nativeResponseValue = wasm.COption_AccessZ_some(o);
5158                 return nativeResponseValue;
5159         }
5160         // struct LDKCOption_AccessZ COption_AccessZ_none(void);
5161         export function COption_AccessZ_none(): number {
5162                 if(!isWasmInitialized) {
5163                         throw new Error("initializeWasm() must be awaited first!");
5164                 }
5165                 const nativeResponseValue = wasm.COption_AccessZ_none();
5166                 return nativeResponseValue;
5167         }
5168         // void COption_AccessZ_free(struct LDKCOption_AccessZ _res);
5169         export function COption_AccessZ_free(_res: number): void {
5170                 if(!isWasmInitialized) {
5171                         throw new Error("initializeWasm() must be awaited first!");
5172                 }
5173                 const nativeResponseValue = wasm.COption_AccessZ_free(_res);
5174                 // debug statements here
5175         }
5176         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
5177         export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
5178                 if(!isWasmInitialized) {
5179                         throw new Error("initializeWasm() must be awaited first!");
5180                 }
5181                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
5182                 return nativeResponseValue;
5183         }
5184         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
5185         export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
5186                 if(!isWasmInitialized) {
5187                         throw new Error("initializeWasm() must be awaited first!");
5188                 }
5189                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
5190                 return nativeResponseValue;
5191         }
5192         // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
5193         export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
5194                 if(!isWasmInitialized) {
5195                         throw new Error("initializeWasm() must be awaited first!");
5196                 }
5197                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
5198                 // debug statements here
5199         }
5200         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
5201         export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
5202                 if(!isWasmInitialized) {
5203                         throw new Error("initializeWasm() must be awaited first!");
5204                 }
5205                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
5206                 return nativeResponseValue;
5207         }
5208         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
5209         export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
5210                 if(!isWasmInitialized) {
5211                         throw new Error("initializeWasm() must be awaited first!");
5212                 }
5213                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
5214                 return nativeResponseValue;
5215         }
5216         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
5217         export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
5218                 if(!isWasmInitialized) {
5219                         throw new Error("initializeWasm() must be awaited first!");
5220                 }
5221                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
5222                 return nativeResponseValue;
5223         }
5224         // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
5225         export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
5226                 if(!isWasmInitialized) {
5227                         throw new Error("initializeWasm() must be awaited first!");
5228                 }
5229                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
5230                 // debug statements here
5231         }
5232         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
5233         export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
5234                 if(!isWasmInitialized) {
5235                         throw new Error("initializeWasm() must be awaited first!");
5236                 }
5237                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
5238                 return nativeResponseValue;
5239         }
5240         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
5241         export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
5242                 if(!isWasmInitialized) {
5243                         throw new Error("initializeWasm() must be awaited first!");
5244                 }
5245                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
5246                 return nativeResponseValue;
5247         }
5248         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
5249         export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
5250                 if(!isWasmInitialized) {
5251                         throw new Error("initializeWasm() must be awaited first!");
5252                 }
5253                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
5254                 return nativeResponseValue;
5255         }
5256         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
5257         export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
5258                 if(!isWasmInitialized) {
5259                         throw new Error("initializeWasm() must be awaited first!");
5260                 }
5261                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
5262                 // debug statements here
5263         }
5264         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
5265         export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
5266                 if(!isWasmInitialized) {
5267                         throw new Error("initializeWasm() must be awaited first!");
5268                 }
5269                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
5270                 return nativeResponseValue;
5271         }
5272         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
5273         export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
5274                 if(!isWasmInitialized) {
5275                         throw new Error("initializeWasm() must be awaited first!");
5276                 }
5277                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
5278                 return nativeResponseValue;
5279         }
5280         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
5281         export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
5282                 if(!isWasmInitialized) {
5283                         throw new Error("initializeWasm() must be awaited first!");
5284                 }
5285                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
5286                 return nativeResponseValue;
5287         }
5288         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
5289         export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
5290                 if(!isWasmInitialized) {
5291                         throw new Error("initializeWasm() must be awaited first!");
5292                 }
5293                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
5294                 // debug statements here
5295         }
5296         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
5297         export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
5298                 if(!isWasmInitialized) {
5299                         throw new Error("initializeWasm() must be awaited first!");
5300                 }
5301                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
5302                 return nativeResponseValue;
5303         }
5304         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
5305         export function CVec_u64Z_free(_res: number[]): void {
5306                 if(!isWasmInitialized) {
5307                         throw new Error("initializeWasm() must be awaited first!");
5308                 }
5309                 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
5310                 // debug statements here
5311         }
5312         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
5313         export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
5314                 if(!isWasmInitialized) {
5315                         throw new Error("initializeWasm() must be awaited first!");
5316                 }
5317                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
5318                 return nativeResponseValue;
5319         }
5320         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
5321         export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
5322                 if(!isWasmInitialized) {
5323                         throw new Error("initializeWasm() must be awaited first!");
5324                 }
5325                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
5326                 return nativeResponseValue;
5327         }
5328         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
5329         export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
5330                 if(!isWasmInitialized) {
5331                         throw new Error("initializeWasm() must be awaited first!");
5332                 }
5333                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
5334                 // debug statements here
5335         }
5336         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
5337         export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
5338                 if(!isWasmInitialized) {
5339                         throw new Error("initializeWasm() must be awaited first!");
5340                 }
5341                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
5342                 return nativeResponseValue;
5343         }
5344         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
5345         export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
5346                 if(!isWasmInitialized) {
5347                         throw new Error("initializeWasm() must be awaited first!");
5348                 }
5349                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
5350                 return nativeResponseValue;
5351         }
5352         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
5353         export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
5354                 if(!isWasmInitialized) {
5355                         throw new Error("initializeWasm() must be awaited first!");
5356                 }
5357                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
5358                 return nativeResponseValue;
5359         }
5360         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
5361         export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
5362                 if(!isWasmInitialized) {
5363                         throw new Error("initializeWasm() must be awaited first!");
5364                 }
5365                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
5366                 // debug statements here
5367         }
5368         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
5369         export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
5370                 if(!isWasmInitialized) {
5371                         throw new Error("initializeWasm() must be awaited first!");
5372                 }
5373                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
5374                 return nativeResponseValue;
5375         }
5376         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
5377         export function CResult_NetAddressu8Z_ok(o: number): number {
5378                 if(!isWasmInitialized) {
5379                         throw new Error("initializeWasm() must be awaited first!");
5380                 }
5381                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
5382                 return nativeResponseValue;
5383         }
5384         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
5385         export function CResult_NetAddressu8Z_err(e: number): number {
5386                 if(!isWasmInitialized) {
5387                         throw new Error("initializeWasm() must be awaited first!");
5388                 }
5389                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
5390                 return nativeResponseValue;
5391         }
5392         // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
5393         export function CResult_NetAddressu8Z_free(_res: number): void {
5394                 if(!isWasmInitialized) {
5395                         throw new Error("initializeWasm() must be awaited first!");
5396                 }
5397                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
5398                 // debug statements here
5399         }
5400         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
5401         export function CResult_NetAddressu8Z_clone(orig: number): number {
5402                 if(!isWasmInitialized) {
5403                         throw new Error("initializeWasm() must be awaited first!");
5404                 }
5405                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
5406                 return nativeResponseValue;
5407         }
5408         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
5409         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
5410                 if(!isWasmInitialized) {
5411                         throw new Error("initializeWasm() must be awaited first!");
5412                 }
5413                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
5414                 return nativeResponseValue;
5415         }
5416         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
5417         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
5418                 if(!isWasmInitialized) {
5419                         throw new Error("initializeWasm() must be awaited first!");
5420                 }
5421                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
5422                 return nativeResponseValue;
5423         }
5424         // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
5425         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
5426                 if(!isWasmInitialized) {
5427                         throw new Error("initializeWasm() must be awaited first!");
5428                 }
5429                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
5430                 // debug statements here
5431         }
5432         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
5433         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
5434                 if(!isWasmInitialized) {
5435                         throw new Error("initializeWasm() must be awaited first!");
5436                 }
5437                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
5438                 return nativeResponseValue;
5439         }
5440         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
5441         export function CResult_NetAddressDecodeErrorZ_ok(o: number): number {
5442                 if(!isWasmInitialized) {
5443                         throw new Error("initializeWasm() must be awaited first!");
5444                 }
5445                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_ok(o);
5446                 return nativeResponseValue;
5447         }
5448         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
5449         export function CResult_NetAddressDecodeErrorZ_err(e: number): number {
5450                 if(!isWasmInitialized) {
5451                         throw new Error("initializeWasm() must be awaited first!");
5452                 }
5453                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_err(e);
5454                 return nativeResponseValue;
5455         }
5456         // void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
5457         export function CResult_NetAddressDecodeErrorZ_free(_res: number): void {
5458                 if(!isWasmInitialized) {
5459                         throw new Error("initializeWasm() must be awaited first!");
5460                 }
5461                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_free(_res);
5462                 // debug statements here
5463         }
5464         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
5465         export function CResult_NetAddressDecodeErrorZ_clone(orig: number): number {
5466                 if(!isWasmInitialized) {
5467                         throw new Error("initializeWasm() must be awaited first!");
5468                 }
5469                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_clone(orig);
5470                 return nativeResponseValue;
5471         }
5472         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
5473         export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
5474                 if(!isWasmInitialized) {
5475                         throw new Error("initializeWasm() must be awaited first!");
5476                 }
5477                 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
5478                 // debug statements here
5479         }
5480         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
5481         export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
5482                 if(!isWasmInitialized) {
5483                         throw new Error("initializeWasm() must be awaited first!");
5484                 }
5485                 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
5486                 // debug statements here
5487         }
5488         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
5489         export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
5490                 if(!isWasmInitialized) {
5491                         throw new Error("initializeWasm() must be awaited first!");
5492                 }
5493                 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
5494                 // debug statements here
5495         }
5496         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
5497         export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
5498                 if(!isWasmInitialized) {
5499                         throw new Error("initializeWasm() must be awaited first!");
5500                 }
5501                 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
5502                 // debug statements here
5503         }
5504         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
5505         export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
5506                 if(!isWasmInitialized) {
5507                         throw new Error("initializeWasm() must be awaited first!");
5508                 }
5509                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
5510                 return nativeResponseValue;
5511         }
5512         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
5513         export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
5514                 if(!isWasmInitialized) {
5515                         throw new Error("initializeWasm() must be awaited first!");
5516                 }
5517                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
5518                 return nativeResponseValue;
5519         }
5520         // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
5521         export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
5522                 if(!isWasmInitialized) {
5523                         throw new Error("initializeWasm() must be awaited first!");
5524                 }
5525                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
5526                 // debug statements here
5527         }
5528         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
5529         export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
5530                 if(!isWasmInitialized) {
5531                         throw new Error("initializeWasm() must be awaited first!");
5532                 }
5533                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
5534                 return nativeResponseValue;
5535         }
5536         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
5537         export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
5538                 if(!isWasmInitialized) {
5539                         throw new Error("initializeWasm() must be awaited first!");
5540                 }
5541                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
5542                 return nativeResponseValue;
5543         }
5544         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
5545         export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
5546                 if(!isWasmInitialized) {
5547                         throw new Error("initializeWasm() must be awaited first!");
5548                 }
5549                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
5550                 return nativeResponseValue;
5551         }
5552         // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
5553         export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
5554                 if(!isWasmInitialized) {
5555                         throw new Error("initializeWasm() must be awaited first!");
5556                 }
5557                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
5558                 // debug statements here
5559         }
5560         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
5561         export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
5562                 if(!isWasmInitialized) {
5563                         throw new Error("initializeWasm() must be awaited first!");
5564                 }
5565                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
5566                 return nativeResponseValue;
5567         }
5568         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
5569         export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
5570                 if(!isWasmInitialized) {
5571                         throw new Error("initializeWasm() must be awaited first!");
5572                 }
5573                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
5574                 return nativeResponseValue;
5575         }
5576         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
5577         export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
5578                 if(!isWasmInitialized) {
5579                         throw new Error("initializeWasm() must be awaited first!");
5580                 }
5581                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
5582                 return nativeResponseValue;
5583         }
5584         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
5585         export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
5586                 if(!isWasmInitialized) {
5587                         throw new Error("initializeWasm() must be awaited first!");
5588                 }
5589                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
5590                 // debug statements here
5591         }
5592         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
5593         export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
5594                 if(!isWasmInitialized) {
5595                         throw new Error("initializeWasm() must be awaited first!");
5596                 }
5597                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
5598                 return nativeResponseValue;
5599         }
5600         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
5601         export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
5602                 if(!isWasmInitialized) {
5603                         throw new Error("initializeWasm() must be awaited first!");
5604                 }
5605                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
5606                 return nativeResponseValue;
5607         }
5608         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
5609         export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
5610                 if(!isWasmInitialized) {
5611                         throw new Error("initializeWasm() must be awaited first!");
5612                 }
5613                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
5614                 return nativeResponseValue;
5615         }
5616         // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
5617         export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
5618                 if(!isWasmInitialized) {
5619                         throw new Error("initializeWasm() must be awaited first!");
5620                 }
5621                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
5622                 // debug statements here
5623         }
5624         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
5625         export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
5626                 if(!isWasmInitialized) {
5627                         throw new Error("initializeWasm() must be awaited first!");
5628                 }
5629                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
5630                 return nativeResponseValue;
5631         }
5632         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(struct LDKClosingSignedFeeRange o);
5633         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o: number): number {
5634                 if(!isWasmInitialized) {
5635                         throw new Error("initializeWasm() must be awaited first!");
5636                 }
5637                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o);
5638                 return nativeResponseValue;
5639         }
5640         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_err(struct LDKDecodeError e);
5641         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e: number): number {
5642                 if(!isWasmInitialized) {
5643                         throw new Error("initializeWasm() must be awaited first!");
5644                 }
5645                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e);
5646                 return nativeResponseValue;
5647         }
5648         // void CResult_ClosingSignedFeeRangeDecodeErrorZ_free(struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ _res);
5649         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res: number): void {
5650                 if(!isWasmInitialized) {
5651                         throw new Error("initializeWasm() must be awaited first!");
5652                 }
5653                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res);
5654                 // debug statements here
5655         }
5656         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR orig);
5657         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig: number): number {
5658                 if(!isWasmInitialized) {
5659                         throw new Error("initializeWasm() must be awaited first!");
5660                 }
5661                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig);
5662                 return nativeResponseValue;
5663         }
5664         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
5665         export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
5666                 if(!isWasmInitialized) {
5667                         throw new Error("initializeWasm() must be awaited first!");
5668                 }
5669                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
5670                 return nativeResponseValue;
5671         }
5672         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
5673         export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
5674                 if(!isWasmInitialized) {
5675                         throw new Error("initializeWasm() must be awaited first!");
5676                 }
5677                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
5678                 return nativeResponseValue;
5679         }
5680         // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
5681         export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
5682                 if(!isWasmInitialized) {
5683                         throw new Error("initializeWasm() must be awaited first!");
5684                 }
5685                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
5686                 // debug statements here
5687         }
5688         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
5689         export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
5690                 if(!isWasmInitialized) {
5691                         throw new Error("initializeWasm() must be awaited first!");
5692                 }
5693                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
5694                 return nativeResponseValue;
5695         }
5696         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
5697         export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
5698                 if(!isWasmInitialized) {
5699                         throw new Error("initializeWasm() must be awaited first!");
5700                 }
5701                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
5702                 return nativeResponseValue;
5703         }
5704         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
5705         export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
5706                 if(!isWasmInitialized) {
5707                         throw new Error("initializeWasm() must be awaited first!");
5708                 }
5709                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
5710                 return nativeResponseValue;
5711         }
5712         // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
5713         export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
5714                 if(!isWasmInitialized) {
5715                         throw new Error("initializeWasm() must be awaited first!");
5716                 }
5717                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
5718                 // debug statements here
5719         }
5720         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
5721         export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
5722                 if(!isWasmInitialized) {
5723                         throw new Error("initializeWasm() must be awaited first!");
5724                 }
5725                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
5726                 return nativeResponseValue;
5727         }
5728         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
5729         export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
5730                 if(!isWasmInitialized) {
5731                         throw new Error("initializeWasm() must be awaited first!");
5732                 }
5733                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
5734                 return nativeResponseValue;
5735         }
5736         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
5737         export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
5738                 if(!isWasmInitialized) {
5739                         throw new Error("initializeWasm() must be awaited first!");
5740                 }
5741                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
5742                 return nativeResponseValue;
5743         }
5744         // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
5745         export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
5746                 if(!isWasmInitialized) {
5747                         throw new Error("initializeWasm() must be awaited first!");
5748                 }
5749                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
5750                 // debug statements here
5751         }
5752         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
5753         export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
5754                 if(!isWasmInitialized) {
5755                         throw new Error("initializeWasm() must be awaited first!");
5756                 }
5757                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
5758                 return nativeResponseValue;
5759         }
5760         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
5761         export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
5762                 if(!isWasmInitialized) {
5763                         throw new Error("initializeWasm() must be awaited first!");
5764                 }
5765                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
5766                 return nativeResponseValue;
5767         }
5768         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
5769         export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
5770                 if(!isWasmInitialized) {
5771                         throw new Error("initializeWasm() must be awaited first!");
5772                 }
5773                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
5774                 return nativeResponseValue;
5775         }
5776         // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
5777         export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
5778                 if(!isWasmInitialized) {
5779                         throw new Error("initializeWasm() must be awaited first!");
5780                 }
5781                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
5782                 // debug statements here
5783         }
5784         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
5785         export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
5786                 if(!isWasmInitialized) {
5787                         throw new Error("initializeWasm() must be awaited first!");
5788                 }
5789                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
5790                 return nativeResponseValue;
5791         }
5792         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
5793         export function CResult_InitDecodeErrorZ_ok(o: number): number {
5794                 if(!isWasmInitialized) {
5795                         throw new Error("initializeWasm() must be awaited first!");
5796                 }
5797                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
5798                 return nativeResponseValue;
5799         }
5800         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
5801         export function CResult_InitDecodeErrorZ_err(e: number): number {
5802                 if(!isWasmInitialized) {
5803                         throw new Error("initializeWasm() must be awaited first!");
5804                 }
5805                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
5806                 return nativeResponseValue;
5807         }
5808         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
5809         export function CResult_InitDecodeErrorZ_free(_res: number): void {
5810                 if(!isWasmInitialized) {
5811                         throw new Error("initializeWasm() must be awaited first!");
5812                 }
5813                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
5814                 // debug statements here
5815         }
5816         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
5817         export function CResult_InitDecodeErrorZ_clone(orig: number): number {
5818                 if(!isWasmInitialized) {
5819                         throw new Error("initializeWasm() must be awaited first!");
5820                 }
5821                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
5822                 return nativeResponseValue;
5823         }
5824         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
5825         export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
5826                 if(!isWasmInitialized) {
5827                         throw new Error("initializeWasm() must be awaited first!");
5828                 }
5829                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
5830                 return nativeResponseValue;
5831         }
5832         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
5833         export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
5834                 if(!isWasmInitialized) {
5835                         throw new Error("initializeWasm() must be awaited first!");
5836                 }
5837                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
5838                 return nativeResponseValue;
5839         }
5840         // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
5841         export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
5842                 if(!isWasmInitialized) {
5843                         throw new Error("initializeWasm() must be awaited first!");
5844                 }
5845                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
5846                 // debug statements here
5847         }
5848         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
5849         export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
5850                 if(!isWasmInitialized) {
5851                         throw new Error("initializeWasm() must be awaited first!");
5852                 }
5853                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
5854                 return nativeResponseValue;
5855         }
5856         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
5857         export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
5858                 if(!isWasmInitialized) {
5859                         throw new Error("initializeWasm() must be awaited first!");
5860                 }
5861                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
5862                 return nativeResponseValue;
5863         }
5864         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
5865         export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
5866                 if(!isWasmInitialized) {
5867                         throw new Error("initializeWasm() must be awaited first!");
5868                 }
5869                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
5870                 return nativeResponseValue;
5871         }
5872         // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
5873         export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
5874                 if(!isWasmInitialized) {
5875                         throw new Error("initializeWasm() must be awaited first!");
5876                 }
5877                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
5878                 // debug statements here
5879         }
5880         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
5881         export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
5882                 if(!isWasmInitialized) {
5883                         throw new Error("initializeWasm() must be awaited first!");
5884                 }
5885                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
5886                 return nativeResponseValue;
5887         }
5888         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
5889         export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
5890                 if(!isWasmInitialized) {
5891                         throw new Error("initializeWasm() must be awaited first!");
5892                 }
5893                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
5894                 return nativeResponseValue;
5895         }
5896         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
5897         export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
5898                 if(!isWasmInitialized) {
5899                         throw new Error("initializeWasm() must be awaited first!");
5900                 }
5901                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
5902                 return nativeResponseValue;
5903         }
5904         // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
5905         export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
5906                 if(!isWasmInitialized) {
5907                         throw new Error("initializeWasm() must be awaited first!");
5908                 }
5909                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
5910                 // debug statements here
5911         }
5912         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
5913         export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
5914                 if(!isWasmInitialized) {
5915                         throw new Error("initializeWasm() must be awaited first!");
5916                 }
5917                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
5918                 return nativeResponseValue;
5919         }
5920         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
5921         export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
5922                 if(!isWasmInitialized) {
5923                         throw new Error("initializeWasm() must be awaited first!");
5924                 }
5925                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
5926                 return nativeResponseValue;
5927         }
5928         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5929         export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
5930                 if(!isWasmInitialized) {
5931                         throw new Error("initializeWasm() must be awaited first!");
5932                 }
5933                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
5934                 return nativeResponseValue;
5935         }
5936         // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
5937         export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
5938                 if(!isWasmInitialized) {
5939                         throw new Error("initializeWasm() must be awaited first!");
5940                 }
5941                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
5942                 // debug statements here
5943         }
5944         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
5945         export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
5946                 if(!isWasmInitialized) {
5947                         throw new Error("initializeWasm() must be awaited first!");
5948                 }
5949                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
5950                 return nativeResponseValue;
5951         }
5952         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
5953         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
5954                 if(!isWasmInitialized) {
5955                         throw new Error("initializeWasm() must be awaited first!");
5956                 }
5957                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
5958                 return nativeResponseValue;
5959         }
5960         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
5961         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
5962                 if(!isWasmInitialized) {
5963                         throw new Error("initializeWasm() must be awaited first!");
5964                 }
5965                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
5966                 return nativeResponseValue;
5967         }
5968         // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
5969         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
5970                 if(!isWasmInitialized) {
5971                         throw new Error("initializeWasm() must be awaited first!");
5972                 }
5973                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
5974                 // debug statements here
5975         }
5976         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
5977         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
5978                 if(!isWasmInitialized) {
5979                         throw new Error("initializeWasm() must be awaited first!");
5980                 }
5981                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
5982                 return nativeResponseValue;
5983         }
5984         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
5985         export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
5986                 if(!isWasmInitialized) {
5987                         throw new Error("initializeWasm() must be awaited first!");
5988                 }
5989                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
5990                 return nativeResponseValue;
5991         }
5992         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
5993         export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
5994                 if(!isWasmInitialized) {
5995                         throw new Error("initializeWasm() must be awaited first!");
5996                 }
5997                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
5998                 return nativeResponseValue;
5999         }
6000         // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
6001         export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
6002                 if(!isWasmInitialized) {
6003                         throw new Error("initializeWasm() must be awaited first!");
6004                 }
6005                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
6006                 // debug statements here
6007         }
6008         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
6009         export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
6010                 if(!isWasmInitialized) {
6011                         throw new Error("initializeWasm() must be awaited first!");
6012                 }
6013                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
6014                 return nativeResponseValue;
6015         }
6016         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
6017         export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
6018                 if(!isWasmInitialized) {
6019                         throw new Error("initializeWasm() must be awaited first!");
6020                 }
6021                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
6022                 return nativeResponseValue;
6023         }
6024         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
6025         export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
6026                 if(!isWasmInitialized) {
6027                         throw new Error("initializeWasm() must be awaited first!");
6028                 }
6029                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
6030                 return nativeResponseValue;
6031         }
6032         // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
6033         export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
6034                 if(!isWasmInitialized) {
6035                         throw new Error("initializeWasm() must be awaited first!");
6036                 }
6037                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
6038                 // debug statements here
6039         }
6040         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
6041         export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
6042                 if(!isWasmInitialized) {
6043                         throw new Error("initializeWasm() must be awaited first!");
6044                 }
6045                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
6046                 return nativeResponseValue;
6047         }
6048         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
6049         export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
6050                 if(!isWasmInitialized) {
6051                         throw new Error("initializeWasm() must be awaited first!");
6052                 }
6053                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
6054                 return nativeResponseValue;
6055         }
6056         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
6057         export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
6058                 if(!isWasmInitialized) {
6059                         throw new Error("initializeWasm() must be awaited first!");
6060                 }
6061                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
6062                 return nativeResponseValue;
6063         }
6064         // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
6065         export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
6066                 if(!isWasmInitialized) {
6067                         throw new Error("initializeWasm() must be awaited first!");
6068                 }
6069                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
6070                 // debug statements here
6071         }
6072         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
6073         export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
6074                 if(!isWasmInitialized) {
6075                         throw new Error("initializeWasm() must be awaited first!");
6076                 }
6077                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
6078                 return nativeResponseValue;
6079         }
6080         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
6081         export function CResult_PingDecodeErrorZ_ok(o: number): number {
6082                 if(!isWasmInitialized) {
6083                         throw new Error("initializeWasm() must be awaited first!");
6084                 }
6085                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
6086                 return nativeResponseValue;
6087         }
6088         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
6089         export function CResult_PingDecodeErrorZ_err(e: number): number {
6090                 if(!isWasmInitialized) {
6091                         throw new Error("initializeWasm() must be awaited first!");
6092                 }
6093                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
6094                 return nativeResponseValue;
6095         }
6096         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
6097         export function CResult_PingDecodeErrorZ_free(_res: number): void {
6098                 if(!isWasmInitialized) {
6099                         throw new Error("initializeWasm() must be awaited first!");
6100                 }
6101                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
6102                 // debug statements here
6103         }
6104         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
6105         export function CResult_PingDecodeErrorZ_clone(orig: number): number {
6106                 if(!isWasmInitialized) {
6107                         throw new Error("initializeWasm() must be awaited first!");
6108                 }
6109                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
6110                 return nativeResponseValue;
6111         }
6112         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
6113         export function CResult_PongDecodeErrorZ_ok(o: number): number {
6114                 if(!isWasmInitialized) {
6115                         throw new Error("initializeWasm() must be awaited first!");
6116                 }
6117                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
6118                 return nativeResponseValue;
6119         }
6120         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
6121         export function CResult_PongDecodeErrorZ_err(e: number): number {
6122                 if(!isWasmInitialized) {
6123                         throw new Error("initializeWasm() must be awaited first!");
6124                 }
6125                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
6126                 return nativeResponseValue;
6127         }
6128         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
6129         export function CResult_PongDecodeErrorZ_free(_res: number): void {
6130                 if(!isWasmInitialized) {
6131                         throw new Error("initializeWasm() must be awaited first!");
6132                 }
6133                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
6134                 // debug statements here
6135         }
6136         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
6137         export function CResult_PongDecodeErrorZ_clone(orig: number): number {
6138                 if(!isWasmInitialized) {
6139                         throw new Error("initializeWasm() must be awaited first!");
6140                 }
6141                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
6142                 return nativeResponseValue;
6143         }
6144         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
6145         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
6146                 if(!isWasmInitialized) {
6147                         throw new Error("initializeWasm() must be awaited first!");
6148                 }
6149                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
6150                 return nativeResponseValue;
6151         }
6152         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
6153         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
6154                 if(!isWasmInitialized) {
6155                         throw new Error("initializeWasm() must be awaited first!");
6156                 }
6157                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
6158                 return nativeResponseValue;
6159         }
6160         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
6161         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
6162                 if(!isWasmInitialized) {
6163                         throw new Error("initializeWasm() must be awaited first!");
6164                 }
6165                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
6166                 // debug statements here
6167         }
6168         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
6169         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
6170                 if(!isWasmInitialized) {
6171                         throw new Error("initializeWasm() must be awaited first!");
6172                 }
6173                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
6174                 return nativeResponseValue;
6175         }
6176         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
6177         export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
6178                 if(!isWasmInitialized) {
6179                         throw new Error("initializeWasm() must be awaited first!");
6180                 }
6181                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
6182                 return nativeResponseValue;
6183         }
6184         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
6185         export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
6186                 if(!isWasmInitialized) {
6187                         throw new Error("initializeWasm() must be awaited first!");
6188                 }
6189                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
6190                 return nativeResponseValue;
6191         }
6192         // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
6193         export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
6194                 if(!isWasmInitialized) {
6195                         throw new Error("initializeWasm() must be awaited first!");
6196                 }
6197                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
6198                 // debug statements here
6199         }
6200         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
6201         export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
6202                 if(!isWasmInitialized) {
6203                         throw new Error("initializeWasm() must be awaited first!");
6204                 }
6205                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
6206                 return nativeResponseValue;
6207         }
6208         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
6209         export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
6210                 if(!isWasmInitialized) {
6211                         throw new Error("initializeWasm() must be awaited first!");
6212                 }
6213                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
6214                 return nativeResponseValue;
6215         }
6216         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
6217         export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
6218                 if(!isWasmInitialized) {
6219                         throw new Error("initializeWasm() must be awaited first!");
6220                 }
6221                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
6222                 return nativeResponseValue;
6223         }
6224         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
6225         export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
6226                 if(!isWasmInitialized) {
6227                         throw new Error("initializeWasm() must be awaited first!");
6228                 }
6229                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
6230                 // debug statements here
6231         }
6232         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
6233         export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
6234                 if(!isWasmInitialized) {
6235                         throw new Error("initializeWasm() must be awaited first!");
6236                 }
6237                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
6238                 return nativeResponseValue;
6239         }
6240         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
6241         export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
6242                 if(!isWasmInitialized) {
6243                         throw new Error("initializeWasm() must be awaited first!");
6244                 }
6245                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
6246                 return nativeResponseValue;
6247         }
6248         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
6249         export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
6250                 if(!isWasmInitialized) {
6251                         throw new Error("initializeWasm() must be awaited first!");
6252                 }
6253                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
6254                 return nativeResponseValue;
6255         }
6256         // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
6257         export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
6258                 if(!isWasmInitialized) {
6259                         throw new Error("initializeWasm() must be awaited first!");
6260                 }
6261                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
6262                 // debug statements here
6263         }
6264         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
6265         export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
6266                 if(!isWasmInitialized) {
6267                         throw new Error("initializeWasm() must be awaited first!");
6268                 }
6269                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
6270                 return nativeResponseValue;
6271         }
6272         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
6273         export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
6274                 if(!isWasmInitialized) {
6275                         throw new Error("initializeWasm() must be awaited first!");
6276                 }
6277                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
6278                 return nativeResponseValue;
6279         }
6280         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
6281         export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
6282                 if(!isWasmInitialized) {
6283                         throw new Error("initializeWasm() must be awaited first!");
6284                 }
6285                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
6286                 return nativeResponseValue;
6287         }
6288         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
6289         export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
6290                 if(!isWasmInitialized) {
6291                         throw new Error("initializeWasm() must be awaited first!");
6292                 }
6293                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
6294                 // debug statements here
6295         }
6296         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
6297         export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
6298                 if(!isWasmInitialized) {
6299                         throw new Error("initializeWasm() must be awaited first!");
6300                 }
6301                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
6302                 return nativeResponseValue;
6303         }
6304         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
6305         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
6306                 if(!isWasmInitialized) {
6307                         throw new Error("initializeWasm() must be awaited first!");
6308                 }
6309                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
6310                 return nativeResponseValue;
6311         }
6312         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
6313         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
6314                 if(!isWasmInitialized) {
6315                         throw new Error("initializeWasm() must be awaited first!");
6316                 }
6317                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
6318                 return nativeResponseValue;
6319         }
6320         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
6321         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
6322                 if(!isWasmInitialized) {
6323                         throw new Error("initializeWasm() must be awaited first!");
6324                 }
6325                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
6326                 // debug statements here
6327         }
6328         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
6329         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
6330                 if(!isWasmInitialized) {
6331                         throw new Error("initializeWasm() must be awaited first!");
6332                 }
6333                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
6334                 return nativeResponseValue;
6335         }
6336         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
6337         export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
6338                 if(!isWasmInitialized) {
6339                         throw new Error("initializeWasm() must be awaited first!");
6340                 }
6341                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
6342                 return nativeResponseValue;
6343         }
6344         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
6345         export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
6346                 if(!isWasmInitialized) {
6347                         throw new Error("initializeWasm() must be awaited first!");
6348                 }
6349                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
6350                 return nativeResponseValue;
6351         }
6352         // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
6353         export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
6354                 if(!isWasmInitialized) {
6355                         throw new Error("initializeWasm() must be awaited first!");
6356                 }
6357                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
6358                 // debug statements here
6359         }
6360         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
6361         export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
6362                 if(!isWasmInitialized) {
6363                         throw new Error("initializeWasm() must be awaited first!");
6364                 }
6365                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
6366                 return nativeResponseValue;
6367         }
6368         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
6369         export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
6370                 if(!isWasmInitialized) {
6371                         throw new Error("initializeWasm() must be awaited first!");
6372                 }
6373                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
6374                 return nativeResponseValue;
6375         }
6376         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
6377         export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
6378                 if(!isWasmInitialized) {
6379                         throw new Error("initializeWasm() must be awaited first!");
6380                 }
6381                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
6382                 return nativeResponseValue;
6383         }
6384         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
6385         export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
6386                 if(!isWasmInitialized) {
6387                         throw new Error("initializeWasm() must be awaited first!");
6388                 }
6389                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
6390                 // debug statements here
6391         }
6392         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
6393         export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
6394                 if(!isWasmInitialized) {
6395                         throw new Error("initializeWasm() must be awaited first!");
6396                 }
6397                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
6398                 return nativeResponseValue;
6399         }
6400         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
6401         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
6402                 if(!isWasmInitialized) {
6403                         throw new Error("initializeWasm() must be awaited first!");
6404                 }
6405                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
6406                 return nativeResponseValue;
6407         }
6408         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
6409         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
6410                 if(!isWasmInitialized) {
6411                         throw new Error("initializeWasm() must be awaited first!");
6412                 }
6413                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
6414                 return nativeResponseValue;
6415         }
6416         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
6417         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
6418                 if(!isWasmInitialized) {
6419                         throw new Error("initializeWasm() must be awaited first!");
6420                 }
6421                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
6422                 // debug statements here
6423         }
6424         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
6425         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
6426                 if(!isWasmInitialized) {
6427                         throw new Error("initializeWasm() must be awaited first!");
6428                 }
6429                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
6430                 return nativeResponseValue;
6431         }
6432         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
6433         export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
6434                 if(!isWasmInitialized) {
6435                         throw new Error("initializeWasm() must be awaited first!");
6436                 }
6437                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
6438                 return nativeResponseValue;
6439         }
6440         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
6441         export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
6442                 if(!isWasmInitialized) {
6443                         throw new Error("initializeWasm() must be awaited first!");
6444                 }
6445                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
6446                 return nativeResponseValue;
6447         }
6448         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
6449         export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
6450                 if(!isWasmInitialized) {
6451                         throw new Error("initializeWasm() must be awaited first!");
6452                 }
6453                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
6454                 // debug statements here
6455         }
6456         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
6457         export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
6458                 if(!isWasmInitialized) {
6459                         throw new Error("initializeWasm() must be awaited first!");
6460                 }
6461                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
6462                 return nativeResponseValue;
6463         }
6464         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
6465         export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
6466                 if(!isWasmInitialized) {
6467                         throw new Error("initializeWasm() must be awaited first!");
6468                 }
6469                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
6470                 return nativeResponseValue;
6471         }
6472         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
6473         export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
6474                 if(!isWasmInitialized) {
6475                         throw new Error("initializeWasm() must be awaited first!");
6476                 }
6477                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
6478                 return nativeResponseValue;
6479         }
6480         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
6481         export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
6482                 if(!isWasmInitialized) {
6483                         throw new Error("initializeWasm() must be awaited first!");
6484                 }
6485                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
6486                 // debug statements here
6487         }
6488         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
6489         export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
6490                 if(!isWasmInitialized) {
6491                         throw new Error("initializeWasm() must be awaited first!");
6492                 }
6493                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
6494                 return nativeResponseValue;
6495         }
6496         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
6497         export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
6498                 if(!isWasmInitialized) {
6499                         throw new Error("initializeWasm() must be awaited first!");
6500                 }
6501                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
6502                 return nativeResponseValue;
6503         }
6504         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
6505         export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
6506                 if(!isWasmInitialized) {
6507                         throw new Error("initializeWasm() must be awaited first!");
6508                 }
6509                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
6510                 return nativeResponseValue;
6511         }
6512         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
6513         export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
6514                 if(!isWasmInitialized) {
6515                         throw new Error("initializeWasm() must be awaited first!");
6516                 }
6517                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
6518                 // debug statements here
6519         }
6520         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
6521         export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
6522                 if(!isWasmInitialized) {
6523                         throw new Error("initializeWasm() must be awaited first!");
6524                 }
6525                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
6526                 return nativeResponseValue;
6527         }
6528         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_ok(struct LDKInvoice o);
6529         export function CResult_InvoiceSignOrCreationErrorZ_ok(o: number): number {
6530                 if(!isWasmInitialized) {
6531                         throw new Error("initializeWasm() must be awaited first!");
6532                 }
6533                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_ok(o);
6534                 return nativeResponseValue;
6535         }
6536         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e);
6537         export function CResult_InvoiceSignOrCreationErrorZ_err(e: number): number {
6538                 if(!isWasmInitialized) {
6539                         throw new Error("initializeWasm() must be awaited first!");
6540                 }
6541                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_err(e);
6542                 return nativeResponseValue;
6543         }
6544         // void CResult_InvoiceSignOrCreationErrorZ_free(struct LDKCResult_InvoiceSignOrCreationErrorZ _res);
6545         export function CResult_InvoiceSignOrCreationErrorZ_free(_res: number): void {
6546                 if(!isWasmInitialized) {
6547                         throw new Error("initializeWasm() must be awaited first!");
6548                 }
6549                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_free(_res);
6550                 // debug statements here
6551         }
6552         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig);
6553         export function CResult_InvoiceSignOrCreationErrorZ_clone(orig: number): number {
6554                 if(!isWasmInitialized) {
6555                         throw new Error("initializeWasm() must be awaited first!");
6556                 }
6557                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_clone(orig);
6558                 return nativeResponseValue;
6559         }
6560         // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o);
6561         export function COption_FilterZ_some(o: number): number {
6562                 if(!isWasmInitialized) {
6563                         throw new Error("initializeWasm() must be awaited first!");
6564                 }
6565                 const nativeResponseValue = wasm.COption_FilterZ_some(o);
6566                 return nativeResponseValue;
6567         }
6568         // struct LDKCOption_FilterZ COption_FilterZ_none(void);
6569         export function COption_FilterZ_none(): number {
6570                 if(!isWasmInitialized) {
6571                         throw new Error("initializeWasm() must be awaited first!");
6572                 }
6573                 const nativeResponseValue = wasm.COption_FilterZ_none();
6574                 return nativeResponseValue;
6575         }
6576         // void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
6577         export function COption_FilterZ_free(_res: number): void {
6578                 if(!isWasmInitialized) {
6579                         throw new Error("initializeWasm() must be awaited first!");
6580                 }
6581                 const nativeResponseValue = wasm.COption_FilterZ_free(_res);
6582                 // debug statements here
6583         }
6584         // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
6585         export function PaymentPurpose_free(this_ptr: number): void {
6586                 if(!isWasmInitialized) {
6587                         throw new Error("initializeWasm() must be awaited first!");
6588                 }
6589                 const nativeResponseValue = wasm.PaymentPurpose_free(this_ptr);
6590                 // debug statements here
6591         }
6592         // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
6593         export function PaymentPurpose_clone(orig: number): number {
6594                 if(!isWasmInitialized) {
6595                         throw new Error("initializeWasm() must be awaited first!");
6596                 }
6597                 const nativeResponseValue = wasm.PaymentPurpose_clone(orig);
6598                 return nativeResponseValue;
6599         }
6600         // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret, uint64_t user_payment_id);
6601         export function PaymentPurpose_invoice_payment(payment_preimage: Uint8Array, payment_secret: Uint8Array, user_payment_id: number): number {
6602                 if(!isWasmInitialized) {
6603                         throw new Error("initializeWasm() must be awaited first!");
6604                 }
6605                 const nativeResponseValue = wasm.PaymentPurpose_invoice_payment(encodeArray(payment_preimage), encodeArray(payment_secret), user_payment_id);
6606                 return nativeResponseValue;
6607         }
6608         // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
6609         export function PaymentPurpose_spontaneous_payment(a: Uint8Array): number {
6610                 if(!isWasmInitialized) {
6611                         throw new Error("initializeWasm() must be awaited first!");
6612                 }
6613                 const nativeResponseValue = wasm.PaymentPurpose_spontaneous_payment(encodeArray(a));
6614                 return nativeResponseValue;
6615         }
6616         // void ClosureReason_free(struct LDKClosureReason this_ptr);
6617         export function ClosureReason_free(this_ptr: number): void {
6618                 if(!isWasmInitialized) {
6619                         throw new Error("initializeWasm() must be awaited first!");
6620                 }
6621                 const nativeResponseValue = wasm.ClosureReason_free(this_ptr);
6622                 // debug statements here
6623         }
6624         // struct LDKClosureReason ClosureReason_clone(const struct LDKClosureReason *NONNULL_PTR orig);
6625         export function ClosureReason_clone(orig: number): number {
6626                 if(!isWasmInitialized) {
6627                         throw new Error("initializeWasm() must be awaited first!");
6628                 }
6629                 const nativeResponseValue = wasm.ClosureReason_clone(orig);
6630                 return nativeResponseValue;
6631         }
6632         // struct LDKClosureReason ClosureReason_counterparty_force_closed(struct LDKStr peer_msg);
6633         export function ClosureReason_counterparty_force_closed(peer_msg: String): number {
6634                 if(!isWasmInitialized) {
6635                         throw new Error("initializeWasm() must be awaited first!");
6636                 }
6637                 const nativeResponseValue = wasm.ClosureReason_counterparty_force_closed(peer_msg);
6638                 return nativeResponseValue;
6639         }
6640         // struct LDKClosureReason ClosureReason_holder_force_closed(void);
6641         export function ClosureReason_holder_force_closed(): number {
6642                 if(!isWasmInitialized) {
6643                         throw new Error("initializeWasm() must be awaited first!");
6644                 }
6645                 const nativeResponseValue = wasm.ClosureReason_holder_force_closed();
6646                 return nativeResponseValue;
6647         }
6648         // struct LDKClosureReason ClosureReason_cooperative_closure(void);
6649         export function ClosureReason_cooperative_closure(): number {
6650                 if(!isWasmInitialized) {
6651                         throw new Error("initializeWasm() must be awaited first!");
6652                 }
6653                 const nativeResponseValue = wasm.ClosureReason_cooperative_closure();
6654                 return nativeResponseValue;
6655         }
6656         // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void);
6657         export function ClosureReason_commitment_tx_confirmed(): number {
6658                 if(!isWasmInitialized) {
6659                         throw new Error("initializeWasm() must be awaited first!");
6660                 }
6661                 const nativeResponseValue = wasm.ClosureReason_commitment_tx_confirmed();
6662                 return nativeResponseValue;
6663         }
6664         // struct LDKClosureReason ClosureReason_processing_error(struct LDKStr err);
6665         export function ClosureReason_processing_error(err: String): number {
6666                 if(!isWasmInitialized) {
6667                         throw new Error("initializeWasm() must be awaited first!");
6668                 }
6669                 const nativeResponseValue = wasm.ClosureReason_processing_error(err);
6670                 return nativeResponseValue;
6671         }
6672         // struct LDKClosureReason ClosureReason_disconnected_peer(void);
6673         export function ClosureReason_disconnected_peer(): number {
6674                 if(!isWasmInitialized) {
6675                         throw new Error("initializeWasm() must be awaited first!");
6676                 }
6677                 const nativeResponseValue = wasm.ClosureReason_disconnected_peer();
6678                 return nativeResponseValue;
6679         }
6680         // struct LDKClosureReason ClosureReason_outdated_channel_manager(void);
6681         export function ClosureReason_outdated_channel_manager(): number {
6682                 if(!isWasmInitialized) {
6683                         throw new Error("initializeWasm() must be awaited first!");
6684                 }
6685                 const nativeResponseValue = wasm.ClosureReason_outdated_channel_manager();
6686                 return nativeResponseValue;
6687         }
6688         // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
6689         export function ClosureReason_write(obj: number): Uint8Array {
6690                 if(!isWasmInitialized) {
6691                         throw new Error("initializeWasm() must be awaited first!");
6692                 }
6693                 const nativeResponseValue = wasm.ClosureReason_write(obj);
6694                 return decodeArray(nativeResponseValue);
6695         }
6696         // void Event_free(struct LDKEvent this_ptr);
6697         export function Event_free(this_ptr: number): void {
6698                 if(!isWasmInitialized) {
6699                         throw new Error("initializeWasm() must be awaited first!");
6700                 }
6701                 const nativeResponseValue = wasm.Event_free(this_ptr);
6702                 // debug statements here
6703         }
6704         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
6705         export function Event_clone(orig: number): number {
6706                 if(!isWasmInitialized) {
6707                         throw new Error("initializeWasm() must be awaited first!");
6708                 }
6709                 const nativeResponseValue = wasm.Event_clone(orig);
6710                 return nativeResponseValue;
6711         }
6712         // struct LDKEvent Event_funding_generation_ready(struct LDKThirtyTwoBytes temporary_channel_id, uint64_t channel_value_satoshis, struct LDKCVec_u8Z output_script, uint64_t user_channel_id);
6713         export function Event_funding_generation_ready(temporary_channel_id: Uint8Array, channel_value_satoshis: number, output_script: Uint8Array, user_channel_id: number): number {
6714                 if(!isWasmInitialized) {
6715                         throw new Error("initializeWasm() must be awaited first!");
6716                 }
6717                 const nativeResponseValue = wasm.Event_funding_generation_ready(encodeArray(temporary_channel_id), channel_value_satoshis, encodeArray(output_script), user_channel_id);
6718                 return nativeResponseValue;
6719         }
6720         // struct LDKEvent Event_payment_received(struct LDKThirtyTwoBytes payment_hash, uint64_t amt, struct LDKPaymentPurpose purpose);
6721         export function Event_payment_received(payment_hash: Uint8Array, amt: number, purpose: number): number {
6722                 if(!isWasmInitialized) {
6723                         throw new Error("initializeWasm() must be awaited first!");
6724                 }
6725                 const nativeResponseValue = wasm.Event_payment_received(encodeArray(payment_hash), amt, purpose);
6726                 return nativeResponseValue;
6727         }
6728         // struct LDKEvent Event_payment_sent(struct LDKThirtyTwoBytes payment_preimage);
6729         export function Event_payment_sent(payment_preimage: Uint8Array): number {
6730                 if(!isWasmInitialized) {
6731                         throw new Error("initializeWasm() must be awaited first!");
6732                 }
6733                 const nativeResponseValue = wasm.Event_payment_sent(encodeArray(payment_preimage));
6734                 return nativeResponseValue;
6735         }
6736         // struct LDKEvent Event_payment_path_failed(struct LDKThirtyTwoBytes payment_hash, bool rejected_by_dest, struct LDKCOption_NetworkUpdateZ network_update, bool all_paths_failed, struct LDKCVec_RouteHopZ path);
6737         export function Event_payment_path_failed(payment_hash: Uint8Array, rejected_by_dest: boolean, network_update: number, all_paths_failed: boolean, path: number[]): number {
6738                 if(!isWasmInitialized) {
6739                         throw new Error("initializeWasm() must be awaited first!");
6740                 }
6741                 const nativeResponseValue = wasm.Event_payment_path_failed(encodeArray(payment_hash), rejected_by_dest, network_update, all_paths_failed, path);
6742                 return nativeResponseValue;
6743         }
6744         // struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
6745         export function Event_pending_htlcs_forwardable(time_forwardable: number): number {
6746                 if(!isWasmInitialized) {
6747                         throw new Error("initializeWasm() must be awaited first!");
6748                 }
6749                 const nativeResponseValue = wasm.Event_pending_htlcs_forwardable(time_forwardable);
6750                 return nativeResponseValue;
6751         }
6752         // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs);
6753         export function Event_spendable_outputs(outputs: number[]): number {
6754                 if(!isWasmInitialized) {
6755                         throw new Error("initializeWasm() must be awaited first!");
6756                 }
6757                 const nativeResponseValue = wasm.Event_spendable_outputs(outputs);
6758                 return nativeResponseValue;
6759         }
6760         // struct LDKEvent Event_payment_forwarded(struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx);
6761         export function Event_payment_forwarded(fee_earned_msat: number, claim_from_onchain_tx: boolean): number {
6762                 if(!isWasmInitialized) {
6763                         throw new Error("initializeWasm() must be awaited first!");
6764                 }
6765                 const nativeResponseValue = wasm.Event_payment_forwarded(fee_earned_msat, claim_from_onchain_tx);
6766                 return nativeResponseValue;
6767         }
6768         // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, struct LDKClosureReason reason);
6769         export function Event_channel_closed(channel_id: Uint8Array, reason: number): number {
6770                 if(!isWasmInitialized) {
6771                         throw new Error("initializeWasm() must be awaited first!");
6772                 }
6773                 const nativeResponseValue = wasm.Event_channel_closed(encodeArray(channel_id), reason);
6774                 return nativeResponseValue;
6775         }
6776         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
6777         export function Event_write(obj: number): Uint8Array {
6778                 if(!isWasmInitialized) {
6779                         throw new Error("initializeWasm() must be awaited first!");
6780                 }
6781                 const nativeResponseValue = wasm.Event_write(obj);
6782                 return decodeArray(nativeResponseValue);
6783         }
6784         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
6785         export function MessageSendEvent_free(this_ptr: number): void {
6786                 if(!isWasmInitialized) {
6787                         throw new Error("initializeWasm() must be awaited first!");
6788                 }
6789                 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
6790                 // debug statements here
6791         }
6792         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
6793         export function MessageSendEvent_clone(orig: number): number {
6794                 if(!isWasmInitialized) {
6795                         throw new Error("initializeWasm() must be awaited first!");
6796                 }
6797                 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
6798                 return nativeResponseValue;
6799         }
6800         // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel(struct LDKPublicKey node_id, struct LDKAcceptChannel msg);
6801         export function MessageSendEvent_send_accept_channel(node_id: Uint8Array, msg: number): number {
6802                 if(!isWasmInitialized) {
6803                         throw new Error("initializeWasm() must be awaited first!");
6804                 }
6805                 const nativeResponseValue = wasm.MessageSendEvent_send_accept_channel(encodeArray(node_id), msg);
6806                 return nativeResponseValue;
6807         }
6808         // struct LDKMessageSendEvent MessageSendEvent_send_open_channel(struct LDKPublicKey node_id, struct LDKOpenChannel msg);
6809         export function MessageSendEvent_send_open_channel(node_id: Uint8Array, msg: number): number {
6810                 if(!isWasmInitialized) {
6811                         throw new Error("initializeWasm() must be awaited first!");
6812                 }
6813                 const nativeResponseValue = wasm.MessageSendEvent_send_open_channel(encodeArray(node_id), msg);
6814                 return nativeResponseValue;
6815         }
6816         // struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPublicKey node_id, struct LDKFundingCreated msg);
6817         export function MessageSendEvent_send_funding_created(node_id: Uint8Array, msg: number): number {
6818                 if(!isWasmInitialized) {
6819                         throw new Error("initializeWasm() must be awaited first!");
6820                 }
6821                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_created(encodeArray(node_id), msg);
6822                 return nativeResponseValue;
6823         }
6824         // struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
6825         export function MessageSendEvent_send_funding_signed(node_id: Uint8Array, msg: number): number {
6826                 if(!isWasmInitialized) {
6827                         throw new Error("initializeWasm() must be awaited first!");
6828                 }
6829                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_signed(encodeArray(node_id), msg);
6830                 return nativeResponseValue;
6831         }
6832         // struct LDKMessageSendEvent MessageSendEvent_send_funding_locked(struct LDKPublicKey node_id, struct LDKFundingLocked msg);
6833         export function MessageSendEvent_send_funding_locked(node_id: Uint8Array, msg: number): number {
6834                 if(!isWasmInitialized) {
6835                         throw new Error("initializeWasm() must be awaited first!");
6836                 }
6837                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_locked(encodeArray(node_id), msg);
6838                 return nativeResponseValue;
6839         }
6840         // struct LDKMessageSendEvent MessageSendEvent_send_announcement_signatures(struct LDKPublicKey node_id, struct LDKAnnouncementSignatures msg);
6841         export function MessageSendEvent_send_announcement_signatures(node_id: Uint8Array, msg: number): number {
6842                 if(!isWasmInitialized) {
6843                         throw new Error("initializeWasm() must be awaited first!");
6844                 }
6845                 const nativeResponseValue = wasm.MessageSendEvent_send_announcement_signatures(encodeArray(node_id), msg);
6846                 return nativeResponseValue;
6847         }
6848         // struct LDKMessageSendEvent MessageSendEvent_update_htlcs(struct LDKPublicKey node_id, struct LDKCommitmentUpdate updates);
6849         export function MessageSendEvent_update_htlcs(node_id: Uint8Array, updates: number): number {
6850                 if(!isWasmInitialized) {
6851                         throw new Error("initializeWasm() must be awaited first!");
6852                 }
6853                 const nativeResponseValue = wasm.MessageSendEvent_update_htlcs(encodeArray(node_id), updates);
6854                 return nativeResponseValue;
6855         }
6856         // struct LDKMessageSendEvent MessageSendEvent_send_revoke_and_ack(struct LDKPublicKey node_id, struct LDKRevokeAndACK msg);
6857         export function MessageSendEvent_send_revoke_and_ack(node_id: Uint8Array, msg: number): number {
6858                 if(!isWasmInitialized) {
6859                         throw new Error("initializeWasm() must be awaited first!");
6860                 }
6861                 const nativeResponseValue = wasm.MessageSendEvent_send_revoke_and_ack(encodeArray(node_id), msg);
6862                 return nativeResponseValue;
6863         }
6864         // struct LDKMessageSendEvent MessageSendEvent_send_closing_signed(struct LDKPublicKey node_id, struct LDKClosingSigned msg);
6865         export function MessageSendEvent_send_closing_signed(node_id: Uint8Array, msg: number): number {
6866                 if(!isWasmInitialized) {
6867                         throw new Error("initializeWasm() must be awaited first!");
6868                 }
6869                 const nativeResponseValue = wasm.MessageSendEvent_send_closing_signed(encodeArray(node_id), msg);
6870                 return nativeResponseValue;
6871         }
6872         // struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey node_id, struct LDKShutdown msg);
6873         export function MessageSendEvent_send_shutdown(node_id: Uint8Array, msg: number): number {
6874                 if(!isWasmInitialized) {
6875                         throw new Error("initializeWasm() must be awaited first!");
6876                 }
6877                 const nativeResponseValue = wasm.MessageSendEvent_send_shutdown(encodeArray(node_id), msg);
6878                 return nativeResponseValue;
6879         }
6880         // struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
6881         export function MessageSendEvent_send_channel_reestablish(node_id: Uint8Array, msg: number): number {
6882                 if(!isWasmInitialized) {
6883                         throw new Error("initializeWasm() must be awaited first!");
6884                 }
6885                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_reestablish(encodeArray(node_id), msg);
6886                 return nativeResponseValue;
6887         }
6888         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
6889         export function MessageSendEvent_broadcast_channel_announcement(msg: number, update_msg: number): number {
6890                 if(!isWasmInitialized) {
6891                         throw new Error("initializeWasm() must be awaited first!");
6892                 }
6893                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_announcement(msg, update_msg);
6894                 return nativeResponseValue;
6895         }
6896         // struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
6897         export function MessageSendEvent_broadcast_node_announcement(msg: number): number {
6898                 if(!isWasmInitialized) {
6899                         throw new Error("initializeWasm() must be awaited first!");
6900                 }
6901                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_node_announcement(msg);
6902                 return nativeResponseValue;
6903         }
6904         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_update(struct LDKChannelUpdate msg);
6905         export function MessageSendEvent_broadcast_channel_update(msg: number): number {
6906                 if(!isWasmInitialized) {
6907                         throw new Error("initializeWasm() must be awaited first!");
6908                 }
6909                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_update(msg);
6910                 return nativeResponseValue;
6911         }
6912         // struct LDKMessageSendEvent MessageSendEvent_send_channel_update(struct LDKPublicKey node_id, struct LDKChannelUpdate msg);
6913         export function MessageSendEvent_send_channel_update(node_id: Uint8Array, msg: number): number {
6914                 if(!isWasmInitialized) {
6915                         throw new Error("initializeWasm() must be awaited first!");
6916                 }
6917                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_update(encodeArray(node_id), msg);
6918                 return nativeResponseValue;
6919         }
6920         // struct LDKMessageSendEvent MessageSendEvent_handle_error(struct LDKPublicKey node_id, struct LDKErrorAction action);
6921         export function MessageSendEvent_handle_error(node_id: Uint8Array, action: number): number {
6922                 if(!isWasmInitialized) {
6923                         throw new Error("initializeWasm() must be awaited first!");
6924                 }
6925                 const nativeResponseValue = wasm.MessageSendEvent_handle_error(encodeArray(node_id), action);
6926                 return nativeResponseValue;
6927         }
6928         // struct LDKMessageSendEvent MessageSendEvent_send_channel_range_query(struct LDKPublicKey node_id, struct LDKQueryChannelRange msg);
6929         export function MessageSendEvent_send_channel_range_query(node_id: Uint8Array, msg: number): number {
6930                 if(!isWasmInitialized) {
6931                         throw new Error("initializeWasm() must be awaited first!");
6932                 }
6933                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_range_query(encodeArray(node_id), msg);
6934                 return nativeResponseValue;
6935         }
6936         // struct LDKMessageSendEvent MessageSendEvent_send_short_ids_query(struct LDKPublicKey node_id, struct LDKQueryShortChannelIds msg);
6937         export function MessageSendEvent_send_short_ids_query(node_id: Uint8Array, msg: number): number {
6938                 if(!isWasmInitialized) {
6939                         throw new Error("initializeWasm() must be awaited first!");
6940                 }
6941                 const nativeResponseValue = wasm.MessageSendEvent_send_short_ids_query(encodeArray(node_id), msg);
6942                 return nativeResponseValue;
6943         }
6944         // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
6945         export function MessageSendEvent_send_reply_channel_range(node_id: Uint8Array, msg: number): number {
6946                 if(!isWasmInitialized) {
6947                         throw new Error("initializeWasm() must be awaited first!");
6948                 }
6949                 const nativeResponseValue = wasm.MessageSendEvent_send_reply_channel_range(encodeArray(node_id), msg);
6950                 return nativeResponseValue;
6951         }
6952         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
6953         export function MessageSendEventsProvider_free(this_ptr: number): void {
6954                 if(!isWasmInitialized) {
6955                         throw new Error("initializeWasm() must be awaited first!");
6956                 }
6957                 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
6958                 // debug statements here
6959         }
6960         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
6961         export function EventsProvider_free(this_ptr: number): void {
6962                 if(!isWasmInitialized) {
6963                         throw new Error("initializeWasm() must be awaited first!");
6964                 }
6965                 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
6966                 // debug statements here
6967         }
6968         // void EventHandler_free(struct LDKEventHandler this_ptr);
6969         export function EventHandler_free(this_ptr: number): void {
6970                 if(!isWasmInitialized) {
6971                         throw new Error("initializeWasm() must be awaited first!");
6972                 }
6973                 const nativeResponseValue = wasm.EventHandler_free(this_ptr);
6974                 // debug statements here
6975         }
6976         // void APIError_free(struct LDKAPIError this_ptr);
6977         export function APIError_free(this_ptr: number): void {
6978                 if(!isWasmInitialized) {
6979                         throw new Error("initializeWasm() must be awaited first!");
6980                 }
6981                 const nativeResponseValue = wasm.APIError_free(this_ptr);
6982                 // debug statements here
6983         }
6984         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
6985         export function APIError_clone(orig: number): number {
6986                 if(!isWasmInitialized) {
6987                         throw new Error("initializeWasm() must be awaited first!");
6988                 }
6989                 const nativeResponseValue = wasm.APIError_clone(orig);
6990                 return nativeResponseValue;
6991         }
6992         // struct LDKAPIError APIError_apimisuse_error(struct LDKStr err);
6993         export function APIError_apimisuse_error(err: String): number {
6994                 if(!isWasmInitialized) {
6995                         throw new Error("initializeWasm() must be awaited first!");
6996                 }
6997                 const nativeResponseValue = wasm.APIError_apimisuse_error(err);
6998                 return nativeResponseValue;
6999         }
7000         // struct LDKAPIError APIError_fee_rate_too_high(struct LDKStr err, uint32_t feerate);
7001         export function APIError_fee_rate_too_high(err: String, feerate: number): number {
7002                 if(!isWasmInitialized) {
7003                         throw new Error("initializeWasm() must be awaited first!");
7004                 }
7005                 const nativeResponseValue = wasm.APIError_fee_rate_too_high(err, feerate);
7006                 return nativeResponseValue;
7007         }
7008         // struct LDKAPIError APIError_route_error(struct LDKStr err);
7009         export function APIError_route_error(err: String): number {
7010                 if(!isWasmInitialized) {
7011                         throw new Error("initializeWasm() must be awaited first!");
7012                 }
7013                 const nativeResponseValue = wasm.APIError_route_error(err);
7014                 return nativeResponseValue;
7015         }
7016         // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
7017         export function APIError_channel_unavailable(err: String): number {
7018                 if(!isWasmInitialized) {
7019                         throw new Error("initializeWasm() must be awaited first!");
7020                 }
7021                 const nativeResponseValue = wasm.APIError_channel_unavailable(err);
7022                 return nativeResponseValue;
7023         }
7024         // struct LDKAPIError APIError_monitor_update_failed(void);
7025         export function APIError_monitor_update_failed(): number {
7026                 if(!isWasmInitialized) {
7027                         throw new Error("initializeWasm() must be awaited first!");
7028                 }
7029                 const nativeResponseValue = wasm.APIError_monitor_update_failed();
7030                 return nativeResponseValue;
7031         }
7032         // struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
7033         export function APIError_incompatible_shutdown_script(script: number): number {
7034                 if(!isWasmInitialized) {
7035                         throw new Error("initializeWasm() must be awaited first!");
7036                 }
7037                 const nativeResponseValue = wasm.APIError_incompatible_shutdown_script(script);
7038                 return nativeResponseValue;
7039         }
7040         // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
7041         export function sign(msg: Uint8Array, sk: Uint8Array): number {
7042                 if(!isWasmInitialized) {
7043                         throw new Error("initializeWasm() must be awaited first!");
7044                 }
7045                 const nativeResponseValue = wasm.sign(encodeArray(msg), encodeArray(sk));
7046                 return nativeResponseValue;
7047         }
7048         // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
7049         export function recover_pk(msg: Uint8Array, sig: String): number {
7050                 if(!isWasmInitialized) {
7051                         throw new Error("initializeWasm() must be awaited first!");
7052                 }
7053                 const nativeResponseValue = wasm.recover_pk(encodeArray(msg), sig);
7054                 return nativeResponseValue;
7055         }
7056         // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
7057         export function verify(msg: Uint8Array, sig: String, pk: Uint8Array): boolean {
7058                 if(!isWasmInitialized) {
7059                         throw new Error("initializeWasm() must be awaited first!");
7060                 }
7061                 const nativeResponseValue = wasm.verify(encodeArray(msg), sig, encodeArray(pk));
7062                 return nativeResponseValue;
7063         }
7064         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
7065         export function Level_clone(orig: number): Level {
7066                 if(!isWasmInitialized) {
7067                         throw new Error("initializeWasm() must be awaited first!");
7068                 }
7069                 const nativeResponseValue = wasm.Level_clone(orig);
7070                 return nativeResponseValue;
7071         }
7072         // enum LDKLevel Level_trace(void);
7073         export function Level_trace(): Level {
7074                 if(!isWasmInitialized) {
7075                         throw new Error("initializeWasm() must be awaited first!");
7076                 }
7077                 const nativeResponseValue = wasm.Level_trace();
7078                 return nativeResponseValue;
7079         }
7080         // enum LDKLevel Level_debug(void);
7081         export function Level_debug(): Level {
7082                 if(!isWasmInitialized) {
7083                         throw new Error("initializeWasm() must be awaited first!");
7084                 }
7085                 const nativeResponseValue = wasm.Level_debug();
7086                 return nativeResponseValue;
7087         }
7088         // enum LDKLevel Level_info(void);
7089         export function Level_info(): Level {
7090                 if(!isWasmInitialized) {
7091                         throw new Error("initializeWasm() must be awaited first!");
7092                 }
7093                 const nativeResponseValue = wasm.Level_info();
7094                 return nativeResponseValue;
7095         }
7096         // enum LDKLevel Level_warn(void);
7097         export function Level_warn(): Level {
7098                 if(!isWasmInitialized) {
7099                         throw new Error("initializeWasm() must be awaited first!");
7100                 }
7101                 const nativeResponseValue = wasm.Level_warn();
7102                 return nativeResponseValue;
7103         }
7104         // enum LDKLevel Level_error(void);
7105         export function Level_error(): Level {
7106                 if(!isWasmInitialized) {
7107                         throw new Error("initializeWasm() must be awaited first!");
7108                 }
7109                 const nativeResponseValue = wasm.Level_error();
7110                 return nativeResponseValue;
7111         }
7112         // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
7113         export function Level_eq(a: number, b: number): boolean {
7114                 if(!isWasmInitialized) {
7115                         throw new Error("initializeWasm() must be awaited first!");
7116                 }
7117                 const nativeResponseValue = wasm.Level_eq(a, b);
7118                 return nativeResponseValue;
7119         }
7120         // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
7121         export function Level_hash(o: number): number {
7122                 if(!isWasmInitialized) {
7123                         throw new Error("initializeWasm() must be awaited first!");
7124                 }
7125                 const nativeResponseValue = wasm.Level_hash(o);
7126                 return nativeResponseValue;
7127         }
7128         // MUST_USE_RES enum LDKLevel Level_max(void);
7129         export function Level_max(): Level {
7130                 if(!isWasmInitialized) {
7131                         throw new Error("initializeWasm() must be awaited first!");
7132                 }
7133                 const nativeResponseValue = wasm.Level_max();
7134                 return nativeResponseValue;
7135         }
7136         // void Logger_free(struct LDKLogger this_ptr);
7137         export function Logger_free(this_ptr: number): void {
7138                 if(!isWasmInitialized) {
7139                         throw new Error("initializeWasm() must be awaited first!");
7140                 }
7141                 const nativeResponseValue = wasm.Logger_free(this_ptr);
7142                 // debug statements here
7143         }
7144         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
7145         export function ChannelHandshakeConfig_free(this_obj: number): void {
7146                 if(!isWasmInitialized) {
7147                         throw new Error("initializeWasm() must be awaited first!");
7148                 }
7149                 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
7150                 // debug statements here
7151         }
7152         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
7153         export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
7154                 if(!isWasmInitialized) {
7155                         throw new Error("initializeWasm() must be awaited first!");
7156                 }
7157                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
7158                 return nativeResponseValue;
7159         }
7160         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
7161         export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
7162                 if(!isWasmInitialized) {
7163                         throw new Error("initializeWasm() must be awaited first!");
7164                 }
7165                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
7166                 // debug statements here
7167         }
7168         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
7169         export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
7170                 if(!isWasmInitialized) {
7171                         throw new Error("initializeWasm() must be awaited first!");
7172                 }
7173                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
7174                 return nativeResponseValue;
7175         }
7176         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
7177         export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
7178                 if(!isWasmInitialized) {
7179                         throw new Error("initializeWasm() must be awaited first!");
7180                 }
7181                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
7182                 // debug statements here
7183         }
7184         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
7185         export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
7186                 if(!isWasmInitialized) {
7187                         throw new Error("initializeWasm() must be awaited first!");
7188                 }
7189                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
7190                 return nativeResponseValue;
7191         }
7192         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
7193         export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
7194                 if(!isWasmInitialized) {
7195                         throw new Error("initializeWasm() must be awaited first!");
7196                 }
7197                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
7198                 // debug statements here
7199         }
7200         // 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);
7201         export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
7202                 if(!isWasmInitialized) {
7203                         throw new Error("initializeWasm() must be awaited first!");
7204                 }
7205                 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
7206                 return nativeResponseValue;
7207         }
7208         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
7209         export function ChannelHandshakeConfig_clone(orig: number): number {
7210                 if(!isWasmInitialized) {
7211                         throw new Error("initializeWasm() must be awaited first!");
7212                 }
7213                 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
7214                 return nativeResponseValue;
7215         }
7216         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
7217         export function ChannelHandshakeConfig_default(): number {
7218                 if(!isWasmInitialized) {
7219                         throw new Error("initializeWasm() must be awaited first!");
7220                 }
7221                 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
7222                 return nativeResponseValue;
7223         }
7224         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
7225         export function ChannelHandshakeLimits_free(this_obj: number): void {
7226                 if(!isWasmInitialized) {
7227                         throw new Error("initializeWasm() must be awaited first!");
7228                 }
7229                 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
7230                 // debug statements here
7231         }
7232         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7233         export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
7234                 if(!isWasmInitialized) {
7235                         throw new Error("initializeWasm() must be awaited first!");
7236                 }
7237                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
7238                 return nativeResponseValue;
7239         }
7240         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7241         export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
7242                 if(!isWasmInitialized) {
7243                         throw new Error("initializeWasm() must be awaited first!");
7244                 }
7245                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
7246                 // debug statements here
7247         }
7248         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7249         export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
7250                 if(!isWasmInitialized) {
7251                         throw new Error("initializeWasm() must be awaited first!");
7252                 }
7253                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
7254                 return nativeResponseValue;
7255         }
7256         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7257         export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
7258                 if(!isWasmInitialized) {
7259                         throw new Error("initializeWasm() must be awaited first!");
7260                 }
7261                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
7262                 // debug statements here
7263         }
7264         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7265         export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
7266                 if(!isWasmInitialized) {
7267                         throw new Error("initializeWasm() must be awaited first!");
7268                 }
7269                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
7270                 return nativeResponseValue;
7271         }
7272         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7273         export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
7274                 if(!isWasmInitialized) {
7275                         throw new Error("initializeWasm() must be awaited first!");
7276                 }
7277                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
7278                 // debug statements here
7279         }
7280         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7281         export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
7282                 if(!isWasmInitialized) {
7283                         throw new Error("initializeWasm() must be awaited first!");
7284                 }
7285                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
7286                 return nativeResponseValue;
7287         }
7288         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7289         export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
7290                 if(!isWasmInitialized) {
7291                         throw new Error("initializeWasm() must be awaited first!");
7292                 }
7293                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
7294                 // debug statements here
7295         }
7296         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7297         export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
7298                 if(!isWasmInitialized) {
7299                         throw new Error("initializeWasm() must be awaited first!");
7300                 }
7301                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
7302                 return nativeResponseValue;
7303         }
7304         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
7305         export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
7306                 if(!isWasmInitialized) {
7307                         throw new Error("initializeWasm() must be awaited first!");
7308                 }
7309                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
7310                 // debug statements here
7311         }
7312         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7313         export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
7314                 if(!isWasmInitialized) {
7315                         throw new Error("initializeWasm() must be awaited first!");
7316                 }
7317                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
7318                 return nativeResponseValue;
7319         }
7320         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
7321         export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
7322                 if(!isWasmInitialized) {
7323                         throw new Error("initializeWasm() must be awaited first!");
7324                 }
7325                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
7326                 // debug statements here
7327         }
7328         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7329         export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
7330                 if(!isWasmInitialized) {
7331                         throw new Error("initializeWasm() must be awaited first!");
7332                 }
7333                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
7334                 return nativeResponseValue;
7335         }
7336         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
7337         export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
7338                 if(!isWasmInitialized) {
7339                         throw new Error("initializeWasm() must be awaited first!");
7340                 }
7341                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
7342                 // debug statements here
7343         }
7344         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7345         export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
7346                 if(!isWasmInitialized) {
7347                         throw new Error("initializeWasm() must be awaited first!");
7348                 }
7349                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
7350                 return nativeResponseValue;
7351         }
7352         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
7353         export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
7354                 if(!isWasmInitialized) {
7355                         throw new Error("initializeWasm() must be awaited first!");
7356                 }
7357                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
7358                 // debug statements here
7359         }
7360         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_new(uint64_t min_funding_satoshis_arg, uint64_t max_htlc_minimum_msat_arg, uint64_t min_max_htlc_value_in_flight_msat_arg, uint64_t max_channel_reserve_satoshis_arg, uint16_t min_max_accepted_htlcs_arg, uint32_t max_minimum_depth_arg, bool force_announced_channel_preference_arg, uint16_t their_to_self_delay_arg);
7361         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, max_minimum_depth_arg: number, force_announced_channel_preference_arg: boolean, their_to_self_delay_arg: number): number {
7362                 if(!isWasmInitialized) {
7363                         throw new Error("initializeWasm() must be awaited first!");
7364                 }
7365                 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, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg);
7366                 return nativeResponseValue;
7367         }
7368         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
7369         export function ChannelHandshakeLimits_clone(orig: number): number {
7370                 if(!isWasmInitialized) {
7371                         throw new Error("initializeWasm() must be awaited first!");
7372                 }
7373                 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
7374                 return nativeResponseValue;
7375         }
7376         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
7377         export function ChannelHandshakeLimits_default(): number {
7378                 if(!isWasmInitialized) {
7379                         throw new Error("initializeWasm() must be awaited first!");
7380                 }
7381                 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
7382                 return nativeResponseValue;
7383         }
7384         // void ChannelConfig_free(struct LDKChannelConfig this_obj);
7385         export function ChannelConfig_free(this_obj: number): void {
7386                 if(!isWasmInitialized) {
7387                         throw new Error("initializeWasm() must be awaited first!");
7388                 }
7389                 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
7390                 // debug statements here
7391         }
7392         // uint32_t ChannelConfig_get_forwarding_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7393         export function ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr: number): number {
7394                 if(!isWasmInitialized) {
7395                         throw new Error("initializeWasm() must be awaited first!");
7396                 }
7397                 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr);
7398                 return nativeResponseValue;
7399         }
7400         // void ChannelConfig_set_forwarding_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
7401         export function ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr: number, val: number): void {
7402                 if(!isWasmInitialized) {
7403                         throw new Error("initializeWasm() must be awaited first!");
7404                 }
7405                 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr, val);
7406                 // debug statements here
7407         }
7408         // uint32_t ChannelConfig_get_forwarding_fee_base_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7409         export function ChannelConfig_get_forwarding_fee_base_msat(this_ptr: number): number {
7410                 if(!isWasmInitialized) {
7411                         throw new Error("initializeWasm() must be awaited first!");
7412                 }
7413                 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_base_msat(this_ptr);
7414                 return nativeResponseValue;
7415         }
7416         // void ChannelConfig_set_forwarding_fee_base_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
7417         export function ChannelConfig_set_forwarding_fee_base_msat(this_ptr: number, val: number): void {
7418                 if(!isWasmInitialized) {
7419                         throw new Error("initializeWasm() must be awaited first!");
7420                 }
7421                 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_base_msat(this_ptr, val);
7422                 // debug statements here
7423         }
7424         // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7425         export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
7426                 if(!isWasmInitialized) {
7427                         throw new Error("initializeWasm() must be awaited first!");
7428                 }
7429                 const nativeResponseValue = wasm.ChannelConfig_get_cltv_expiry_delta(this_ptr);
7430                 return nativeResponseValue;
7431         }
7432         // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
7433         export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
7434                 if(!isWasmInitialized) {
7435                         throw new Error("initializeWasm() must be awaited first!");
7436                 }
7437                 const nativeResponseValue = wasm.ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
7438                 // debug statements here
7439         }
7440         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7441         export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
7442                 if(!isWasmInitialized) {
7443                         throw new Error("initializeWasm() must be awaited first!");
7444                 }
7445                 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
7446                 return nativeResponseValue;
7447         }
7448         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
7449         export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
7450                 if(!isWasmInitialized) {
7451                         throw new Error("initializeWasm() must be awaited first!");
7452                 }
7453                 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
7454                 // debug statements here
7455         }
7456         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7457         export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
7458                 if(!isWasmInitialized) {
7459                         throw new Error("initializeWasm() must be awaited first!");
7460                 }
7461                 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
7462                 return nativeResponseValue;
7463         }
7464         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
7465         export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
7466                 if(!isWasmInitialized) {
7467                         throw new Error("initializeWasm() must be awaited first!");
7468                 }
7469                 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
7470                 // debug statements here
7471         }
7472         // uint64_t ChannelConfig_get_max_dust_htlc_exposure_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7473         export function ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr: number): number {
7474                 if(!isWasmInitialized) {
7475                         throw new Error("initializeWasm() must be awaited first!");
7476                 }
7477                 const nativeResponseValue = wasm.ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr);
7478                 return nativeResponseValue;
7479         }
7480         // void ChannelConfig_set_max_dust_htlc_exposure_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
7481         export function ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr: number, val: number): void {
7482                 if(!isWasmInitialized) {
7483                         throw new Error("initializeWasm() must be awaited first!");
7484                 }
7485                 const nativeResponseValue = wasm.ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr, val);
7486                 // debug statements here
7487         }
7488         // uint64_t ChannelConfig_get_force_close_avoidance_max_fee_satoshis(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7489         export function ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr: number): number {
7490                 if(!isWasmInitialized) {
7491                         throw new Error("initializeWasm() must be awaited first!");
7492                 }
7493                 const nativeResponseValue = wasm.ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr);
7494                 return nativeResponseValue;
7495         }
7496         // void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
7497         export function ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr: number, val: number): void {
7498                 if(!isWasmInitialized) {
7499                         throw new Error("initializeWasm() must be awaited first!");
7500                 }
7501                 const nativeResponseValue = wasm.ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr, val);
7502                 // debug statements here
7503         }
7504         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t forwarding_fee_proportional_millionths_arg, uint32_t forwarding_fee_base_msat_arg, uint16_t cltv_expiry_delta_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg, uint64_t max_dust_htlc_exposure_msat_arg, uint64_t force_close_avoidance_max_fee_satoshis_arg);
7505         export function ChannelConfig_new(forwarding_fee_proportional_millionths_arg: number, forwarding_fee_base_msat_arg: number, cltv_expiry_delta_arg: number, announced_channel_arg: boolean, commit_upfront_shutdown_pubkey_arg: boolean, max_dust_htlc_exposure_msat_arg: number, force_close_avoidance_max_fee_satoshis_arg: number): number {
7506                 if(!isWasmInitialized) {
7507                         throw new Error("initializeWasm() must be awaited first!");
7508                 }
7509                 const nativeResponseValue = wasm.ChannelConfig_new(forwarding_fee_proportional_millionths_arg, forwarding_fee_base_msat_arg, cltv_expiry_delta_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg, max_dust_htlc_exposure_msat_arg, force_close_avoidance_max_fee_satoshis_arg);
7510                 return nativeResponseValue;
7511         }
7512         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
7513         export function ChannelConfig_clone(orig: number): number {
7514                 if(!isWasmInitialized) {
7515                         throw new Error("initializeWasm() must be awaited first!");
7516                 }
7517                 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
7518                 return nativeResponseValue;
7519         }
7520         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
7521         export function ChannelConfig_default(): number {
7522                 if(!isWasmInitialized) {
7523                         throw new Error("initializeWasm() must be awaited first!");
7524                 }
7525                 const nativeResponseValue = wasm.ChannelConfig_default();
7526                 return nativeResponseValue;
7527         }
7528         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
7529         export function ChannelConfig_write(obj: number): Uint8Array {
7530                 if(!isWasmInitialized) {
7531                         throw new Error("initializeWasm() must be awaited first!");
7532                 }
7533                 const nativeResponseValue = wasm.ChannelConfig_write(obj);
7534                 return decodeArray(nativeResponseValue);
7535         }
7536         // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
7537         export function ChannelConfig_read(ser: Uint8Array): number {
7538                 if(!isWasmInitialized) {
7539                         throw new Error("initializeWasm() must be awaited first!");
7540                 }
7541                 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
7542                 return nativeResponseValue;
7543         }
7544         // void UserConfig_free(struct LDKUserConfig this_obj);
7545         export function UserConfig_free(this_obj: number): void {
7546                 if(!isWasmInitialized) {
7547                         throw new Error("initializeWasm() must be awaited first!");
7548                 }
7549                 const nativeResponseValue = wasm.UserConfig_free(this_obj);
7550                 // debug statements here
7551         }
7552         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
7553         export function UserConfig_get_own_channel_config(this_ptr: number): number {
7554                 if(!isWasmInitialized) {
7555                         throw new Error("initializeWasm() must be awaited first!");
7556                 }
7557                 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
7558                 return nativeResponseValue;
7559         }
7560         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
7561         export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
7562                 if(!isWasmInitialized) {
7563                         throw new Error("initializeWasm() must be awaited first!");
7564                 }
7565                 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
7566                 // debug statements here
7567         }
7568         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
7569         export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
7570                 if(!isWasmInitialized) {
7571                         throw new Error("initializeWasm() must be awaited first!");
7572                 }
7573                 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
7574                 return nativeResponseValue;
7575         }
7576         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
7577         export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
7578                 if(!isWasmInitialized) {
7579                         throw new Error("initializeWasm() must be awaited first!");
7580                 }
7581                 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
7582                 // debug statements here
7583         }
7584         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
7585         export function UserConfig_get_channel_options(this_ptr: number): number {
7586                 if(!isWasmInitialized) {
7587                         throw new Error("initializeWasm() must be awaited first!");
7588                 }
7589                 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
7590                 return nativeResponseValue;
7591         }
7592         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
7593         export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
7594                 if(!isWasmInitialized) {
7595                         throw new Error("initializeWasm() must be awaited first!");
7596                 }
7597                 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
7598                 // debug statements here
7599         }
7600         // bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
7601         export function UserConfig_get_accept_forwards_to_priv_channels(this_ptr: number): boolean {
7602                 if(!isWasmInitialized) {
7603                         throw new Error("initializeWasm() must be awaited first!");
7604                 }
7605                 const nativeResponseValue = wasm.UserConfig_get_accept_forwards_to_priv_channels(this_ptr);
7606                 return nativeResponseValue;
7607         }
7608         // void UserConfig_set_accept_forwards_to_priv_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
7609         export function UserConfig_set_accept_forwards_to_priv_channels(this_ptr: number, val: boolean): void {
7610                 if(!isWasmInitialized) {
7611                         throw new Error("initializeWasm() must be awaited first!");
7612                 }
7613                 const nativeResponseValue = wasm.UserConfig_set_accept_forwards_to_priv_channels(this_ptr, val);
7614                 // debug statements here
7615         }
7616         // MUST_USE_RES struct LDKUserConfig UserConfig_new(struct LDKChannelHandshakeConfig own_channel_config_arg, struct LDKChannelHandshakeLimits peer_channel_config_limits_arg, struct LDKChannelConfig channel_options_arg, bool accept_forwards_to_priv_channels_arg);
7617         export function UserConfig_new(own_channel_config_arg: number, peer_channel_config_limits_arg: number, channel_options_arg: number, accept_forwards_to_priv_channels_arg: boolean): number {
7618                 if(!isWasmInitialized) {
7619                         throw new Error("initializeWasm() must be awaited first!");
7620                 }
7621                 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg, accept_forwards_to_priv_channels_arg);
7622                 return nativeResponseValue;
7623         }
7624         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
7625         export function UserConfig_clone(orig: number): number {
7626                 if(!isWasmInitialized) {
7627                         throw new Error("initializeWasm() must be awaited first!");
7628                 }
7629                 const nativeResponseValue = wasm.UserConfig_clone(orig);
7630                 return nativeResponseValue;
7631         }
7632         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
7633         export function UserConfig_default(): number {
7634                 if(!isWasmInitialized) {
7635                         throw new Error("initializeWasm() must be awaited first!");
7636                 }
7637                 const nativeResponseValue = wasm.UserConfig_default();
7638                 return nativeResponseValue;
7639         }
7640         // void BestBlock_free(struct LDKBestBlock this_obj);
7641         export function BestBlock_free(this_obj: number): void {
7642                 if(!isWasmInitialized) {
7643                         throw new Error("initializeWasm() must be awaited first!");
7644                 }
7645                 const nativeResponseValue = wasm.BestBlock_free(this_obj);
7646                 // debug statements here
7647         }
7648         // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
7649         export function BestBlock_clone(orig: number): number {
7650                 if(!isWasmInitialized) {
7651                         throw new Error("initializeWasm() must be awaited first!");
7652                 }
7653                 const nativeResponseValue = wasm.BestBlock_clone(orig);
7654                 return nativeResponseValue;
7655         }
7656         // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
7657         export function BestBlock_from_genesis(network: Network): number {
7658                 if(!isWasmInitialized) {
7659                         throw new Error("initializeWasm() must be awaited first!");
7660                 }
7661                 const nativeResponseValue = wasm.BestBlock_from_genesis(network);
7662                 return nativeResponseValue;
7663         }
7664         // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
7665         export function BestBlock_new(block_hash: Uint8Array, height: number): number {
7666                 if(!isWasmInitialized) {
7667                         throw new Error("initializeWasm() must be awaited first!");
7668                 }
7669                 const nativeResponseValue = wasm.BestBlock_new(encodeArray(block_hash), height);
7670                 return nativeResponseValue;
7671         }
7672         // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
7673         export function BestBlock_block_hash(this_arg: number): Uint8Array {
7674                 if(!isWasmInitialized) {
7675                         throw new Error("initializeWasm() must be awaited first!");
7676                 }
7677                 const nativeResponseValue = wasm.BestBlock_block_hash(this_arg);
7678                 return decodeArray(nativeResponseValue);
7679         }
7680         // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
7681         export function BestBlock_height(this_arg: number): number {
7682                 if(!isWasmInitialized) {
7683                         throw new Error("initializeWasm() must be awaited first!");
7684                 }
7685                 const nativeResponseValue = wasm.BestBlock_height(this_arg);
7686                 return nativeResponseValue;
7687         }
7688         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
7689         export function AccessError_clone(orig: number): AccessError {
7690                 if(!isWasmInitialized) {
7691                         throw new Error("initializeWasm() must be awaited first!");
7692                 }
7693                 const nativeResponseValue = wasm.AccessError_clone(orig);
7694                 return nativeResponseValue;
7695         }
7696         // enum LDKAccessError AccessError_unknown_chain(void);
7697         export function AccessError_unknown_chain(): AccessError {
7698                 if(!isWasmInitialized) {
7699                         throw new Error("initializeWasm() must be awaited first!");
7700                 }
7701                 const nativeResponseValue = wasm.AccessError_unknown_chain();
7702                 return nativeResponseValue;
7703         }
7704         // enum LDKAccessError AccessError_unknown_tx(void);
7705         export function AccessError_unknown_tx(): AccessError {
7706                 if(!isWasmInitialized) {
7707                         throw new Error("initializeWasm() must be awaited first!");
7708                 }
7709                 const nativeResponseValue = wasm.AccessError_unknown_tx();
7710                 return nativeResponseValue;
7711         }
7712         // void Access_free(struct LDKAccess this_ptr);
7713         export function Access_free(this_ptr: number): void {
7714                 if(!isWasmInitialized) {
7715                         throw new Error("initializeWasm() must be awaited first!");
7716                 }
7717                 const nativeResponseValue = wasm.Access_free(this_ptr);
7718                 // debug statements here
7719         }
7720         // void Listen_free(struct LDKListen this_ptr);
7721         export function Listen_free(this_ptr: number): void {
7722                 if(!isWasmInitialized) {
7723                         throw new Error("initializeWasm() must be awaited first!");
7724                 }
7725                 const nativeResponseValue = wasm.Listen_free(this_ptr);
7726                 // debug statements here
7727         }
7728         // void Confirm_free(struct LDKConfirm this_ptr);
7729         export function Confirm_free(this_ptr: number): void {
7730                 if(!isWasmInitialized) {
7731                         throw new Error("initializeWasm() must be awaited first!");
7732                 }
7733                 const nativeResponseValue = wasm.Confirm_free(this_ptr);
7734                 // debug statements here
7735         }
7736         // void Watch_free(struct LDKWatch this_ptr);
7737         export function Watch_free(this_ptr: number): void {
7738                 if(!isWasmInitialized) {
7739                         throw new Error("initializeWasm() must be awaited first!");
7740                 }
7741                 const nativeResponseValue = wasm.Watch_free(this_ptr);
7742                 // debug statements here
7743         }
7744         // void Filter_free(struct LDKFilter this_ptr);
7745         export function Filter_free(this_ptr: number): void {
7746                 if(!isWasmInitialized) {
7747                         throw new Error("initializeWasm() must be awaited first!");
7748                 }
7749                 const nativeResponseValue = wasm.Filter_free(this_ptr);
7750                 // debug statements here
7751         }
7752         // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
7753         export function WatchedOutput_free(this_obj: number): void {
7754                 if(!isWasmInitialized) {
7755                         throw new Error("initializeWasm() must be awaited first!");
7756                 }
7757                 const nativeResponseValue = wasm.WatchedOutput_free(this_obj);
7758                 // debug statements here
7759         }
7760         // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
7761         export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
7762                 if(!isWasmInitialized) {
7763                         throw new Error("initializeWasm() must be awaited first!");
7764                 }
7765                 const nativeResponseValue = wasm.WatchedOutput_get_block_hash(this_ptr);
7766                 return decodeArray(nativeResponseValue);
7767         }
7768         // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
7769         export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
7770                 if(!isWasmInitialized) {
7771                         throw new Error("initializeWasm() must be awaited first!");
7772                 }
7773                 const nativeResponseValue = wasm.WatchedOutput_set_block_hash(this_ptr, encodeArray(val));
7774                 // debug statements here
7775         }
7776         // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
7777         export function WatchedOutput_get_outpoint(this_ptr: number): number {
7778                 if(!isWasmInitialized) {
7779                         throw new Error("initializeWasm() must be awaited first!");
7780                 }
7781                 const nativeResponseValue = wasm.WatchedOutput_get_outpoint(this_ptr);
7782                 return nativeResponseValue;
7783         }
7784         // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
7785         export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
7786                 if(!isWasmInitialized) {
7787                         throw new Error("initializeWasm() must be awaited first!");
7788                 }
7789                 const nativeResponseValue = wasm.WatchedOutput_set_outpoint(this_ptr, val);
7790                 // debug statements here
7791         }
7792         // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
7793         export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
7794                 if(!isWasmInitialized) {
7795                         throw new Error("initializeWasm() must be awaited first!");
7796                 }
7797                 const nativeResponseValue = wasm.WatchedOutput_get_script_pubkey(this_ptr);
7798                 return decodeArray(nativeResponseValue);
7799         }
7800         // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
7801         export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
7802                 if(!isWasmInitialized) {
7803                         throw new Error("initializeWasm() must be awaited first!");
7804                 }
7805                 const nativeResponseValue = wasm.WatchedOutput_set_script_pubkey(this_ptr, encodeArray(val));
7806                 // debug statements here
7807         }
7808         // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
7809         export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
7810                 if(!isWasmInitialized) {
7811                         throw new Error("initializeWasm() must be awaited first!");
7812                 }
7813                 const nativeResponseValue = wasm.WatchedOutput_new(encodeArray(block_hash_arg), outpoint_arg, encodeArray(script_pubkey_arg));
7814                 return nativeResponseValue;
7815         }
7816         // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
7817         export function WatchedOutput_clone(orig: number): number {
7818                 if(!isWasmInitialized) {
7819                         throw new Error("initializeWasm() must be awaited first!");
7820                 }
7821                 const nativeResponseValue = wasm.WatchedOutput_clone(orig);
7822                 return nativeResponseValue;
7823         }
7824         // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
7825         export function WatchedOutput_hash(o: number): number {
7826                 if(!isWasmInitialized) {
7827                         throw new Error("initializeWasm() must be awaited first!");
7828                 }
7829                 const nativeResponseValue = wasm.WatchedOutput_hash(o);
7830                 return nativeResponseValue;
7831         }
7832         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
7833         export function BroadcasterInterface_free(this_ptr: number): void {
7834                 if(!isWasmInitialized) {
7835                         throw new Error("initializeWasm() must be awaited first!");
7836                 }
7837                 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
7838                 // debug statements here
7839         }
7840         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
7841         export function ConfirmationTarget_clone(orig: number): ConfirmationTarget {
7842                 if(!isWasmInitialized) {
7843                         throw new Error("initializeWasm() must be awaited first!");
7844                 }
7845                 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
7846                 return nativeResponseValue;
7847         }
7848         // enum LDKConfirmationTarget ConfirmationTarget_background(void);
7849         export function ConfirmationTarget_background(): ConfirmationTarget {
7850                 if(!isWasmInitialized) {
7851                         throw new Error("initializeWasm() must be awaited first!");
7852                 }
7853                 const nativeResponseValue = wasm.ConfirmationTarget_background();
7854                 return nativeResponseValue;
7855         }
7856         // enum LDKConfirmationTarget ConfirmationTarget_normal(void);
7857         export function ConfirmationTarget_normal(): ConfirmationTarget {
7858                 if(!isWasmInitialized) {
7859                         throw new Error("initializeWasm() must be awaited first!");
7860                 }
7861                 const nativeResponseValue = wasm.ConfirmationTarget_normal();
7862                 return nativeResponseValue;
7863         }
7864         // enum LDKConfirmationTarget ConfirmationTarget_high_priority(void);
7865         export function ConfirmationTarget_high_priority(): ConfirmationTarget {
7866                 if(!isWasmInitialized) {
7867                         throw new Error("initializeWasm() must be awaited first!");
7868                 }
7869                 const nativeResponseValue = wasm.ConfirmationTarget_high_priority();
7870                 return nativeResponseValue;
7871         }
7872         // bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b);
7873         export function ConfirmationTarget_eq(a: number, b: number): boolean {
7874                 if(!isWasmInitialized) {
7875                         throw new Error("initializeWasm() must be awaited first!");
7876                 }
7877                 const nativeResponseValue = wasm.ConfirmationTarget_eq(a, b);
7878                 return nativeResponseValue;
7879         }
7880         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
7881         export function FeeEstimator_free(this_ptr: number): void {
7882                 if(!isWasmInitialized) {
7883                         throw new Error("initializeWasm() must be awaited first!");
7884                 }
7885                 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
7886                 // debug statements here
7887         }
7888         // void ChainMonitor_free(struct LDKChainMonitor this_obj);
7889         export function ChainMonitor_free(this_obj: number): void {
7890                 if(!isWasmInitialized) {
7891                         throw new Error("initializeWasm() must be awaited first!");
7892                 }
7893                 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
7894                 // debug statements here
7895         }
7896         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKCOption_FilterZ chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
7897         export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
7898                 if(!isWasmInitialized) {
7899                         throw new Error("initializeWasm() must be awaited first!");
7900                 }
7901                 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
7902                 return nativeResponseValue;
7903         }
7904         // MUST_USE_RES struct LDKCVec_BalanceZ ChainMonitor_get_claimable_balances(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKCVec_ChannelDetailsZ ignored_channels);
7905         export function ChainMonitor_get_claimable_balances(this_arg: number, ignored_channels: number[]): number[] {
7906                 if(!isWasmInitialized) {
7907                         throw new Error("initializeWasm() must be awaited first!");
7908                 }
7909                 const nativeResponseValue = wasm.ChainMonitor_get_claimable_balances(this_arg, ignored_channels);
7910                 return nativeResponseValue;
7911         }
7912         // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
7913         export function ChainMonitor_as_Listen(this_arg: number): number {
7914                 if(!isWasmInitialized) {
7915                         throw new Error("initializeWasm() must be awaited first!");
7916                 }
7917                 const nativeResponseValue = wasm.ChainMonitor_as_Listen(this_arg);
7918                 return nativeResponseValue;
7919         }
7920         // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
7921         export function ChainMonitor_as_Confirm(this_arg: number): number {
7922                 if(!isWasmInitialized) {
7923                         throw new Error("initializeWasm() must be awaited first!");
7924                 }
7925                 const nativeResponseValue = wasm.ChainMonitor_as_Confirm(this_arg);
7926                 return nativeResponseValue;
7927         }
7928         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
7929         export function ChainMonitor_as_Watch(this_arg: number): number {
7930                 if(!isWasmInitialized) {
7931                         throw new Error("initializeWasm() must be awaited first!");
7932                 }
7933                 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
7934                 return nativeResponseValue;
7935         }
7936         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
7937         export function ChainMonitor_as_EventsProvider(this_arg: number): number {
7938                 if(!isWasmInitialized) {
7939                         throw new Error("initializeWasm() must be awaited first!");
7940                 }
7941                 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
7942                 return nativeResponseValue;
7943         }
7944         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
7945         export function ChannelMonitorUpdate_free(this_obj: number): void {
7946                 if(!isWasmInitialized) {
7947                         throw new Error("initializeWasm() must be awaited first!");
7948                 }
7949                 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
7950                 // debug statements here
7951         }
7952         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
7953         export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
7954                 if(!isWasmInitialized) {
7955                         throw new Error("initializeWasm() must be awaited first!");
7956                 }
7957                 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
7958                 return nativeResponseValue;
7959         }
7960         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
7961         export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
7962                 if(!isWasmInitialized) {
7963                         throw new Error("initializeWasm() must be awaited first!");
7964                 }
7965                 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
7966                 // debug statements here
7967         }
7968         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
7969         export function ChannelMonitorUpdate_clone(orig: number): number {
7970                 if(!isWasmInitialized) {
7971                         throw new Error("initializeWasm() must be awaited first!");
7972                 }
7973                 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
7974                 return nativeResponseValue;
7975         }
7976         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
7977         export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
7978                 if(!isWasmInitialized) {
7979                         throw new Error("initializeWasm() must be awaited first!");
7980                 }
7981                 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
7982                 return decodeArray(nativeResponseValue);
7983         }
7984         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
7985         export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
7986                 if(!isWasmInitialized) {
7987                         throw new Error("initializeWasm() must be awaited first!");
7988                 }
7989                 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
7990                 return nativeResponseValue;
7991         }
7992         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
7993         export function ChannelMonitorUpdateErr_clone(orig: number): ChannelMonitorUpdateErr {
7994                 if(!isWasmInitialized) {
7995                         throw new Error("initializeWasm() must be awaited first!");
7996                 }
7997                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
7998                 return nativeResponseValue;
7999         }
8000         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
8001         export function ChannelMonitorUpdateErr_temporary_failure(): ChannelMonitorUpdateErr {
8002                 if(!isWasmInitialized) {
8003                         throw new Error("initializeWasm() must be awaited first!");
8004                 }
8005                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_temporary_failure();
8006                 return nativeResponseValue;
8007         }
8008         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
8009         export function ChannelMonitorUpdateErr_permanent_failure(): ChannelMonitorUpdateErr {
8010                 if(!isWasmInitialized) {
8011                         throw new Error("initializeWasm() must be awaited first!");
8012                 }
8013                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_permanent_failure();
8014                 return nativeResponseValue;
8015         }
8016         // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
8017         export function MonitorUpdateError_free(this_obj: number): void {
8018                 if(!isWasmInitialized) {
8019                         throw new Error("initializeWasm() must be awaited first!");
8020                 }
8021                 const nativeResponseValue = wasm.MonitorUpdateError_free(this_obj);
8022                 // debug statements here
8023         }
8024         // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
8025         export function MonitorUpdateError_clone(orig: number): number {
8026                 if(!isWasmInitialized) {
8027                         throw new Error("initializeWasm() must be awaited first!");
8028                 }
8029                 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
8030                 return nativeResponseValue;
8031         }
8032         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
8033         export function MonitorEvent_free(this_ptr: number): void {
8034                 if(!isWasmInitialized) {
8035                         throw new Error("initializeWasm() must be awaited first!");
8036                 }
8037                 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
8038                 // debug statements here
8039         }
8040         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
8041         export function MonitorEvent_clone(orig: number): number {
8042                 if(!isWasmInitialized) {
8043                         throw new Error("initializeWasm() must be awaited first!");
8044                 }
8045                 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
8046                 return nativeResponseValue;
8047         }
8048         // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
8049         export function MonitorEvent_htlcevent(a: number): number {
8050                 if(!isWasmInitialized) {
8051                         throw new Error("initializeWasm() must be awaited first!");
8052                 }
8053                 const nativeResponseValue = wasm.MonitorEvent_htlcevent(a);
8054                 return nativeResponseValue;
8055         }
8056         // struct LDKMonitorEvent MonitorEvent_commitment_tx_confirmed(struct LDKOutPoint a);
8057         export function MonitorEvent_commitment_tx_confirmed(a: number): number {
8058                 if(!isWasmInitialized) {
8059                         throw new Error("initializeWasm() must be awaited first!");
8060                 }
8061                 const nativeResponseValue = wasm.MonitorEvent_commitment_tx_confirmed(a);
8062                 return nativeResponseValue;
8063         }
8064         // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
8065         export function HTLCUpdate_free(this_obj: number): void {
8066                 if(!isWasmInitialized) {
8067                         throw new Error("initializeWasm() must be awaited first!");
8068                 }
8069                 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
8070                 // debug statements here
8071         }
8072         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
8073         export function HTLCUpdate_clone(orig: number): number {
8074                 if(!isWasmInitialized) {
8075                         throw new Error("initializeWasm() must be awaited first!");
8076                 }
8077                 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
8078                 return nativeResponseValue;
8079         }
8080         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
8081         export function HTLCUpdate_write(obj: number): Uint8Array {
8082                 if(!isWasmInitialized) {
8083                         throw new Error("initializeWasm() must be awaited first!");
8084                 }
8085                 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
8086                 return decodeArray(nativeResponseValue);
8087         }
8088         // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
8089         export function HTLCUpdate_read(ser: Uint8Array): number {
8090                 if(!isWasmInitialized) {
8091                         throw new Error("initializeWasm() must be awaited first!");
8092                 }
8093                 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
8094                 return nativeResponseValue;
8095         }
8096         // void Balance_free(struct LDKBalance this_ptr);
8097         export function Balance_free(this_ptr: number): void {
8098                 if(!isWasmInitialized) {
8099                         throw new Error("initializeWasm() must be awaited first!");
8100                 }
8101                 const nativeResponseValue = wasm.Balance_free(this_ptr);
8102                 // debug statements here
8103         }
8104         // struct LDKBalance Balance_clone(const struct LDKBalance *NONNULL_PTR orig);
8105         export function Balance_clone(orig: number): number {
8106                 if(!isWasmInitialized) {
8107                         throw new Error("initializeWasm() must be awaited first!");
8108                 }
8109                 const nativeResponseValue = wasm.Balance_clone(orig);
8110                 return nativeResponseValue;
8111         }
8112         // struct LDKBalance Balance_claimable_on_channel_close(uint64_t claimable_amount_satoshis);
8113         export function Balance_claimable_on_channel_close(claimable_amount_satoshis: number): number {
8114                 if(!isWasmInitialized) {
8115                         throw new Error("initializeWasm() must be awaited first!");
8116                 }
8117                 const nativeResponseValue = wasm.Balance_claimable_on_channel_close(claimable_amount_satoshis);
8118                 return nativeResponseValue;
8119         }
8120         // struct LDKBalance Balance_claimable_awaiting_confirmations(uint64_t claimable_amount_satoshis, uint32_t confirmation_height);
8121         export function Balance_claimable_awaiting_confirmations(claimable_amount_satoshis: number, confirmation_height: number): number {
8122                 if(!isWasmInitialized) {
8123                         throw new Error("initializeWasm() must be awaited first!");
8124                 }
8125                 const nativeResponseValue = wasm.Balance_claimable_awaiting_confirmations(claimable_amount_satoshis, confirmation_height);
8126                 return nativeResponseValue;
8127         }
8128         // struct LDKBalance Balance_contentious_claimable(uint64_t claimable_amount_satoshis, uint32_t timeout_height);
8129         export function Balance_contentious_claimable(claimable_amount_satoshis: number, timeout_height: number): number {
8130                 if(!isWasmInitialized) {
8131                         throw new Error("initializeWasm() must be awaited first!");
8132                 }
8133                 const nativeResponseValue = wasm.Balance_contentious_claimable(claimable_amount_satoshis, timeout_height);
8134                 return nativeResponseValue;
8135         }
8136         // struct LDKBalance Balance_maybe_claimable_htlcawaiting_timeout(uint64_t claimable_amount_satoshis, uint32_t claimable_height);
8137         export function Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis: number, claimable_height: number): number {
8138                 if(!isWasmInitialized) {
8139                         throw new Error("initializeWasm() must be awaited first!");
8140                 }
8141                 const nativeResponseValue = wasm.Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis, claimable_height);
8142                 return nativeResponseValue;
8143         }
8144         // bool Balance_eq(const struct LDKBalance *NONNULL_PTR a, const struct LDKBalance *NONNULL_PTR b);
8145         export function Balance_eq(a: number, b: number): boolean {
8146                 if(!isWasmInitialized) {
8147                         throw new Error("initializeWasm() must be awaited first!");
8148                 }
8149                 const nativeResponseValue = wasm.Balance_eq(a, b);
8150                 return nativeResponseValue;
8151         }
8152         // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
8153         export function ChannelMonitor_free(this_obj: number): void {
8154                 if(!isWasmInitialized) {
8155                         throw new Error("initializeWasm() must be awaited first!");
8156                 }
8157                 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
8158                 // debug statements here
8159         }
8160         // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
8161         export function ChannelMonitor_clone(orig: number): number {
8162                 if(!isWasmInitialized) {
8163                         throw new Error("initializeWasm() must be awaited first!");
8164                 }
8165                 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
8166                 return nativeResponseValue;
8167         }
8168         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
8169         export function ChannelMonitor_write(obj: number): Uint8Array {
8170                 if(!isWasmInitialized) {
8171                         throw new Error("initializeWasm() must be awaited first!");
8172                 }
8173                 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
8174                 return decodeArray(nativeResponseValue);
8175         }
8176         // 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);
8177         export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
8178                 if(!isWasmInitialized) {
8179                         throw new Error("initializeWasm() must be awaited first!");
8180                 }
8181                 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
8182                 return nativeResponseValue;
8183         }
8184         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8185         export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
8186                 if(!isWasmInitialized) {
8187                         throw new Error("initializeWasm() must be awaited first!");
8188                 }
8189                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
8190                 return nativeResponseValue;
8191         }
8192         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8193         export function ChannelMonitor_get_funding_txo(this_arg: number): number {
8194                 if(!isWasmInitialized) {
8195                         throw new Error("initializeWasm() must be awaited first!");
8196                 }
8197                 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
8198                 return nativeResponseValue;
8199         }
8200         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8201         export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
8202                 if(!isWasmInitialized) {
8203                         throw new Error("initializeWasm() must be awaited first!");
8204                 }
8205                 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
8206                 return nativeResponseValue;
8207         }
8208         // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
8209         export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
8210                 if(!isWasmInitialized) {
8211                         throw new Error("initializeWasm() must be awaited first!");
8212                 }
8213                 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
8214                 // debug statements here
8215         }
8216         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8217         export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
8218                 if(!isWasmInitialized) {
8219                         throw new Error("initializeWasm() must be awaited first!");
8220                 }
8221                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
8222                 return nativeResponseValue;
8223         }
8224         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8225         export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
8226                 if(!isWasmInitialized) {
8227                         throw new Error("initializeWasm() must be awaited first!");
8228                 }
8229                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
8230                 return nativeResponseValue;
8231         }
8232         // 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);
8233         export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
8234                 if(!isWasmInitialized) {
8235                         throw new Error("initializeWasm() must be awaited first!");
8236                 }
8237                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
8238                 return nativeResponseValue;
8239         }
8240         // 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);
8241         export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
8242                 if(!isWasmInitialized) {
8243                         throw new Error("initializeWasm() must be awaited first!");
8244                 }
8245                 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
8246                 return nativeResponseValue;
8247         }
8248         // 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);
8249         export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
8250                 if(!isWasmInitialized) {
8251                         throw new Error("initializeWasm() must be awaited first!");
8252                 }
8253                 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
8254                 // debug statements here
8255         }
8256         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_transactions_confirmed(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
8257         export function ChannelMonitor_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
8258                 if(!isWasmInitialized) {
8259                         throw new Error("initializeWasm() must be awaited first!");
8260                 }
8261                 const nativeResponseValue = wasm.ChannelMonitor_transactions_confirmed(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
8262                 return nativeResponseValue;
8263         }
8264         // void ChannelMonitor_transaction_unconfirmed(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
8265         export function ChannelMonitor_transaction_unconfirmed(this_arg: number, txid: Uint8Array, broadcaster: number, fee_estimator: number, logger: number): void {
8266                 if(!isWasmInitialized) {
8267                         throw new Error("initializeWasm() must be awaited first!");
8268                 }
8269                 const nativeResponseValue = wasm.ChannelMonitor_transaction_unconfirmed(this_arg, encodeArray(txid), broadcaster, fee_estimator, logger);
8270                 // debug statements here
8271         }
8272         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_best_block_updated(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger logger);
8273         export function ChannelMonitor_best_block_updated(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
8274                 if(!isWasmInitialized) {
8275                         throw new Error("initializeWasm() must be awaited first!");
8276                 }
8277                 const nativeResponseValue = wasm.ChannelMonitor_best_block_updated(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
8278                 return nativeResponseValue;
8279         }
8280         // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8281         export function ChannelMonitor_get_relevant_txids(this_arg: number): Uint8Array[] {
8282                 if(!isWasmInitialized) {
8283                         throw new Error("initializeWasm() must be awaited first!");
8284                 }
8285                 const nativeResponseValue = wasm.ChannelMonitor_get_relevant_txids(this_arg);
8286                 return nativeResponseValue;
8287         }
8288         // MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8289         export function ChannelMonitor_current_best_block(this_arg: number): number {
8290                 if(!isWasmInitialized) {
8291                         throw new Error("initializeWasm() must be awaited first!");
8292                 }
8293                 const nativeResponseValue = wasm.ChannelMonitor_current_best_block(this_arg);
8294                 return nativeResponseValue;
8295         }
8296         // MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8297         export function ChannelMonitor_get_claimable_balances(this_arg: number): number[] {
8298                 if(!isWasmInitialized) {
8299                         throw new Error("initializeWasm() must be awaited first!");
8300                 }
8301                 const nativeResponseValue = wasm.ChannelMonitor_get_claimable_balances(this_arg);
8302                 return nativeResponseValue;
8303         }
8304         // void Persist_free(struct LDKPersist this_ptr);
8305         export function Persist_free(this_ptr: number): void {
8306                 if(!isWasmInitialized) {
8307                         throw new Error("initializeWasm() must be awaited first!");
8308                 }
8309                 const nativeResponseValue = wasm.Persist_free(this_ptr);
8310                 // debug statements here
8311         }
8312         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
8313         export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
8314                 if(!isWasmInitialized) {
8315                         throw new Error("initializeWasm() must be awaited first!");
8316                 }
8317                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
8318                 return nativeResponseValue;
8319         }
8320         // void OutPoint_free(struct LDKOutPoint this_obj);
8321         export function OutPoint_free(this_obj: number): void {
8322                 if(!isWasmInitialized) {
8323                         throw new Error("initializeWasm() must be awaited first!");
8324                 }
8325                 const nativeResponseValue = wasm.OutPoint_free(this_obj);
8326                 // debug statements here
8327         }
8328         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
8329         export function OutPoint_get_txid(this_ptr: number): Uint8Array {
8330                 if(!isWasmInitialized) {
8331                         throw new Error("initializeWasm() must be awaited first!");
8332                 }
8333                 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
8334                 return decodeArray(nativeResponseValue);
8335         }
8336         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8337         export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
8338                 if(!isWasmInitialized) {
8339                         throw new Error("initializeWasm() must be awaited first!");
8340                 }
8341                 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
8342                 // debug statements here
8343         }
8344         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
8345         export function OutPoint_get_index(this_ptr: number): number {
8346                 if(!isWasmInitialized) {
8347                         throw new Error("initializeWasm() must be awaited first!");
8348                 }
8349                 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
8350                 return nativeResponseValue;
8351         }
8352         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
8353         export function OutPoint_set_index(this_ptr: number, val: number): void {
8354                 if(!isWasmInitialized) {
8355                         throw new Error("initializeWasm() must be awaited first!");
8356                 }
8357                 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
8358                 // debug statements here
8359         }
8360         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
8361         export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
8362                 if(!isWasmInitialized) {
8363                         throw new Error("initializeWasm() must be awaited first!");
8364                 }
8365                 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
8366                 return nativeResponseValue;
8367         }
8368         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
8369         export function OutPoint_clone(orig: number): number {
8370                 if(!isWasmInitialized) {
8371                         throw new Error("initializeWasm() must be awaited first!");
8372                 }
8373                 const nativeResponseValue = wasm.OutPoint_clone(orig);
8374                 return nativeResponseValue;
8375         }
8376         // bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b);
8377         export function OutPoint_eq(a: number, b: number): boolean {
8378                 if(!isWasmInitialized) {
8379                         throw new Error("initializeWasm() must be awaited first!");
8380                 }
8381                 const nativeResponseValue = wasm.OutPoint_eq(a, b);
8382                 return nativeResponseValue;
8383         }
8384         // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
8385         export function OutPoint_hash(o: number): number {
8386                 if(!isWasmInitialized) {
8387                         throw new Error("initializeWasm() must be awaited first!");
8388                 }
8389                 const nativeResponseValue = wasm.OutPoint_hash(o);
8390                 return nativeResponseValue;
8391         }
8392         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
8393         export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
8394                 if(!isWasmInitialized) {
8395                         throw new Error("initializeWasm() must be awaited first!");
8396                 }
8397                 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
8398                 return decodeArray(nativeResponseValue);
8399         }
8400         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
8401         export function OutPoint_write(obj: number): Uint8Array {
8402                 if(!isWasmInitialized) {
8403                         throw new Error("initializeWasm() must be awaited first!");
8404                 }
8405                 const nativeResponseValue = wasm.OutPoint_write(obj);
8406                 return decodeArray(nativeResponseValue);
8407         }
8408         // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
8409         export function OutPoint_read(ser: Uint8Array): number {
8410                 if(!isWasmInitialized) {
8411                         throw new Error("initializeWasm() must be awaited first!");
8412                 }
8413                 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
8414                 return nativeResponseValue;
8415         }
8416         // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
8417         export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
8418                 if(!isWasmInitialized) {
8419                         throw new Error("initializeWasm() must be awaited first!");
8420                 }
8421                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
8422                 // debug statements here
8423         }
8424         // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8425         export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
8426                 if(!isWasmInitialized) {
8427                         throw new Error("initializeWasm() must be awaited first!");
8428                 }
8429                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
8430                 return nativeResponseValue;
8431         }
8432         // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
8433         export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
8434                 if(!isWasmInitialized) {
8435                         throw new Error("initializeWasm() must be awaited first!");
8436                 }
8437                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
8438                 // debug statements here
8439         }
8440         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8441         export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
8442                 if(!isWasmInitialized) {
8443                         throw new Error("initializeWasm() must be awaited first!");
8444                 }
8445                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
8446                 return decodeArray(nativeResponseValue);
8447         }
8448         // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8449         export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8450                 if(!isWasmInitialized) {
8451                         throw new Error("initializeWasm() must be awaited first!");
8452                 }
8453                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
8454                 // debug statements here
8455         }
8456         // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8457         export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
8458                 if(!isWasmInitialized) {
8459                         throw new Error("initializeWasm() must be awaited first!");
8460                 }
8461                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
8462                 return nativeResponseValue;
8463         }
8464         // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
8465         export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
8466                 if(!isWasmInitialized) {
8467                         throw new Error("initializeWasm() must be awaited first!");
8468                 }
8469                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
8470                 // debug statements here
8471         }
8472         // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
8473         export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
8474                 if(!isWasmInitialized) {
8475                         throw new Error("initializeWasm() must be awaited first!");
8476                 }
8477                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
8478                 // debug statements here
8479         }
8480         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8481         export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
8482                 if(!isWasmInitialized) {
8483                         throw new Error("initializeWasm() must be awaited first!");
8484                 }
8485                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
8486                 return decodeArray(nativeResponseValue);
8487         }
8488         // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8489         export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
8490                 if(!isWasmInitialized) {
8491                         throw new Error("initializeWasm() must be awaited first!");
8492                 }
8493                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
8494                 // debug statements here
8495         }
8496         // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
8497         export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
8498                 if(!isWasmInitialized) {
8499                         throw new Error("initializeWasm() must be awaited first!");
8500                 }
8501                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
8502                 return decodeArray(nativeResponseValue);
8503         }
8504         // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8505         export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
8506                 if(!isWasmInitialized) {
8507                         throw new Error("initializeWasm() must be awaited first!");
8508                 }
8509                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
8510                 // debug statements here
8511         }
8512         // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8513         export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
8514                 if(!isWasmInitialized) {
8515                         throw new Error("initializeWasm() must be awaited first!");
8516                 }
8517                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
8518                 return nativeResponseValue;
8519         }
8520         // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
8521         export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
8522                 if(!isWasmInitialized) {
8523                         throw new Error("initializeWasm() must be awaited first!");
8524                 }
8525                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
8526                 // debug statements here
8527         }
8528         // 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);
8529         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 {
8530                 if(!isWasmInitialized) {
8531                         throw new Error("initializeWasm() must be awaited first!");
8532                 }
8533                 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);
8534                 return nativeResponseValue;
8535         }
8536         // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
8537         export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
8538                 if(!isWasmInitialized) {
8539                         throw new Error("initializeWasm() must be awaited first!");
8540                 }
8541                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
8542                 return nativeResponseValue;
8543         }
8544         // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
8545         export function DelayedPaymentOutputDescriptor_write(obj: number): Uint8Array {
8546                 if(!isWasmInitialized) {
8547                         throw new Error("initializeWasm() must be awaited first!");
8548                 }
8549                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_write(obj);
8550                 return decodeArray(nativeResponseValue);
8551         }
8552         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
8553         export function DelayedPaymentOutputDescriptor_read(ser: Uint8Array): number {
8554                 if(!isWasmInitialized) {
8555                         throw new Error("initializeWasm() must be awaited first!");
8556                 }
8557                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_read(encodeArray(ser));
8558                 return nativeResponseValue;
8559         }
8560         // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
8561         export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
8562                 if(!isWasmInitialized) {
8563                         throw new Error("initializeWasm() must be awaited first!");
8564                 }
8565                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
8566                 // debug statements here
8567         }
8568         // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8569         export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
8570                 if(!isWasmInitialized) {
8571                         throw new Error("initializeWasm() must be awaited first!");
8572                 }
8573                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
8574                 return nativeResponseValue;
8575         }
8576         // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
8577         export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
8578                 if(!isWasmInitialized) {
8579                         throw new Error("initializeWasm() must be awaited first!");
8580                 }
8581                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
8582                 // debug statements here
8583         }
8584         // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
8585         export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
8586                 if(!isWasmInitialized) {
8587                         throw new Error("initializeWasm() must be awaited first!");
8588                 }
8589                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
8590                 // debug statements here
8591         }
8592         // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
8593         export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
8594                 if(!isWasmInitialized) {
8595                         throw new Error("initializeWasm() must be awaited first!");
8596                 }
8597                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
8598                 return decodeArray(nativeResponseValue);
8599         }
8600         // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8601         export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
8602                 if(!isWasmInitialized) {
8603                         throw new Error("initializeWasm() must be awaited first!");
8604                 }
8605                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
8606                 // debug statements here
8607         }
8608         // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8609         export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
8610                 if(!isWasmInitialized) {
8611                         throw new Error("initializeWasm() must be awaited first!");
8612                 }
8613                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
8614                 return nativeResponseValue;
8615         }
8616         // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
8617         export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
8618                 if(!isWasmInitialized) {
8619                         throw new Error("initializeWasm() must be awaited first!");
8620                 }
8621                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
8622                 // debug statements here
8623         }
8624         // 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);
8625         export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
8626                 if(!isWasmInitialized) {
8627                         throw new Error("initializeWasm() must be awaited first!");
8628                 }
8629                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
8630                 return nativeResponseValue;
8631         }
8632         // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
8633         export function StaticPaymentOutputDescriptor_clone(orig: number): number {
8634                 if(!isWasmInitialized) {
8635                         throw new Error("initializeWasm() must be awaited first!");
8636                 }
8637                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
8638                 return nativeResponseValue;
8639         }
8640         // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
8641         export function StaticPaymentOutputDescriptor_write(obj: number): Uint8Array {
8642                 if(!isWasmInitialized) {
8643                         throw new Error("initializeWasm() must be awaited first!");
8644                 }
8645                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_write(obj);
8646                 return decodeArray(nativeResponseValue);
8647         }
8648         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
8649         export function StaticPaymentOutputDescriptor_read(ser: Uint8Array): number {
8650                 if(!isWasmInitialized) {
8651                         throw new Error("initializeWasm() must be awaited first!");
8652                 }
8653                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_read(encodeArray(ser));
8654                 return nativeResponseValue;
8655         }
8656         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
8657         export function SpendableOutputDescriptor_free(this_ptr: number): void {
8658                 if(!isWasmInitialized) {
8659                         throw new Error("initializeWasm() must be awaited first!");
8660                 }
8661                 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
8662                 // debug statements here
8663         }
8664         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
8665         export function SpendableOutputDescriptor_clone(orig: number): number {
8666                 if(!isWasmInitialized) {
8667                         throw new Error("initializeWasm() must be awaited first!");
8668                 }
8669                 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
8670                 return nativeResponseValue;
8671         }
8672         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output);
8673         export function SpendableOutputDescriptor_static_output(outpoint: number, output: number): number {
8674                 if(!isWasmInitialized) {
8675                         throw new Error("initializeWasm() must be awaited first!");
8676                 }
8677                 const nativeResponseValue = wasm.SpendableOutputDescriptor_static_output(outpoint, output);
8678                 return nativeResponseValue;
8679         }
8680         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
8681         export function SpendableOutputDescriptor_delayed_payment_output(a: number): number {
8682                 if(!isWasmInitialized) {
8683                         throw new Error("initializeWasm() must be awaited first!");
8684                 }
8685                 const nativeResponseValue = wasm.SpendableOutputDescriptor_delayed_payment_output(a);
8686                 return nativeResponseValue;
8687         }
8688         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
8689         export function SpendableOutputDescriptor_static_payment_output(a: number): number {
8690                 if(!isWasmInitialized) {
8691                         throw new Error("initializeWasm() must be awaited first!");
8692                 }
8693                 const nativeResponseValue = wasm.SpendableOutputDescriptor_static_payment_output(a);
8694                 return nativeResponseValue;
8695         }
8696         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
8697         export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
8698                 if(!isWasmInitialized) {
8699                         throw new Error("initializeWasm() must be awaited first!");
8700                 }
8701                 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
8702                 return decodeArray(nativeResponseValue);
8703         }
8704         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
8705         export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
8706                 if(!isWasmInitialized) {
8707                         throw new Error("initializeWasm() must be awaited first!");
8708                 }
8709                 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
8710                 return nativeResponseValue;
8711         }
8712         // void BaseSign_free(struct LDKBaseSign this_ptr);
8713         export function BaseSign_free(this_ptr: number): void {
8714                 if(!isWasmInitialized) {
8715                         throw new Error("initializeWasm() must be awaited first!");
8716                 }
8717                 const nativeResponseValue = wasm.BaseSign_free(this_ptr);
8718                 // debug statements here
8719         }
8720         // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
8721         export function Sign_clone(orig: number): number {
8722                 if(!isWasmInitialized) {
8723                         throw new Error("initializeWasm() must be awaited first!");
8724                 }
8725                 const nativeResponseValue = wasm.Sign_clone(orig);
8726                 return nativeResponseValue;
8727         }
8728         // void Sign_free(struct LDKSign this_ptr);
8729         export function Sign_free(this_ptr: number): void {
8730                 if(!isWasmInitialized) {
8731                         throw new Error("initializeWasm() must be awaited first!");
8732                 }
8733                 const nativeResponseValue = wasm.Sign_free(this_ptr);
8734                 // debug statements here
8735         }
8736         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
8737         export function KeysInterface_free(this_ptr: number): void {
8738                 if(!isWasmInitialized) {
8739                         throw new Error("initializeWasm() must be awaited first!");
8740                 }
8741                 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
8742                 // debug statements here
8743         }
8744         // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
8745         export function InMemorySigner_free(this_obj: number): void {
8746                 if(!isWasmInitialized) {
8747                         throw new Error("initializeWasm() must be awaited first!");
8748                 }
8749                 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
8750                 // debug statements here
8751         }
8752         // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
8753         export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
8754                 if(!isWasmInitialized) {
8755                         throw new Error("initializeWasm() must be awaited first!");
8756                 }
8757                 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
8758                 return decodeArray(nativeResponseValue);
8759         }
8760         // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
8761         export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
8762                 if(!isWasmInitialized) {
8763                         throw new Error("initializeWasm() must be awaited first!");
8764                 }
8765                 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
8766                 // debug statements here
8767         }
8768         // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
8769         export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
8770                 if(!isWasmInitialized) {
8771                         throw new Error("initializeWasm() must be awaited first!");
8772                 }
8773                 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
8774                 return decodeArray(nativeResponseValue);
8775         }
8776         // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
8777         export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
8778                 if(!isWasmInitialized) {
8779                         throw new Error("initializeWasm() must be awaited first!");
8780                 }
8781                 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
8782                 // debug statements here
8783         }
8784         // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
8785         export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
8786                 if(!isWasmInitialized) {
8787                         throw new Error("initializeWasm() must be awaited first!");
8788                 }
8789                 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
8790                 return decodeArray(nativeResponseValue);
8791         }
8792         // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
8793         export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
8794                 if(!isWasmInitialized) {
8795                         throw new Error("initializeWasm() must be awaited first!");
8796                 }
8797                 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
8798                 // debug statements here
8799         }
8800         // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
8801         export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
8802                 if(!isWasmInitialized) {
8803                         throw new Error("initializeWasm() must be awaited first!");
8804                 }
8805                 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
8806                 return decodeArray(nativeResponseValue);
8807         }
8808         // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
8809         export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
8810                 if(!isWasmInitialized) {
8811                         throw new Error("initializeWasm() must be awaited first!");
8812                 }
8813                 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
8814                 // debug statements here
8815         }
8816         // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
8817         export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
8818                 if(!isWasmInitialized) {
8819                         throw new Error("initializeWasm() must be awaited first!");
8820                 }
8821                 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
8822                 return decodeArray(nativeResponseValue);
8823         }
8824         // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
8825         export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
8826                 if(!isWasmInitialized) {
8827                         throw new Error("initializeWasm() must be awaited first!");
8828                 }
8829                 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
8830                 // debug statements here
8831         }
8832         // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
8833         export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
8834                 if(!isWasmInitialized) {
8835                         throw new Error("initializeWasm() must be awaited first!");
8836                 }
8837                 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
8838                 return decodeArray(nativeResponseValue);
8839         }
8840         // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8841         export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
8842                 if(!isWasmInitialized) {
8843                         throw new Error("initializeWasm() must be awaited first!");
8844                 }
8845                 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
8846                 // debug statements here
8847         }
8848         // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
8849         export function InMemorySigner_clone(orig: number): number {
8850                 if(!isWasmInitialized) {
8851                         throw new Error("initializeWasm() must be awaited first!");
8852                 }
8853                 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
8854                 return nativeResponseValue;
8855         }
8856         // 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);
8857         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 {
8858                 if(!isWasmInitialized) {
8859                         throw new Error("initializeWasm() must be awaited first!");
8860                 }
8861                 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));
8862                 return nativeResponseValue;
8863         }
8864         // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8865         export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
8866                 if(!isWasmInitialized) {
8867                         throw new Error("initializeWasm() must be awaited first!");
8868                 }
8869                 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
8870                 return nativeResponseValue;
8871         }
8872         // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8873         export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
8874                 if(!isWasmInitialized) {
8875                         throw new Error("initializeWasm() must be awaited first!");
8876                 }
8877                 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
8878                 return nativeResponseValue;
8879         }
8880         // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8881         export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
8882                 if(!isWasmInitialized) {
8883                         throw new Error("initializeWasm() must be awaited first!");
8884                 }
8885                 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
8886                 return nativeResponseValue;
8887         }
8888         // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8889         export function InMemorySigner_is_outbound(this_arg: number): boolean {
8890                 if(!isWasmInitialized) {
8891                         throw new Error("initializeWasm() must be awaited first!");
8892                 }
8893                 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
8894                 return nativeResponseValue;
8895         }
8896         // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8897         export function InMemorySigner_funding_outpoint(this_arg: number): number {
8898                 if(!isWasmInitialized) {
8899                         throw new Error("initializeWasm() must be awaited first!");
8900                 }
8901                 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
8902                 return nativeResponseValue;
8903         }
8904         // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8905         export function InMemorySigner_get_channel_parameters(this_arg: number): number {
8906                 if(!isWasmInitialized) {
8907                         throw new Error("initializeWasm() must be awaited first!");
8908                 }
8909                 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
8910                 return nativeResponseValue;
8911         }
8912         // 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);
8913         export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
8914                 if(!isWasmInitialized) {
8915                         throw new Error("initializeWasm() must be awaited first!");
8916                 }
8917                 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
8918                 return nativeResponseValue;
8919         }
8920         // 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);
8921         export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
8922                 if(!isWasmInitialized) {
8923                         throw new Error("initializeWasm() must be awaited first!");
8924                 }
8925                 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
8926                 return nativeResponseValue;
8927         }
8928         // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8929         export function InMemorySigner_as_BaseSign(this_arg: number): number {
8930                 if(!isWasmInitialized) {
8931                         throw new Error("initializeWasm() must be awaited first!");
8932                 }
8933                 const nativeResponseValue = wasm.InMemorySigner_as_BaseSign(this_arg);
8934                 return nativeResponseValue;
8935         }
8936         // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
8937         export function InMemorySigner_as_Sign(this_arg: number): number {
8938                 if(!isWasmInitialized) {
8939                         throw new Error("initializeWasm() must be awaited first!");
8940                 }
8941                 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
8942                 return nativeResponseValue;
8943         }
8944         // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
8945         export function InMemorySigner_write(obj: number): Uint8Array {
8946                 if(!isWasmInitialized) {
8947                         throw new Error("initializeWasm() must be awaited first!");
8948                 }
8949                 const nativeResponseValue = wasm.InMemorySigner_write(obj);
8950                 return decodeArray(nativeResponseValue);
8951         }
8952         // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
8953         export function InMemorySigner_read(ser: Uint8Array): number {
8954                 if(!isWasmInitialized) {
8955                         throw new Error("initializeWasm() must be awaited first!");
8956                 }
8957                 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
8958                 return nativeResponseValue;
8959         }
8960         // void KeysManager_free(struct LDKKeysManager this_obj);
8961         export function KeysManager_free(this_obj: number): void {
8962                 if(!isWasmInitialized) {
8963                         throw new Error("initializeWasm() must be awaited first!");
8964                 }
8965                 const nativeResponseValue = wasm.KeysManager_free(this_obj);
8966                 // debug statements here
8967         }
8968         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
8969         export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
8970                 if(!isWasmInitialized) {
8971                         throw new Error("initializeWasm() must be awaited first!");
8972                 }
8973                 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
8974                 return nativeResponseValue;
8975         }
8976         // 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]);
8977         export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
8978                 if(!isWasmInitialized) {
8979                         throw new Error("initializeWasm() must be awaited first!");
8980                 }
8981                 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
8982                 return nativeResponseValue;
8983         }
8984         // 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);
8985         export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
8986                 if(!isWasmInitialized) {
8987                         throw new Error("initializeWasm() must be awaited first!");
8988                 }
8989                 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
8990                 return nativeResponseValue;
8991         }
8992         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
8993         export function KeysManager_as_KeysInterface(this_arg: number): number {
8994                 if(!isWasmInitialized) {
8995                         throw new Error("initializeWasm() must be awaited first!");
8996                 }
8997                 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
8998                 return nativeResponseValue;
8999         }
9000         // void ChannelManager_free(struct LDKChannelManager this_obj);
9001         export function ChannelManager_free(this_obj: number): void {
9002                 if(!isWasmInitialized) {
9003                         throw new Error("initializeWasm() must be awaited first!");
9004                 }
9005                 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
9006                 // debug statements here
9007         }
9008         // void ChainParameters_free(struct LDKChainParameters this_obj);
9009         export function ChainParameters_free(this_obj: number): void {
9010                 if(!isWasmInitialized) {
9011                         throw new Error("initializeWasm() must be awaited first!");
9012                 }
9013                 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
9014                 // debug statements here
9015         }
9016         // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
9017         export function ChainParameters_get_network(this_ptr: number): Network {
9018                 if(!isWasmInitialized) {
9019                         throw new Error("initializeWasm() must be awaited first!");
9020                 }
9021                 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
9022                 return nativeResponseValue;
9023         }
9024         // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
9025         export function ChainParameters_set_network(this_ptr: number, val: Network): void {
9026                 if(!isWasmInitialized) {
9027                         throw new Error("initializeWasm() must be awaited first!");
9028                 }
9029                 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
9030                 // debug statements here
9031         }
9032         // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
9033         export function ChainParameters_get_best_block(this_ptr: number): number {
9034                 if(!isWasmInitialized) {
9035                         throw new Error("initializeWasm() must be awaited first!");
9036                 }
9037                 const nativeResponseValue = wasm.ChainParameters_get_best_block(this_ptr);
9038                 return nativeResponseValue;
9039         }
9040         // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
9041         export function ChainParameters_set_best_block(this_ptr: number, val: number): void {
9042                 if(!isWasmInitialized) {
9043                         throw new Error("initializeWasm() must be awaited first!");
9044                 }
9045                 const nativeResponseValue = wasm.ChainParameters_set_best_block(this_ptr, val);
9046                 // debug statements here
9047         }
9048         // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
9049         export function ChainParameters_new(network_arg: Network, best_block_arg: number): number {
9050                 if(!isWasmInitialized) {
9051                         throw new Error("initializeWasm() must be awaited first!");
9052                 }
9053                 const nativeResponseValue = wasm.ChainParameters_new(network_arg, best_block_arg);
9054                 return nativeResponseValue;
9055         }
9056         // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
9057         export function ChainParameters_clone(orig: number): number {
9058                 if(!isWasmInitialized) {
9059                         throw new Error("initializeWasm() must be awaited first!");
9060                 }
9061                 const nativeResponseValue = wasm.ChainParameters_clone(orig);
9062                 return nativeResponseValue;
9063         }
9064         // void CounterpartyForwardingInfo_free(struct LDKCounterpartyForwardingInfo this_obj);
9065         export function CounterpartyForwardingInfo_free(this_obj: number): void {
9066                 if(!isWasmInitialized) {
9067                         throw new Error("initializeWasm() must be awaited first!");
9068                 }
9069                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_free(this_obj);
9070                 // debug statements here
9071         }
9072         // uint32_t CounterpartyForwardingInfo_get_fee_base_msat(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
9073         export function CounterpartyForwardingInfo_get_fee_base_msat(this_ptr: number): number {
9074                 if(!isWasmInitialized) {
9075                         throw new Error("initializeWasm() must be awaited first!");
9076                 }
9077                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_fee_base_msat(this_ptr);
9078                 return nativeResponseValue;
9079         }
9080         // void CounterpartyForwardingInfo_set_fee_base_msat(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
9081         export function CounterpartyForwardingInfo_set_fee_base_msat(this_ptr: number, val: number): void {
9082                 if(!isWasmInitialized) {
9083                         throw new Error("initializeWasm() must be awaited first!");
9084                 }
9085                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_fee_base_msat(this_ptr, val);
9086                 // debug statements here
9087         }
9088         // uint32_t CounterpartyForwardingInfo_get_fee_proportional_millionths(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
9089         export function CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr: number): number {
9090                 if(!isWasmInitialized) {
9091                         throw new Error("initializeWasm() must be awaited first!");
9092                 }
9093                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr);
9094                 return nativeResponseValue;
9095         }
9096         // void CounterpartyForwardingInfo_set_fee_proportional_millionths(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
9097         export function CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr: number, val: number): void {
9098                 if(!isWasmInitialized) {
9099                         throw new Error("initializeWasm() must be awaited first!");
9100                 }
9101                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr, val);
9102                 // debug statements here
9103         }
9104         // uint16_t CounterpartyForwardingInfo_get_cltv_expiry_delta(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
9105         export function CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr: number): number {
9106                 if(!isWasmInitialized) {
9107                         throw new Error("initializeWasm() must be awaited first!");
9108                 }
9109                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr);
9110                 return nativeResponseValue;
9111         }
9112         // void CounterpartyForwardingInfo_set_cltv_expiry_delta(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint16_t val);
9113         export function CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
9114                 if(!isWasmInitialized) {
9115                         throw new Error("initializeWasm() must be awaited first!");
9116                 }
9117                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr, val);
9118                 // debug statements here
9119         }
9120         // MUST_USE_RES struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_new(uint32_t fee_base_msat_arg, uint32_t fee_proportional_millionths_arg, uint16_t cltv_expiry_delta_arg);
9121         export function CounterpartyForwardingInfo_new(fee_base_msat_arg: number, fee_proportional_millionths_arg: number, cltv_expiry_delta_arg: number): number {
9122                 if(!isWasmInitialized) {
9123                         throw new Error("initializeWasm() must be awaited first!");
9124                 }
9125                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg);
9126                 return nativeResponseValue;
9127         }
9128         // struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_clone(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR orig);
9129         export function CounterpartyForwardingInfo_clone(orig: number): number {
9130                 if(!isWasmInitialized) {
9131                         throw new Error("initializeWasm() must be awaited first!");
9132                 }
9133                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_clone(orig);
9134                 return nativeResponseValue;
9135         }
9136         // void ChannelCounterparty_free(struct LDKChannelCounterparty this_obj);
9137         export function ChannelCounterparty_free(this_obj: number): void {
9138                 if(!isWasmInitialized) {
9139                         throw new Error("initializeWasm() must be awaited first!");
9140                 }
9141                 const nativeResponseValue = wasm.ChannelCounterparty_free(this_obj);
9142                 // debug statements here
9143         }
9144         // struct LDKPublicKey ChannelCounterparty_get_node_id(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
9145         export function ChannelCounterparty_get_node_id(this_ptr: number): Uint8Array {
9146                 if(!isWasmInitialized) {
9147                         throw new Error("initializeWasm() must be awaited first!");
9148                 }
9149                 const nativeResponseValue = wasm.ChannelCounterparty_get_node_id(this_ptr);
9150                 return decodeArray(nativeResponseValue);
9151         }
9152         // void ChannelCounterparty_set_node_id(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9153         export function ChannelCounterparty_set_node_id(this_ptr: number, val: Uint8Array): void {
9154                 if(!isWasmInitialized) {
9155                         throw new Error("initializeWasm() must be awaited first!");
9156                 }
9157                 const nativeResponseValue = wasm.ChannelCounterparty_set_node_id(this_ptr, encodeArray(val));
9158                 // debug statements here
9159         }
9160         // struct LDKInitFeatures ChannelCounterparty_get_features(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
9161         export function ChannelCounterparty_get_features(this_ptr: number): number {
9162                 if(!isWasmInitialized) {
9163                         throw new Error("initializeWasm() must be awaited first!");
9164                 }
9165                 const nativeResponseValue = wasm.ChannelCounterparty_get_features(this_ptr);
9166                 return nativeResponseValue;
9167         }
9168         // void ChannelCounterparty_set_features(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
9169         export function ChannelCounterparty_set_features(this_ptr: number, val: number): void {
9170                 if(!isWasmInitialized) {
9171                         throw new Error("initializeWasm() must be awaited first!");
9172                 }
9173                 const nativeResponseValue = wasm.ChannelCounterparty_set_features(this_ptr, val);
9174                 // debug statements here
9175         }
9176         // uint64_t ChannelCounterparty_get_unspendable_punishment_reserve(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
9177         export function ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr: number): number {
9178                 if(!isWasmInitialized) {
9179                         throw new Error("initializeWasm() must be awaited first!");
9180                 }
9181                 const nativeResponseValue = wasm.ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr);
9182                 return nativeResponseValue;
9183         }
9184         // void ChannelCounterparty_set_unspendable_punishment_reserve(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, uint64_t val);
9185         export function ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
9186                 if(!isWasmInitialized) {
9187                         throw new Error("initializeWasm() must be awaited first!");
9188                 }
9189                 const nativeResponseValue = wasm.ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr, val);
9190                 // debug statements here
9191         }
9192         // struct LDKCounterpartyForwardingInfo ChannelCounterparty_get_forwarding_info(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
9193         export function ChannelCounterparty_get_forwarding_info(this_ptr: number): number {
9194                 if(!isWasmInitialized) {
9195                         throw new Error("initializeWasm() must be awaited first!");
9196                 }
9197                 const nativeResponseValue = wasm.ChannelCounterparty_get_forwarding_info(this_ptr);
9198                 return nativeResponseValue;
9199         }
9200         // void ChannelCounterparty_set_forwarding_info(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKCounterpartyForwardingInfo val);
9201         export function ChannelCounterparty_set_forwarding_info(this_ptr: number, val: number): void {
9202                 if(!isWasmInitialized) {
9203                         throw new Error("initializeWasm() must be awaited first!");
9204                 }
9205                 const nativeResponseValue = wasm.ChannelCounterparty_set_forwarding_info(this_ptr, val);
9206                 // debug statements here
9207         }
9208         // MUST_USE_RES struct LDKChannelCounterparty ChannelCounterparty_new(struct LDKPublicKey node_id_arg, struct LDKInitFeatures features_arg, uint64_t unspendable_punishment_reserve_arg, struct LDKCounterpartyForwardingInfo forwarding_info_arg);
9209         export function ChannelCounterparty_new(node_id_arg: Uint8Array, features_arg: number, unspendable_punishment_reserve_arg: number, forwarding_info_arg: number): number {
9210                 if(!isWasmInitialized) {
9211                         throw new Error("initializeWasm() must be awaited first!");
9212                 }
9213                 const nativeResponseValue = wasm.ChannelCounterparty_new(encodeArray(node_id_arg), features_arg, unspendable_punishment_reserve_arg, forwarding_info_arg);
9214                 return nativeResponseValue;
9215         }
9216         // struct LDKChannelCounterparty ChannelCounterparty_clone(const struct LDKChannelCounterparty *NONNULL_PTR orig);
9217         export function ChannelCounterparty_clone(orig: number): number {
9218                 if(!isWasmInitialized) {
9219                         throw new Error("initializeWasm() must be awaited first!");
9220                 }
9221                 const nativeResponseValue = wasm.ChannelCounterparty_clone(orig);
9222                 return nativeResponseValue;
9223         }
9224         // void ChannelDetails_free(struct LDKChannelDetails this_obj);
9225         export function ChannelDetails_free(this_obj: number): void {
9226                 if(!isWasmInitialized) {
9227                         throw new Error("initializeWasm() must be awaited first!");
9228                 }
9229                 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
9230                 // debug statements here
9231         }
9232         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
9233         export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
9234                 if(!isWasmInitialized) {
9235                         throw new Error("initializeWasm() must be awaited first!");
9236                 }
9237                 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
9238                 return decodeArray(nativeResponseValue);
9239         }
9240         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9241         export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
9242                 if(!isWasmInitialized) {
9243                         throw new Error("initializeWasm() must be awaited first!");
9244                 }
9245                 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
9246                 // debug statements here
9247         }
9248         // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9249         export function ChannelDetails_get_counterparty(this_ptr: number): number {
9250                 if(!isWasmInitialized) {
9251                         throw new Error("initializeWasm() must be awaited first!");
9252                 }
9253                 const nativeResponseValue = wasm.ChannelDetails_get_counterparty(this_ptr);
9254                 return nativeResponseValue;
9255         }
9256         // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
9257         export function ChannelDetails_set_counterparty(this_ptr: number, val: number): void {
9258                 if(!isWasmInitialized) {
9259                         throw new Error("initializeWasm() must be awaited first!");
9260                 }
9261                 const nativeResponseValue = wasm.ChannelDetails_set_counterparty(this_ptr, val);
9262                 // debug statements here
9263         }
9264         // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9265         export function ChannelDetails_get_funding_txo(this_ptr: number): number {
9266                 if(!isWasmInitialized) {
9267                         throw new Error("initializeWasm() must be awaited first!");
9268                 }
9269                 const nativeResponseValue = wasm.ChannelDetails_get_funding_txo(this_ptr);
9270                 return nativeResponseValue;
9271         }
9272         // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
9273         export function ChannelDetails_set_funding_txo(this_ptr: number, val: number): void {
9274                 if(!isWasmInitialized) {
9275                         throw new Error("initializeWasm() must be awaited first!");
9276                 }
9277                 const nativeResponseValue = wasm.ChannelDetails_set_funding_txo(this_ptr, val);
9278                 // debug statements here
9279         }
9280         // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9281         export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
9282                 if(!isWasmInitialized) {
9283                         throw new Error("initializeWasm() must be awaited first!");
9284                 }
9285                 const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
9286                 return nativeResponseValue;
9287         }
9288         // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
9289         export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
9290                 if(!isWasmInitialized) {
9291                         throw new Error("initializeWasm() must be awaited first!");
9292                 }
9293                 const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
9294                 // debug statements here
9295         }
9296         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9297         export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
9298                 if(!isWasmInitialized) {
9299                         throw new Error("initializeWasm() must be awaited first!");
9300                 }
9301                 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
9302                 return nativeResponseValue;
9303         }
9304         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
9305         export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
9306                 if(!isWasmInitialized) {
9307                         throw new Error("initializeWasm() must be awaited first!");
9308                 }
9309                 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
9310                 // debug statements here
9311         }
9312         // struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9313         export function ChannelDetails_get_unspendable_punishment_reserve(this_ptr: number): number {
9314                 if(!isWasmInitialized) {
9315                         throw new Error("initializeWasm() must be awaited first!");
9316                 }
9317                 const nativeResponseValue = wasm.ChannelDetails_get_unspendable_punishment_reserve(this_ptr);
9318                 return nativeResponseValue;
9319         }
9320         // void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
9321         export function ChannelDetails_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
9322                 if(!isWasmInitialized) {
9323                         throw new Error("initializeWasm() must be awaited first!");
9324                 }
9325                 const nativeResponseValue = wasm.ChannelDetails_set_unspendable_punishment_reserve(this_ptr, val);
9326                 // debug statements here
9327         }
9328         // uint64_t ChannelDetails_get_user_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9329         export function ChannelDetails_get_user_id(this_ptr: number): number {
9330                 if(!isWasmInitialized) {
9331                         throw new Error("initializeWasm() must be awaited first!");
9332                 }
9333                 const nativeResponseValue = wasm.ChannelDetails_get_user_id(this_ptr);
9334                 return nativeResponseValue;
9335         }
9336         // void ChannelDetails_set_user_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
9337         export function ChannelDetails_set_user_id(this_ptr: number, val: number): void {
9338                 if(!isWasmInitialized) {
9339                         throw new Error("initializeWasm() must be awaited first!");
9340                 }
9341                 const nativeResponseValue = wasm.ChannelDetails_set_user_id(this_ptr, val);
9342                 // debug statements here
9343         }
9344         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9345         export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
9346                 if(!isWasmInitialized) {
9347                         throw new Error("initializeWasm() must be awaited first!");
9348                 }
9349                 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
9350                 return nativeResponseValue;
9351         }
9352         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
9353         export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
9354                 if(!isWasmInitialized) {
9355                         throw new Error("initializeWasm() must be awaited first!");
9356                 }
9357                 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
9358                 // debug statements here
9359         }
9360         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9361         export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
9362                 if(!isWasmInitialized) {
9363                         throw new Error("initializeWasm() must be awaited first!");
9364                 }
9365                 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
9366                 return nativeResponseValue;
9367         }
9368         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
9369         export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
9370                 if(!isWasmInitialized) {
9371                         throw new Error("initializeWasm() must be awaited first!");
9372                 }
9373                 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
9374                 // debug statements here
9375         }
9376         // struct LDKCOption_u32Z ChannelDetails_get_confirmations_required(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9377         export function ChannelDetails_get_confirmations_required(this_ptr: number): number {
9378                 if(!isWasmInitialized) {
9379                         throw new Error("initializeWasm() must be awaited first!");
9380                 }
9381                 const nativeResponseValue = wasm.ChannelDetails_get_confirmations_required(this_ptr);
9382                 return nativeResponseValue;
9383         }
9384         // void ChannelDetails_set_confirmations_required(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
9385         export function ChannelDetails_set_confirmations_required(this_ptr: number, val: number): void {
9386                 if(!isWasmInitialized) {
9387                         throw new Error("initializeWasm() must be awaited first!");
9388                 }
9389                 const nativeResponseValue = wasm.ChannelDetails_set_confirmations_required(this_ptr, val);
9390                 // debug statements here
9391         }
9392         // struct LDKCOption_u16Z ChannelDetails_get_force_close_spend_delay(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9393         export function ChannelDetails_get_force_close_spend_delay(this_ptr: number): number {
9394                 if(!isWasmInitialized) {
9395                         throw new Error("initializeWasm() must be awaited first!");
9396                 }
9397                 const nativeResponseValue = wasm.ChannelDetails_get_force_close_spend_delay(this_ptr);
9398                 return nativeResponseValue;
9399         }
9400         // void ChannelDetails_set_force_close_spend_delay(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
9401         export function ChannelDetails_set_force_close_spend_delay(this_ptr: number, val: number): void {
9402                 if(!isWasmInitialized) {
9403                         throw new Error("initializeWasm() must be awaited first!");
9404                 }
9405                 const nativeResponseValue = wasm.ChannelDetails_set_force_close_spend_delay(this_ptr, val);
9406                 // debug statements here
9407         }
9408         // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9409         export function ChannelDetails_get_is_outbound(this_ptr: number): boolean {
9410                 if(!isWasmInitialized) {
9411                         throw new Error("initializeWasm() must be awaited first!");
9412                 }
9413                 const nativeResponseValue = wasm.ChannelDetails_get_is_outbound(this_ptr);
9414                 return nativeResponseValue;
9415         }
9416         // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
9417         export function ChannelDetails_set_is_outbound(this_ptr: number, val: boolean): void {
9418                 if(!isWasmInitialized) {
9419                         throw new Error("initializeWasm() must be awaited first!");
9420                 }
9421                 const nativeResponseValue = wasm.ChannelDetails_set_is_outbound(this_ptr, val);
9422                 // debug statements here
9423         }
9424         // bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9425         export function ChannelDetails_get_is_funding_locked(this_ptr: number): boolean {
9426                 if(!isWasmInitialized) {
9427                         throw new Error("initializeWasm() must be awaited first!");
9428                 }
9429                 const nativeResponseValue = wasm.ChannelDetails_get_is_funding_locked(this_ptr);
9430                 return nativeResponseValue;
9431         }
9432         // void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
9433         export function ChannelDetails_set_is_funding_locked(this_ptr: number, val: boolean): void {
9434                 if(!isWasmInitialized) {
9435                         throw new Error("initializeWasm() must be awaited first!");
9436                 }
9437                 const nativeResponseValue = wasm.ChannelDetails_set_is_funding_locked(this_ptr, val);
9438                 // debug statements here
9439         }
9440         // bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9441         export function ChannelDetails_get_is_usable(this_ptr: number): boolean {
9442                 if(!isWasmInitialized) {
9443                         throw new Error("initializeWasm() must be awaited first!");
9444                 }
9445                 const nativeResponseValue = wasm.ChannelDetails_get_is_usable(this_ptr);
9446                 return nativeResponseValue;
9447         }
9448         // void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
9449         export function ChannelDetails_set_is_usable(this_ptr: number, val: boolean): void {
9450                 if(!isWasmInitialized) {
9451                         throw new Error("initializeWasm() must be awaited first!");
9452                 }
9453                 const nativeResponseValue = wasm.ChannelDetails_set_is_usable(this_ptr, val);
9454                 // debug statements here
9455         }
9456         // bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9457         export function ChannelDetails_get_is_public(this_ptr: number): boolean {
9458                 if(!isWasmInitialized) {
9459                         throw new Error("initializeWasm() must be awaited first!");
9460                 }
9461                 const nativeResponseValue = wasm.ChannelDetails_get_is_public(this_ptr);
9462                 return nativeResponseValue;
9463         }
9464         // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
9465         export function ChannelDetails_set_is_public(this_ptr: number, val: boolean): void {
9466                 if(!isWasmInitialized) {
9467                         throw new Error("initializeWasm() must be awaited first!");
9468                 }
9469                 const nativeResponseValue = wasm.ChannelDetails_set_is_public(this_ptr, val);
9470                 // debug statements here
9471         }
9472         // MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKChannelCounterparty counterparty_arg, struct LDKOutPoint funding_txo_arg, struct LDKCOption_u64Z short_channel_id_arg, uint64_t channel_value_satoshis_arg, struct LDKCOption_u64Z unspendable_punishment_reserve_arg, uint64_t user_id_arg, uint64_t outbound_capacity_msat_arg, uint64_t inbound_capacity_msat_arg, struct LDKCOption_u32Z confirmations_required_arg, struct LDKCOption_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_funding_locked_arg, bool is_usable_arg, bool is_public_arg);
9473         export function ChannelDetails_new(channel_id_arg: Uint8Array, counterparty_arg: number, funding_txo_arg: number, short_channel_id_arg: number, channel_value_satoshis_arg: number, unspendable_punishment_reserve_arg: number, user_id_arg: number, outbound_capacity_msat_arg: number, inbound_capacity_msat_arg: number, confirmations_required_arg: number, force_close_spend_delay_arg: number, is_outbound_arg: boolean, is_funding_locked_arg: boolean, is_usable_arg: boolean, is_public_arg: boolean): number {
9474                 if(!isWasmInitialized) {
9475                         throw new Error("initializeWasm() must be awaited first!");
9476                 }
9477                 const nativeResponseValue = wasm.ChannelDetails_new(encodeArray(channel_id_arg), counterparty_arg, funding_txo_arg, short_channel_id_arg, channel_value_satoshis_arg, unspendable_punishment_reserve_arg, user_id_arg, outbound_capacity_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg, force_close_spend_delay_arg, is_outbound_arg, is_funding_locked_arg, is_usable_arg, is_public_arg);
9478                 return nativeResponseValue;
9479         }
9480         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
9481         export function ChannelDetails_clone(orig: number): number {
9482                 if(!isWasmInitialized) {
9483                         throw new Error("initializeWasm() must be awaited first!");
9484                 }
9485                 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
9486                 return nativeResponseValue;
9487         }
9488         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
9489         export function PaymentSendFailure_free(this_ptr: number): void {
9490                 if(!isWasmInitialized) {
9491                         throw new Error("initializeWasm() must be awaited first!");
9492                 }
9493                 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
9494                 // debug statements here
9495         }
9496         // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
9497         export function PaymentSendFailure_clone(orig: number): number {
9498                 if(!isWasmInitialized) {
9499                         throw new Error("initializeWasm() must be awaited first!");
9500                 }
9501                 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
9502                 return nativeResponseValue;
9503         }
9504         // struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
9505         export function PaymentSendFailure_parameter_error(a: number): number {
9506                 if(!isWasmInitialized) {
9507                         throw new Error("initializeWasm() must be awaited first!");
9508                 }
9509                 const nativeResponseValue = wasm.PaymentSendFailure_parameter_error(a);
9510                 return nativeResponseValue;
9511         }
9512         // struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
9513         export function PaymentSendFailure_path_parameter_error(a: number[]): number {
9514                 if(!isWasmInitialized) {
9515                         throw new Error("initializeWasm() must be awaited first!");
9516                 }
9517                 const nativeResponseValue = wasm.PaymentSendFailure_path_parameter_error(a);
9518                 return nativeResponseValue;
9519         }
9520         // struct LDKPaymentSendFailure PaymentSendFailure_all_failed_retry_safe(struct LDKCVec_APIErrorZ a);
9521         export function PaymentSendFailure_all_failed_retry_safe(a: number[]): number {
9522                 if(!isWasmInitialized) {
9523                         throw new Error("initializeWasm() must be awaited first!");
9524                 }
9525                 const nativeResponseValue = wasm.PaymentSendFailure_all_failed_retry_safe(a);
9526                 return nativeResponseValue;
9527         }
9528         // struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ a);
9529         export function PaymentSendFailure_partial_failure(a: number[]): number {
9530                 if(!isWasmInitialized) {
9531                         throw new Error("initializeWasm() must be awaited first!");
9532                 }
9533                 const nativeResponseValue = wasm.PaymentSendFailure_partial_failure(a);
9534                 return nativeResponseValue;
9535         }
9536         // 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);
9537         export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
9538                 if(!isWasmInitialized) {
9539                         throw new Error("initializeWasm() must be awaited first!");
9540                 }
9541                 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
9542                 return nativeResponseValue;
9543         }
9544         // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
9545         export function ChannelManager_get_current_default_configuration(this_arg: number): number {
9546                 if(!isWasmInitialized) {
9547                         throw new Error("initializeWasm() must be awaited first!");
9548                 }
9549                 const nativeResponseValue = wasm.ChannelManager_get_current_default_configuration(this_arg);
9550                 return nativeResponseValue;
9551         }
9552         // 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);
9553         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 {
9554                 if(!isWasmInitialized) {
9555                         throw new Error("initializeWasm() must be awaited first!");
9556                 }
9557                 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_id, override_config);
9558                 return nativeResponseValue;
9559         }
9560         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
9561         export function ChannelManager_list_channels(this_arg: number): number[] {
9562                 if(!isWasmInitialized) {
9563                         throw new Error("initializeWasm() must be awaited first!");
9564                 }
9565                 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
9566                 return nativeResponseValue;
9567         }
9568         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
9569         export function ChannelManager_list_usable_channels(this_arg: number): number[] {
9570                 if(!isWasmInitialized) {
9571                         throw new Error("initializeWasm() must be awaited first!");
9572                 }
9573                 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
9574                 return nativeResponseValue;
9575         }
9576         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
9577         export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
9578                 if(!isWasmInitialized) {
9579                         throw new Error("initializeWasm() must be awaited first!");
9580                 }
9581                 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
9582                 return nativeResponseValue;
9583         }
9584         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel_with_target_feerate(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32], uint32_t target_feerate_sats_per_1000_weight);
9585         export function ChannelManager_close_channel_with_target_feerate(this_arg: number, channel_id: Uint8Array, target_feerate_sats_per_1000_weight: number): number {
9586                 if(!isWasmInitialized) {
9587                         throw new Error("initializeWasm() must be awaited first!");
9588                 }
9589                 const nativeResponseValue = wasm.ChannelManager_close_channel_with_target_feerate(this_arg, encodeArray(channel_id), target_feerate_sats_per_1000_weight);
9590                 return nativeResponseValue;
9591         }
9592         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
9593         export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
9594                 if(!isWasmInitialized) {
9595                         throw new Error("initializeWasm() must be awaited first!");
9596                 }
9597                 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
9598                 return nativeResponseValue;
9599         }
9600         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
9601         export function ChannelManager_force_close_all_channels(this_arg: number): void {
9602                 if(!isWasmInitialized) {
9603                         throw new Error("initializeWasm() must be awaited first!");
9604                 }
9605                 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
9606                 // debug statements here
9607         }
9608         // 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);
9609         export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
9610                 if(!isWasmInitialized) {
9611                         throw new Error("initializeWasm() must be awaited first!");
9612                 }
9613                 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
9614                 return nativeResponseValue;
9615         }
9616         // MUST_USE_RES struct LDKCResult_PaymentHashPaymentSendFailureZ ChannelManager_send_spontaneous_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_preimage);
9617         export function ChannelManager_send_spontaneous_payment(this_arg: number, route: number, payment_preimage: Uint8Array): number {
9618                 if(!isWasmInitialized) {
9619                         throw new Error("initializeWasm() must be awaited first!");
9620                 }
9621                 const nativeResponseValue = wasm.ChannelManager_send_spontaneous_payment(this_arg, route, encodeArray(payment_preimage));
9622                 return nativeResponseValue;
9623         }
9624         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKTransaction funding_transaction);
9625         export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_transaction: Uint8Array): number {
9626                 if(!isWasmInitialized) {
9627                         throw new Error("initializeWasm() must be awaited first!");
9628                 }
9629                 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), encodeArray(funding_transaction));
9630                 return nativeResponseValue;
9631         }
9632         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
9633         export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
9634                 if(!isWasmInitialized) {
9635                         throw new Error("initializeWasm() must be awaited first!");
9636                 }
9637                 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
9638                 // debug statements here
9639         }
9640         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
9641         export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
9642                 if(!isWasmInitialized) {
9643                         throw new Error("initializeWasm() must be awaited first!");
9644                 }
9645                 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
9646                 // debug statements here
9647         }
9648         // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
9649         export function ChannelManager_timer_tick_occurred(this_arg: number): void {
9650                 if(!isWasmInitialized) {
9651                         throw new Error("initializeWasm() must be awaited first!");
9652                 }
9653                 const nativeResponseValue = wasm.ChannelManager_timer_tick_occurred(this_arg);
9654                 // debug statements here
9655         }
9656         // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
9657         export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array): boolean {
9658                 if(!isWasmInitialized) {
9659                         throw new Error("initializeWasm() must be awaited first!");
9660                 }
9661                 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash));
9662                 return nativeResponseValue;
9663         }
9664         // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
9665         export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array): boolean {
9666                 if(!isWasmInitialized) {
9667                         throw new Error("initializeWasm() must be awaited first!");
9668                 }
9669                 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage));
9670                 return nativeResponseValue;
9671         }
9672         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
9673         export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
9674                 if(!isWasmInitialized) {
9675                         throw new Error("initializeWasm() must be awaited first!");
9676                 }
9677                 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
9678                 return decodeArray(nativeResponseValue);
9679         }
9680         // 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);
9681         export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
9682                 if(!isWasmInitialized) {
9683                         throw new Error("initializeWasm() must be awaited first!");
9684                 }
9685                 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
9686                 // debug statements here
9687         }
9688         // MUST_USE_RES struct LDKC2Tuple_PaymentHashPaymentSecretZ ChannelManager_create_inbound_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, uint64_t user_payment_id);
9689         export function ChannelManager_create_inbound_payment(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number, user_payment_id: number): number {
9690                 if(!isWasmInitialized) {
9691                         throw new Error("initializeWasm() must be awaited first!");
9692                 }
9693                 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment(this_arg, min_value_msat, invoice_expiry_delta_secs, user_payment_id);
9694                 return nativeResponseValue;
9695         }
9696         // MUST_USE_RES struct LDKCResult_PaymentSecretAPIErrorZ ChannelManager_create_inbound_payment_for_hash(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_hash, struct LDKCOption_u64Z min_value_msat, uint32_t invoice_expiry_delta_secs, uint64_t user_payment_id);
9697         export function ChannelManager_create_inbound_payment_for_hash(this_arg: number, payment_hash: Uint8Array, min_value_msat: number, invoice_expiry_delta_secs: number, user_payment_id: number): number {
9698                 if(!isWasmInitialized) {
9699                         throw new Error("initializeWasm() must be awaited first!");
9700                 }
9701                 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment_for_hash(this_arg, encodeArray(payment_hash), min_value_msat, invoice_expiry_delta_secs, user_payment_id);
9702                 return nativeResponseValue;
9703         }
9704         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
9705         export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
9706                 if(!isWasmInitialized) {
9707                         throw new Error("initializeWasm() must be awaited first!");
9708                 }
9709                 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
9710                 return nativeResponseValue;
9711         }
9712         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
9713         export function ChannelManager_as_EventsProvider(this_arg: number): number {
9714                 if(!isWasmInitialized) {
9715                         throw new Error("initializeWasm() must be awaited first!");
9716                 }
9717                 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
9718                 return nativeResponseValue;
9719         }
9720         // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
9721         export function ChannelManager_as_Listen(this_arg: number): number {
9722                 if(!isWasmInitialized) {
9723                         throw new Error("initializeWasm() must be awaited first!");
9724                 }
9725                 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
9726                 return nativeResponseValue;
9727         }
9728         // struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
9729         export function ChannelManager_as_Confirm(this_arg: number): number {
9730                 if(!isWasmInitialized) {
9731                         throw new Error("initializeWasm() must be awaited first!");
9732                 }
9733                 const nativeResponseValue = wasm.ChannelManager_as_Confirm(this_arg);
9734                 return nativeResponseValue;
9735         }
9736         // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
9737         export function ChannelManager_await_persistable_update_timeout(this_arg: number, max_wait: number): boolean {
9738                 if(!isWasmInitialized) {
9739                         throw new Error("initializeWasm() must be awaited first!");
9740                 }
9741                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update_timeout(this_arg, max_wait);
9742                 return nativeResponseValue;
9743         }
9744         // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
9745         export function ChannelManager_await_persistable_update(this_arg: number): void {
9746                 if(!isWasmInitialized) {
9747                         throw new Error("initializeWasm() must be awaited first!");
9748                 }
9749                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
9750                 // debug statements here
9751         }
9752         // MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
9753         export function ChannelManager_current_best_block(this_arg: number): number {
9754                 if(!isWasmInitialized) {
9755                         throw new Error("initializeWasm() must be awaited first!");
9756                 }
9757                 const nativeResponseValue = wasm.ChannelManager_current_best_block(this_arg);
9758                 return nativeResponseValue;
9759         }
9760         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
9761         export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
9762                 if(!isWasmInitialized) {
9763                         throw new Error("initializeWasm() must be awaited first!");
9764                 }
9765                 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
9766                 return nativeResponseValue;
9767         }
9768         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
9769         export function ChannelManager_write(obj: number): Uint8Array {
9770                 if(!isWasmInitialized) {
9771                         throw new Error("initializeWasm() must be awaited first!");
9772                 }
9773                 const nativeResponseValue = wasm.ChannelManager_write(obj);
9774                 return decodeArray(nativeResponseValue);
9775         }
9776         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
9777         export function ChannelManagerReadArgs_free(this_obj: number): void {
9778                 if(!isWasmInitialized) {
9779                         throw new Error("initializeWasm() must be awaited first!");
9780                 }
9781                 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
9782                 // debug statements here
9783         }
9784         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
9785         export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
9786                 if(!isWasmInitialized) {
9787                         throw new Error("initializeWasm() must be awaited first!");
9788                 }
9789                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
9790                 return nativeResponseValue;
9791         }
9792         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
9793         export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
9794                 if(!isWasmInitialized) {
9795                         throw new Error("initializeWasm() must be awaited first!");
9796                 }
9797                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
9798                 // debug statements here
9799         }
9800         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
9801         export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
9802                 if(!isWasmInitialized) {
9803                         throw new Error("initializeWasm() must be awaited first!");
9804                 }
9805                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
9806                 return nativeResponseValue;
9807         }
9808         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
9809         export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
9810                 if(!isWasmInitialized) {
9811                         throw new Error("initializeWasm() must be awaited first!");
9812                 }
9813                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
9814                 // debug statements here
9815         }
9816         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
9817         export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
9818                 if(!isWasmInitialized) {
9819                         throw new Error("initializeWasm() must be awaited first!");
9820                 }
9821                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
9822                 return nativeResponseValue;
9823         }
9824         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
9825         export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
9826                 if(!isWasmInitialized) {
9827                         throw new Error("initializeWasm() must be awaited first!");
9828                 }
9829                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
9830                 // debug statements here
9831         }
9832         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
9833         export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
9834                 if(!isWasmInitialized) {
9835                         throw new Error("initializeWasm() must be awaited first!");
9836                 }
9837                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
9838                 return nativeResponseValue;
9839         }
9840         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
9841         export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
9842                 if(!isWasmInitialized) {
9843                         throw new Error("initializeWasm() must be awaited first!");
9844                 }
9845                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
9846                 // debug statements here
9847         }
9848         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
9849         export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
9850                 if(!isWasmInitialized) {
9851                         throw new Error("initializeWasm() must be awaited first!");
9852                 }
9853                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
9854                 return nativeResponseValue;
9855         }
9856         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
9857         export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
9858                 if(!isWasmInitialized) {
9859                         throw new Error("initializeWasm() must be awaited first!");
9860                 }
9861                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
9862                 // debug statements here
9863         }
9864         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
9865         export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
9866                 if(!isWasmInitialized) {
9867                         throw new Error("initializeWasm() must be awaited first!");
9868                 }
9869                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
9870                 return nativeResponseValue;
9871         }
9872         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
9873         export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
9874                 if(!isWasmInitialized) {
9875                         throw new Error("initializeWasm() must be awaited first!");
9876                 }
9877                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
9878                 // debug statements here
9879         }
9880         // 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);
9881         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 {
9882                 if(!isWasmInitialized) {
9883                         throw new Error("initializeWasm() must be awaited first!");
9884                 }
9885                 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
9886                 return nativeResponseValue;
9887         }
9888         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
9889         export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
9890                 if(!isWasmInitialized) {
9891                         throw new Error("initializeWasm() must be awaited first!");
9892                 }
9893                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
9894                 return nativeResponseValue;
9895         }
9896         // void DecodeError_free(struct LDKDecodeError this_obj);
9897         export function DecodeError_free(this_obj: number): void {
9898                 if(!isWasmInitialized) {
9899                         throw new Error("initializeWasm() must be awaited first!");
9900                 }
9901                 const nativeResponseValue = wasm.DecodeError_free(this_obj);
9902                 // debug statements here
9903         }
9904         // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
9905         export function DecodeError_clone(orig: number): number {
9906                 if(!isWasmInitialized) {
9907                         throw new Error("initializeWasm() must be awaited first!");
9908                 }
9909                 const nativeResponseValue = wasm.DecodeError_clone(orig);
9910                 return nativeResponseValue;
9911         }
9912         // void Init_free(struct LDKInit this_obj);
9913         export function Init_free(this_obj: number): void {
9914                 if(!isWasmInitialized) {
9915                         throw new Error("initializeWasm() must be awaited first!");
9916                 }
9917                 const nativeResponseValue = wasm.Init_free(this_obj);
9918                 // debug statements here
9919         }
9920         // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
9921         export function Init_get_features(this_ptr: number): number {
9922                 if(!isWasmInitialized) {
9923                         throw new Error("initializeWasm() must be awaited first!");
9924                 }
9925                 const nativeResponseValue = wasm.Init_get_features(this_ptr);
9926                 return nativeResponseValue;
9927         }
9928         // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
9929         export function Init_set_features(this_ptr: number, val: number): void {
9930                 if(!isWasmInitialized) {
9931                         throw new Error("initializeWasm() must be awaited first!");
9932                 }
9933                 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
9934                 // debug statements here
9935         }
9936         // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
9937         export function Init_new(features_arg: number): number {
9938                 if(!isWasmInitialized) {
9939                         throw new Error("initializeWasm() must be awaited first!");
9940                 }
9941                 const nativeResponseValue = wasm.Init_new(features_arg);
9942                 return nativeResponseValue;
9943         }
9944         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
9945         export function Init_clone(orig: number): number {
9946                 if(!isWasmInitialized) {
9947                         throw new Error("initializeWasm() must be awaited first!");
9948                 }
9949                 const nativeResponseValue = wasm.Init_clone(orig);
9950                 return nativeResponseValue;
9951         }
9952         // void ErrorMessage_free(struct LDKErrorMessage this_obj);
9953         export function ErrorMessage_free(this_obj: number): void {
9954                 if(!isWasmInitialized) {
9955                         throw new Error("initializeWasm() must be awaited first!");
9956                 }
9957                 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
9958                 // debug statements here
9959         }
9960         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
9961         export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
9962                 if(!isWasmInitialized) {
9963                         throw new Error("initializeWasm() must be awaited first!");
9964                 }
9965                 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
9966                 return decodeArray(nativeResponseValue);
9967         }
9968         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9969         export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
9970                 if(!isWasmInitialized) {
9971                         throw new Error("initializeWasm() must be awaited first!");
9972                 }
9973                 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
9974                 // debug statements here
9975         }
9976         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
9977         export function ErrorMessage_get_data(this_ptr: number): String {
9978                 if(!isWasmInitialized) {
9979                         throw new Error("initializeWasm() must be awaited first!");
9980                 }
9981                 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
9982                 return nativeResponseValue;
9983         }
9984         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
9985         export function ErrorMessage_set_data(this_ptr: number, val: String): void {
9986                 if(!isWasmInitialized) {
9987                         throw new Error("initializeWasm() must be awaited first!");
9988                 }
9989                 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, val);
9990                 // debug statements here
9991         }
9992         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
9993         export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: String): number {
9994                 if(!isWasmInitialized) {
9995                         throw new Error("initializeWasm() must be awaited first!");
9996                 }
9997                 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), data_arg);
9998                 return nativeResponseValue;
9999         }
10000         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
10001         export function ErrorMessage_clone(orig: number): number {
10002                 if(!isWasmInitialized) {
10003                         throw new Error("initializeWasm() must be awaited first!");
10004                 }
10005                 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
10006                 return nativeResponseValue;
10007         }
10008         // void Ping_free(struct LDKPing this_obj);
10009         export function Ping_free(this_obj: number): void {
10010                 if(!isWasmInitialized) {
10011                         throw new Error("initializeWasm() must be awaited first!");
10012                 }
10013                 const nativeResponseValue = wasm.Ping_free(this_obj);
10014                 // debug statements here
10015         }
10016         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
10017         export function Ping_get_ponglen(this_ptr: number): number {
10018                 if(!isWasmInitialized) {
10019                         throw new Error("initializeWasm() must be awaited first!");
10020                 }
10021                 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
10022                 return nativeResponseValue;
10023         }
10024         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
10025         export function Ping_set_ponglen(this_ptr: number, val: number): void {
10026                 if(!isWasmInitialized) {
10027                         throw new Error("initializeWasm() must be awaited first!");
10028                 }
10029                 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
10030                 // debug statements here
10031         }
10032         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
10033         export function Ping_get_byteslen(this_ptr: number): number {
10034                 if(!isWasmInitialized) {
10035                         throw new Error("initializeWasm() must be awaited first!");
10036                 }
10037                 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
10038                 return nativeResponseValue;
10039         }
10040         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
10041         export function Ping_set_byteslen(this_ptr: number, val: number): void {
10042                 if(!isWasmInitialized) {
10043                         throw new Error("initializeWasm() must be awaited first!");
10044                 }
10045                 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
10046                 // debug statements here
10047         }
10048         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
10049         export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
10050                 if(!isWasmInitialized) {
10051                         throw new Error("initializeWasm() must be awaited first!");
10052                 }
10053                 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
10054                 return nativeResponseValue;
10055         }
10056         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
10057         export function Ping_clone(orig: number): number {
10058                 if(!isWasmInitialized) {
10059                         throw new Error("initializeWasm() must be awaited first!");
10060                 }
10061                 const nativeResponseValue = wasm.Ping_clone(orig);
10062                 return nativeResponseValue;
10063         }
10064         // void Pong_free(struct LDKPong this_obj);
10065         export function Pong_free(this_obj: number): void {
10066                 if(!isWasmInitialized) {
10067                         throw new Error("initializeWasm() must be awaited first!");
10068                 }
10069                 const nativeResponseValue = wasm.Pong_free(this_obj);
10070                 // debug statements here
10071         }
10072         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
10073         export function Pong_get_byteslen(this_ptr: number): number {
10074                 if(!isWasmInitialized) {
10075                         throw new Error("initializeWasm() must be awaited first!");
10076                 }
10077                 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
10078                 return nativeResponseValue;
10079         }
10080         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
10081         export function Pong_set_byteslen(this_ptr: number, val: number): void {
10082                 if(!isWasmInitialized) {
10083                         throw new Error("initializeWasm() must be awaited first!");
10084                 }
10085                 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
10086                 // debug statements here
10087         }
10088         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
10089         export function Pong_new(byteslen_arg: number): number {
10090                 if(!isWasmInitialized) {
10091                         throw new Error("initializeWasm() must be awaited first!");
10092                 }
10093                 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
10094                 return nativeResponseValue;
10095         }
10096         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
10097         export function Pong_clone(orig: number): number {
10098                 if(!isWasmInitialized) {
10099                         throw new Error("initializeWasm() must be awaited first!");
10100                 }
10101                 const nativeResponseValue = wasm.Pong_clone(orig);
10102                 return nativeResponseValue;
10103         }
10104         // void OpenChannel_free(struct LDKOpenChannel this_obj);
10105         export function OpenChannel_free(this_obj: number): void {
10106                 if(!isWasmInitialized) {
10107                         throw new Error("initializeWasm() must be awaited first!");
10108                 }
10109                 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
10110                 // debug statements here
10111         }
10112         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
10113         export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
10114                 if(!isWasmInitialized) {
10115                         throw new Error("initializeWasm() must be awaited first!");
10116                 }
10117                 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
10118                 return decodeArray(nativeResponseValue);
10119         }
10120         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10121         export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10122                 if(!isWasmInitialized) {
10123                         throw new Error("initializeWasm() must be awaited first!");
10124                 }
10125                 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
10126                 // debug statements here
10127         }
10128         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
10129         export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
10130                 if(!isWasmInitialized) {
10131                         throw new Error("initializeWasm() must be awaited first!");
10132                 }
10133                 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
10134                 return decodeArray(nativeResponseValue);
10135         }
10136         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10137         export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
10138                 if(!isWasmInitialized) {
10139                         throw new Error("initializeWasm() must be awaited first!");
10140                 }
10141                 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
10142                 // debug statements here
10143         }
10144         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10145         export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
10146                 if(!isWasmInitialized) {
10147                         throw new Error("initializeWasm() must be awaited first!");
10148                 }
10149                 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
10150                 return nativeResponseValue;
10151         }
10152         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10153         export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
10154                 if(!isWasmInitialized) {
10155                         throw new Error("initializeWasm() must be awaited first!");
10156                 }
10157                 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
10158                 // debug statements here
10159         }
10160         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10161         export function OpenChannel_get_push_msat(this_ptr: number): number {
10162                 if(!isWasmInitialized) {
10163                         throw new Error("initializeWasm() must be awaited first!");
10164                 }
10165                 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
10166                 return nativeResponseValue;
10167         }
10168         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10169         export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
10170                 if(!isWasmInitialized) {
10171                         throw new Error("initializeWasm() must be awaited first!");
10172                 }
10173                 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
10174                 // debug statements here
10175         }
10176         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10177         export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
10178                 if(!isWasmInitialized) {
10179                         throw new Error("initializeWasm() must be awaited first!");
10180                 }
10181                 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
10182                 return nativeResponseValue;
10183         }
10184         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10185         export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
10186                 if(!isWasmInitialized) {
10187                         throw new Error("initializeWasm() must be awaited first!");
10188                 }
10189                 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
10190                 // debug statements here
10191         }
10192         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10193         export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
10194                 if(!isWasmInitialized) {
10195                         throw new Error("initializeWasm() must be awaited first!");
10196                 }
10197                 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
10198                 return nativeResponseValue;
10199         }
10200         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10201         export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
10202                 if(!isWasmInitialized) {
10203                         throw new Error("initializeWasm() must be awaited first!");
10204                 }
10205                 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
10206                 // debug statements here
10207         }
10208         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10209         export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
10210                 if(!isWasmInitialized) {
10211                         throw new Error("initializeWasm() must be awaited first!");
10212                 }
10213                 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
10214                 return nativeResponseValue;
10215         }
10216         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10217         export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
10218                 if(!isWasmInitialized) {
10219                         throw new Error("initializeWasm() must be awaited first!");
10220                 }
10221                 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
10222                 // debug statements here
10223         }
10224         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10225         export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
10226                 if(!isWasmInitialized) {
10227                         throw new Error("initializeWasm() must be awaited first!");
10228                 }
10229                 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
10230                 return nativeResponseValue;
10231         }
10232         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10233         export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
10234                 if(!isWasmInitialized) {
10235                         throw new Error("initializeWasm() must be awaited first!");
10236                 }
10237                 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
10238                 // debug statements here
10239         }
10240         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10241         export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
10242                 if(!isWasmInitialized) {
10243                         throw new Error("initializeWasm() must be awaited first!");
10244                 }
10245                 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
10246                 return nativeResponseValue;
10247         }
10248         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
10249         export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
10250                 if(!isWasmInitialized) {
10251                         throw new Error("initializeWasm() must be awaited first!");
10252                 }
10253                 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
10254                 // debug statements here
10255         }
10256         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10257         export function OpenChannel_get_to_self_delay(this_ptr: number): number {
10258                 if(!isWasmInitialized) {
10259                         throw new Error("initializeWasm() must be awaited first!");
10260                 }
10261                 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
10262                 return nativeResponseValue;
10263         }
10264         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
10265         export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
10266                 if(!isWasmInitialized) {
10267                         throw new Error("initializeWasm() must be awaited first!");
10268                 }
10269                 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
10270                 // debug statements here
10271         }
10272         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10273         export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
10274                 if(!isWasmInitialized) {
10275                         throw new Error("initializeWasm() must be awaited first!");
10276                 }
10277                 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
10278                 return nativeResponseValue;
10279         }
10280         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
10281         export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
10282                 if(!isWasmInitialized) {
10283                         throw new Error("initializeWasm() must be awaited first!");
10284                 }
10285                 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
10286                 // debug statements here
10287         }
10288         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10289         export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
10290                 if(!isWasmInitialized) {
10291                         throw new Error("initializeWasm() must be awaited first!");
10292                 }
10293                 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
10294                 return decodeArray(nativeResponseValue);
10295         }
10296         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10297         export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
10298                 if(!isWasmInitialized) {
10299                         throw new Error("initializeWasm() must be awaited first!");
10300                 }
10301                 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
10302                 // debug statements here
10303         }
10304         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10305         export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
10306                 if(!isWasmInitialized) {
10307                         throw new Error("initializeWasm() must be awaited first!");
10308                 }
10309                 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
10310                 return decodeArray(nativeResponseValue);
10311         }
10312         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10313         export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
10314                 if(!isWasmInitialized) {
10315                         throw new Error("initializeWasm() must be awaited first!");
10316                 }
10317                 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
10318                 // debug statements here
10319         }
10320         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10321         export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
10322                 if(!isWasmInitialized) {
10323                         throw new Error("initializeWasm() must be awaited first!");
10324                 }
10325                 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
10326                 return decodeArray(nativeResponseValue);
10327         }
10328         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10329         export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
10330                 if(!isWasmInitialized) {
10331                         throw new Error("initializeWasm() must be awaited first!");
10332                 }
10333                 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
10334                 // debug statements here
10335         }
10336         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10337         export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
10338                 if(!isWasmInitialized) {
10339                         throw new Error("initializeWasm() must be awaited first!");
10340                 }
10341                 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
10342                 return decodeArray(nativeResponseValue);
10343         }
10344         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10345         export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
10346                 if(!isWasmInitialized) {
10347                         throw new Error("initializeWasm() must be awaited first!");
10348                 }
10349                 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
10350                 // debug statements here
10351         }
10352         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10353         export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
10354                 if(!isWasmInitialized) {
10355                         throw new Error("initializeWasm() must be awaited first!");
10356                 }
10357                 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
10358                 return decodeArray(nativeResponseValue);
10359         }
10360         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10361         export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
10362                 if(!isWasmInitialized) {
10363                         throw new Error("initializeWasm() must be awaited first!");
10364                 }
10365                 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
10366                 // debug statements here
10367         }
10368         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10369         export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
10370                 if(!isWasmInitialized) {
10371                         throw new Error("initializeWasm() must be awaited first!");
10372                 }
10373                 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
10374                 return decodeArray(nativeResponseValue);
10375         }
10376         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10377         export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10378                 if(!isWasmInitialized) {
10379                         throw new Error("initializeWasm() must be awaited first!");
10380                 }
10381                 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
10382                 // debug statements here
10383         }
10384         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10385         export function OpenChannel_get_channel_flags(this_ptr: number): number {
10386                 if(!isWasmInitialized) {
10387                         throw new Error("initializeWasm() must be awaited first!");
10388                 }
10389                 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
10390                 return nativeResponseValue;
10391         }
10392         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
10393         export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
10394                 if(!isWasmInitialized) {
10395                         throw new Error("initializeWasm() must be awaited first!");
10396                 }
10397                 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
10398                 // debug statements here
10399         }
10400         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
10401         export function OpenChannel_clone(orig: number): number {
10402                 if(!isWasmInitialized) {
10403                         throw new Error("initializeWasm() must be awaited first!");
10404                 }
10405                 const nativeResponseValue = wasm.OpenChannel_clone(orig);
10406                 return nativeResponseValue;
10407         }
10408         // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
10409         export function AcceptChannel_free(this_obj: number): void {
10410                 if(!isWasmInitialized) {
10411                         throw new Error("initializeWasm() must be awaited first!");
10412                 }
10413                 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
10414                 // debug statements here
10415         }
10416         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
10417         export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
10418                 if(!isWasmInitialized) {
10419                         throw new Error("initializeWasm() must be awaited first!");
10420                 }
10421                 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
10422                 return decodeArray(nativeResponseValue);
10423         }
10424         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10425         export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
10426                 if(!isWasmInitialized) {
10427                         throw new Error("initializeWasm() must be awaited first!");
10428                 }
10429                 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
10430                 // debug statements here
10431         }
10432         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10433         export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
10434                 if(!isWasmInitialized) {
10435                         throw new Error("initializeWasm() must be awaited first!");
10436                 }
10437                 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
10438                 return nativeResponseValue;
10439         }
10440         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
10441         export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
10442                 if(!isWasmInitialized) {
10443                         throw new Error("initializeWasm() must be awaited first!");
10444                 }
10445                 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
10446                 // debug statements here
10447         }
10448         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10449         export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
10450                 if(!isWasmInitialized) {
10451                         throw new Error("initializeWasm() must be awaited first!");
10452                 }
10453                 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
10454                 return nativeResponseValue;
10455         }
10456         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
10457         export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
10458                 if(!isWasmInitialized) {
10459                         throw new Error("initializeWasm() must be awaited first!");
10460                 }
10461                 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
10462                 // debug statements here
10463         }
10464         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10465         export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
10466                 if(!isWasmInitialized) {
10467                         throw new Error("initializeWasm() must be awaited first!");
10468                 }
10469                 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
10470                 return nativeResponseValue;
10471         }
10472         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
10473         export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
10474                 if(!isWasmInitialized) {
10475                         throw new Error("initializeWasm() must be awaited first!");
10476                 }
10477                 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
10478                 // debug statements here
10479         }
10480         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10481         export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
10482                 if(!isWasmInitialized) {
10483                         throw new Error("initializeWasm() must be awaited first!");
10484                 }
10485                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
10486                 return nativeResponseValue;
10487         }
10488         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
10489         export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
10490                 if(!isWasmInitialized) {
10491                         throw new Error("initializeWasm() must be awaited first!");
10492                 }
10493                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
10494                 // debug statements here
10495         }
10496         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10497         export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
10498                 if(!isWasmInitialized) {
10499                         throw new Error("initializeWasm() must be awaited first!");
10500                 }
10501                 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
10502                 return nativeResponseValue;
10503         }
10504         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
10505         export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
10506                 if(!isWasmInitialized) {
10507                         throw new Error("initializeWasm() must be awaited first!");
10508                 }
10509                 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
10510                 // debug statements here
10511         }
10512         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10513         export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
10514                 if(!isWasmInitialized) {
10515                         throw new Error("initializeWasm() must be awaited first!");
10516                 }
10517                 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
10518                 return nativeResponseValue;
10519         }
10520         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
10521         export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
10522                 if(!isWasmInitialized) {
10523                         throw new Error("initializeWasm() must be awaited first!");
10524                 }
10525                 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
10526                 // debug statements here
10527         }
10528         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10529         export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
10530                 if(!isWasmInitialized) {
10531                         throw new Error("initializeWasm() must be awaited first!");
10532                 }
10533                 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
10534                 return nativeResponseValue;
10535         }
10536         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
10537         export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
10538                 if(!isWasmInitialized) {
10539                         throw new Error("initializeWasm() must be awaited first!");
10540                 }
10541                 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
10542                 // debug statements here
10543         }
10544         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10545         export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
10546                 if(!isWasmInitialized) {
10547                         throw new Error("initializeWasm() must be awaited first!");
10548                 }
10549                 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
10550                 return decodeArray(nativeResponseValue);
10551         }
10552         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10553         export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
10554                 if(!isWasmInitialized) {
10555                         throw new Error("initializeWasm() must be awaited first!");
10556                 }
10557                 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
10558                 // debug statements here
10559         }
10560         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10561         export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
10562                 if(!isWasmInitialized) {
10563                         throw new Error("initializeWasm() must be awaited first!");
10564                 }
10565                 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
10566                 return decodeArray(nativeResponseValue);
10567         }
10568         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10569         export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
10570                 if(!isWasmInitialized) {
10571                         throw new Error("initializeWasm() must be awaited first!");
10572                 }
10573                 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
10574                 // debug statements here
10575         }
10576         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10577         export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
10578                 if(!isWasmInitialized) {
10579                         throw new Error("initializeWasm() must be awaited first!");
10580                 }
10581                 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
10582                 return decodeArray(nativeResponseValue);
10583         }
10584         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10585         export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
10586                 if(!isWasmInitialized) {
10587                         throw new Error("initializeWasm() must be awaited first!");
10588                 }
10589                 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
10590                 // debug statements here
10591         }
10592         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10593         export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
10594                 if(!isWasmInitialized) {
10595                         throw new Error("initializeWasm() must be awaited first!");
10596                 }
10597                 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
10598                 return decodeArray(nativeResponseValue);
10599         }
10600         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10601         export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
10602                 if(!isWasmInitialized) {
10603                         throw new Error("initializeWasm() must be awaited first!");
10604                 }
10605                 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
10606                 // debug statements here
10607         }
10608         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10609         export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
10610                 if(!isWasmInitialized) {
10611                         throw new Error("initializeWasm() must be awaited first!");
10612                 }
10613                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
10614                 return decodeArray(nativeResponseValue);
10615         }
10616         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10617         export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
10618                 if(!isWasmInitialized) {
10619                         throw new Error("initializeWasm() must be awaited first!");
10620                 }
10621                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
10622                 // debug statements here
10623         }
10624         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10625         export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
10626                 if(!isWasmInitialized) {
10627                         throw new Error("initializeWasm() must be awaited first!");
10628                 }
10629                 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
10630                 return decodeArray(nativeResponseValue);
10631         }
10632         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10633         export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10634                 if(!isWasmInitialized) {
10635                         throw new Error("initializeWasm() must be awaited first!");
10636                 }
10637                 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
10638                 // debug statements here
10639         }
10640         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
10641         export function AcceptChannel_clone(orig: number): number {
10642                 if(!isWasmInitialized) {
10643                         throw new Error("initializeWasm() must be awaited first!");
10644                 }
10645                 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
10646                 return nativeResponseValue;
10647         }
10648         // void FundingCreated_free(struct LDKFundingCreated this_obj);
10649         export function FundingCreated_free(this_obj: number): void {
10650                 if(!isWasmInitialized) {
10651                         throw new Error("initializeWasm() must be awaited first!");
10652                 }
10653                 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
10654                 // debug statements here
10655         }
10656         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
10657         export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
10658                 if(!isWasmInitialized) {
10659                         throw new Error("initializeWasm() must be awaited first!");
10660                 }
10661                 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
10662                 return decodeArray(nativeResponseValue);
10663         }
10664         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10665         export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
10666                 if(!isWasmInitialized) {
10667                         throw new Error("initializeWasm() must be awaited first!");
10668                 }
10669                 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
10670                 // debug statements here
10671         }
10672         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
10673         export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
10674                 if(!isWasmInitialized) {
10675                         throw new Error("initializeWasm() must be awaited first!");
10676                 }
10677                 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
10678                 return decodeArray(nativeResponseValue);
10679         }
10680         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10681         export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
10682                 if(!isWasmInitialized) {
10683                         throw new Error("initializeWasm() must be awaited first!");
10684                 }
10685                 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
10686                 // debug statements here
10687         }
10688         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
10689         export function FundingCreated_get_funding_output_index(this_ptr: number): number {
10690                 if(!isWasmInitialized) {
10691                         throw new Error("initializeWasm() must be awaited first!");
10692                 }
10693                 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
10694                 return nativeResponseValue;
10695         }
10696         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
10697         export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
10698                 if(!isWasmInitialized) {
10699                         throw new Error("initializeWasm() must be awaited first!");
10700                 }
10701                 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
10702                 // debug statements here
10703         }
10704         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
10705         export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
10706                 if(!isWasmInitialized) {
10707                         throw new Error("initializeWasm() must be awaited first!");
10708                 }
10709                 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
10710                 return decodeArray(nativeResponseValue);
10711         }
10712         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
10713         export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
10714                 if(!isWasmInitialized) {
10715                         throw new Error("initializeWasm() must be awaited first!");
10716                 }
10717                 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
10718                 // debug statements here
10719         }
10720         // 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);
10721         export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
10722                 if(!isWasmInitialized) {
10723                         throw new Error("initializeWasm() must be awaited first!");
10724                 }
10725                 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
10726                 return nativeResponseValue;
10727         }
10728         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
10729         export function FundingCreated_clone(orig: number): number {
10730                 if(!isWasmInitialized) {
10731                         throw new Error("initializeWasm() must be awaited first!");
10732                 }
10733                 const nativeResponseValue = wasm.FundingCreated_clone(orig);
10734                 return nativeResponseValue;
10735         }
10736         // void FundingSigned_free(struct LDKFundingSigned this_obj);
10737         export function FundingSigned_free(this_obj: number): void {
10738                 if(!isWasmInitialized) {
10739                         throw new Error("initializeWasm() must be awaited first!");
10740                 }
10741                 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
10742                 // debug statements here
10743         }
10744         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
10745         export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
10746                 if(!isWasmInitialized) {
10747                         throw new Error("initializeWasm() must be awaited first!");
10748                 }
10749                 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
10750                 return decodeArray(nativeResponseValue);
10751         }
10752         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10753         export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
10754                 if(!isWasmInitialized) {
10755                         throw new Error("initializeWasm() must be awaited first!");
10756                 }
10757                 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
10758                 // debug statements here
10759         }
10760         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
10761         export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
10762                 if(!isWasmInitialized) {
10763                         throw new Error("initializeWasm() must be awaited first!");
10764                 }
10765                 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
10766                 return decodeArray(nativeResponseValue);
10767         }
10768         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
10769         export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
10770                 if(!isWasmInitialized) {
10771                         throw new Error("initializeWasm() must be awaited first!");
10772                 }
10773                 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
10774                 // debug statements here
10775         }
10776         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
10777         export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
10778                 if(!isWasmInitialized) {
10779                         throw new Error("initializeWasm() must be awaited first!");
10780                 }
10781                 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
10782                 return nativeResponseValue;
10783         }
10784         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
10785         export function FundingSigned_clone(orig: number): number {
10786                 if(!isWasmInitialized) {
10787                         throw new Error("initializeWasm() must be awaited first!");
10788                 }
10789                 const nativeResponseValue = wasm.FundingSigned_clone(orig);
10790                 return nativeResponseValue;
10791         }
10792         // void FundingLocked_free(struct LDKFundingLocked this_obj);
10793         export function FundingLocked_free(this_obj: number): void {
10794                 if(!isWasmInitialized) {
10795                         throw new Error("initializeWasm() must be awaited first!");
10796                 }
10797                 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
10798                 // debug statements here
10799         }
10800         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
10801         export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
10802                 if(!isWasmInitialized) {
10803                         throw new Error("initializeWasm() must be awaited first!");
10804                 }
10805                 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
10806                 return decodeArray(nativeResponseValue);
10807         }
10808         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10809         export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
10810                 if(!isWasmInitialized) {
10811                         throw new Error("initializeWasm() must be awaited first!");
10812                 }
10813                 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
10814                 // debug statements here
10815         }
10816         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
10817         export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
10818                 if(!isWasmInitialized) {
10819                         throw new Error("initializeWasm() must be awaited first!");
10820                 }
10821                 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
10822                 return decodeArray(nativeResponseValue);
10823         }
10824         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10825         export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10826                 if(!isWasmInitialized) {
10827                         throw new Error("initializeWasm() must be awaited first!");
10828                 }
10829                 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
10830                 // debug statements here
10831         }
10832         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
10833         export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
10834                 if(!isWasmInitialized) {
10835                         throw new Error("initializeWasm() must be awaited first!");
10836                 }
10837                 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
10838                 return nativeResponseValue;
10839         }
10840         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
10841         export function FundingLocked_clone(orig: number): number {
10842                 if(!isWasmInitialized) {
10843                         throw new Error("initializeWasm() must be awaited first!");
10844                 }
10845                 const nativeResponseValue = wasm.FundingLocked_clone(orig);
10846                 return nativeResponseValue;
10847         }
10848         // void Shutdown_free(struct LDKShutdown this_obj);
10849         export function Shutdown_free(this_obj: number): void {
10850                 if(!isWasmInitialized) {
10851                         throw new Error("initializeWasm() must be awaited first!");
10852                 }
10853                 const nativeResponseValue = wasm.Shutdown_free(this_obj);
10854                 // debug statements here
10855         }
10856         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
10857         export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
10858                 if(!isWasmInitialized) {
10859                         throw new Error("initializeWasm() must be awaited first!");
10860                 }
10861                 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
10862                 return decodeArray(nativeResponseValue);
10863         }
10864         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10865         export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
10866                 if(!isWasmInitialized) {
10867                         throw new Error("initializeWasm() must be awaited first!");
10868                 }
10869                 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
10870                 // debug statements here
10871         }
10872         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
10873         export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
10874                 if(!isWasmInitialized) {
10875                         throw new Error("initializeWasm() must be awaited first!");
10876                 }
10877                 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
10878                 return decodeArray(nativeResponseValue);
10879         }
10880         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
10881         export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
10882                 if(!isWasmInitialized) {
10883                         throw new Error("initializeWasm() must be awaited first!");
10884                 }
10885                 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
10886                 // debug statements here
10887         }
10888         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
10889         export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
10890                 if(!isWasmInitialized) {
10891                         throw new Error("initializeWasm() must be awaited first!");
10892                 }
10893                 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
10894                 return nativeResponseValue;
10895         }
10896         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
10897         export function Shutdown_clone(orig: number): number {
10898                 if(!isWasmInitialized) {
10899                         throw new Error("initializeWasm() must be awaited first!");
10900                 }
10901                 const nativeResponseValue = wasm.Shutdown_clone(orig);
10902                 return nativeResponseValue;
10903         }
10904         // void ClosingSignedFeeRange_free(struct LDKClosingSignedFeeRange this_obj);
10905         export function ClosingSignedFeeRange_free(this_obj: number): void {
10906                 if(!isWasmInitialized) {
10907                         throw new Error("initializeWasm() must be awaited first!");
10908                 }
10909                 const nativeResponseValue = wasm.ClosingSignedFeeRange_free(this_obj);
10910                 // debug statements here
10911         }
10912         // uint64_t ClosingSignedFeeRange_get_min_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
10913         export function ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr: number): number {
10914                 if(!isWasmInitialized) {
10915                         throw new Error("initializeWasm() must be awaited first!");
10916                 }
10917                 const nativeResponseValue = wasm.ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr);
10918                 return nativeResponseValue;
10919         }
10920         // void ClosingSignedFeeRange_set_min_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
10921         export function ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr: number, val: number): void {
10922                 if(!isWasmInitialized) {
10923                         throw new Error("initializeWasm() must be awaited first!");
10924                 }
10925                 const nativeResponseValue = wasm.ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr, val);
10926                 // debug statements here
10927         }
10928         // uint64_t ClosingSignedFeeRange_get_max_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
10929         export function ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr: number): number {
10930                 if(!isWasmInitialized) {
10931                         throw new Error("initializeWasm() must be awaited first!");
10932                 }
10933                 const nativeResponseValue = wasm.ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr);
10934                 return nativeResponseValue;
10935         }
10936         // void ClosingSignedFeeRange_set_max_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
10937         export function ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr: number, val: number): void {
10938                 if(!isWasmInitialized) {
10939                         throw new Error("initializeWasm() must be awaited first!");
10940                 }
10941                 const nativeResponseValue = wasm.ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr, val);
10942                 // debug statements here
10943         }
10944         // MUST_USE_RES struct LDKClosingSignedFeeRange ClosingSignedFeeRange_new(uint64_t min_fee_satoshis_arg, uint64_t max_fee_satoshis_arg);
10945         export function ClosingSignedFeeRange_new(min_fee_satoshis_arg: number, max_fee_satoshis_arg: number): number {
10946                 if(!isWasmInitialized) {
10947                         throw new Error("initializeWasm() must be awaited first!");
10948                 }
10949                 const nativeResponseValue = wasm.ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg);
10950                 return nativeResponseValue;
10951         }
10952         // struct LDKClosingSignedFeeRange ClosingSignedFeeRange_clone(const struct LDKClosingSignedFeeRange *NONNULL_PTR orig);
10953         export function ClosingSignedFeeRange_clone(orig: number): number {
10954                 if(!isWasmInitialized) {
10955                         throw new Error("initializeWasm() must be awaited first!");
10956                 }
10957                 const nativeResponseValue = wasm.ClosingSignedFeeRange_clone(orig);
10958                 return nativeResponseValue;
10959         }
10960         // void ClosingSigned_free(struct LDKClosingSigned this_obj);
10961         export function ClosingSigned_free(this_obj: number): void {
10962                 if(!isWasmInitialized) {
10963                         throw new Error("initializeWasm() must be awaited first!");
10964                 }
10965                 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
10966                 // debug statements here
10967         }
10968         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
10969         export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
10970                 if(!isWasmInitialized) {
10971                         throw new Error("initializeWasm() must be awaited first!");
10972                 }
10973                 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
10974                 return decodeArray(nativeResponseValue);
10975         }
10976         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10977         export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
10978                 if(!isWasmInitialized) {
10979                         throw new Error("initializeWasm() must be awaited first!");
10980                 }
10981                 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
10982                 // debug statements here
10983         }
10984         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
10985         export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
10986                 if(!isWasmInitialized) {
10987                         throw new Error("initializeWasm() must be awaited first!");
10988                 }
10989                 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
10990                 return nativeResponseValue;
10991         }
10992         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
10993         export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
10994                 if(!isWasmInitialized) {
10995                         throw new Error("initializeWasm() must be awaited first!");
10996                 }
10997                 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
10998                 // debug statements here
10999         }
11000         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
11001         export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
11002                 if(!isWasmInitialized) {
11003                         throw new Error("initializeWasm() must be awaited first!");
11004                 }
11005                 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
11006                 return decodeArray(nativeResponseValue);
11007         }
11008         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
11009         export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
11010                 if(!isWasmInitialized) {
11011                         throw new Error("initializeWasm() must be awaited first!");
11012                 }
11013                 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
11014                 // debug statements here
11015         }
11016         // struct LDKClosingSignedFeeRange ClosingSigned_get_fee_range(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
11017         export function ClosingSigned_get_fee_range(this_ptr: number): number {
11018                 if(!isWasmInitialized) {
11019                         throw new Error("initializeWasm() must be awaited first!");
11020                 }
11021                 const nativeResponseValue = wasm.ClosingSigned_get_fee_range(this_ptr);
11022                 return nativeResponseValue;
11023         }
11024         // void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val);
11025         export function ClosingSigned_set_fee_range(this_ptr: number, val: number): void {
11026                 if(!isWasmInitialized) {
11027                         throw new Error("initializeWasm() must be awaited first!");
11028                 }
11029                 const nativeResponseValue = wasm.ClosingSigned_set_fee_range(this_ptr, val);
11030                 // debug statements here
11031         }
11032         // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg, struct LDKClosingSignedFeeRange fee_range_arg);
11033         export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array, fee_range_arg: number): number {
11034                 if(!isWasmInitialized) {
11035                         throw new Error("initializeWasm() must be awaited first!");
11036                 }
11037                 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg), fee_range_arg);
11038                 return nativeResponseValue;
11039         }
11040         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
11041         export function ClosingSigned_clone(orig: number): number {
11042                 if(!isWasmInitialized) {
11043                         throw new Error("initializeWasm() must be awaited first!");
11044                 }
11045                 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
11046                 return nativeResponseValue;
11047         }
11048         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
11049         export function UpdateAddHTLC_free(this_obj: number): void {
11050                 if(!isWasmInitialized) {
11051                         throw new Error("initializeWasm() must be awaited first!");
11052                 }
11053                 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
11054                 // debug statements here
11055         }
11056         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
11057         export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
11058                 if(!isWasmInitialized) {
11059                         throw new Error("initializeWasm() must be awaited first!");
11060                 }
11061                 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
11062                 return decodeArray(nativeResponseValue);
11063         }
11064         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11065         export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
11066                 if(!isWasmInitialized) {
11067                         throw new Error("initializeWasm() must be awaited first!");
11068                 }
11069                 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
11070                 // debug statements here
11071         }
11072         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
11073         export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
11074                 if(!isWasmInitialized) {
11075                         throw new Error("initializeWasm() must be awaited first!");
11076                 }
11077                 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
11078                 return nativeResponseValue;
11079         }
11080         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
11081         export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
11082                 if(!isWasmInitialized) {
11083                         throw new Error("initializeWasm() must be awaited first!");
11084                 }
11085                 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
11086                 // debug statements here
11087         }
11088         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
11089         export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
11090                 if(!isWasmInitialized) {
11091                         throw new Error("initializeWasm() must be awaited first!");
11092                 }
11093                 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
11094                 return nativeResponseValue;
11095         }
11096         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
11097         export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
11098                 if(!isWasmInitialized) {
11099                         throw new Error("initializeWasm() must be awaited first!");
11100                 }
11101                 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
11102                 // debug statements here
11103         }
11104         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
11105         export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
11106                 if(!isWasmInitialized) {
11107                         throw new Error("initializeWasm() must be awaited first!");
11108                 }
11109                 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
11110                 return decodeArray(nativeResponseValue);
11111         }
11112         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11113         export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
11114                 if(!isWasmInitialized) {
11115                         throw new Error("initializeWasm() must be awaited first!");
11116                 }
11117                 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
11118                 // debug statements here
11119         }
11120         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
11121         export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
11122                 if(!isWasmInitialized) {
11123                         throw new Error("initializeWasm() must be awaited first!");
11124                 }
11125                 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
11126                 return nativeResponseValue;
11127         }
11128         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
11129         export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
11130                 if(!isWasmInitialized) {
11131                         throw new Error("initializeWasm() must be awaited first!");
11132                 }
11133                 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
11134                 // debug statements here
11135         }
11136         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
11137         export function UpdateAddHTLC_clone(orig: number): number {
11138                 if(!isWasmInitialized) {
11139                         throw new Error("initializeWasm() must be awaited first!");
11140                 }
11141                 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
11142                 return nativeResponseValue;
11143         }
11144         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
11145         export function UpdateFulfillHTLC_free(this_obj: number): void {
11146                 if(!isWasmInitialized) {
11147                         throw new Error("initializeWasm() must be awaited first!");
11148                 }
11149                 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
11150                 // debug statements here
11151         }
11152         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
11153         export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
11154                 if(!isWasmInitialized) {
11155                         throw new Error("initializeWasm() must be awaited first!");
11156                 }
11157                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
11158                 return decodeArray(nativeResponseValue);
11159         }
11160         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11161         export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
11162                 if(!isWasmInitialized) {
11163                         throw new Error("initializeWasm() must be awaited first!");
11164                 }
11165                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
11166                 // debug statements here
11167         }
11168         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
11169         export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
11170                 if(!isWasmInitialized) {
11171                         throw new Error("initializeWasm() must be awaited first!");
11172                 }
11173                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
11174                 return nativeResponseValue;
11175         }
11176         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
11177         export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
11178                 if(!isWasmInitialized) {
11179                         throw new Error("initializeWasm() must be awaited first!");
11180                 }
11181                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
11182                 // debug statements here
11183         }
11184         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
11185         export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
11186                 if(!isWasmInitialized) {
11187                         throw new Error("initializeWasm() must be awaited first!");
11188                 }
11189                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
11190                 return decodeArray(nativeResponseValue);
11191         }
11192         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11193         export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
11194                 if(!isWasmInitialized) {
11195                         throw new Error("initializeWasm() must be awaited first!");
11196                 }
11197                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
11198                 // debug statements here
11199         }
11200         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
11201         export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
11202                 if(!isWasmInitialized) {
11203                         throw new Error("initializeWasm() must be awaited first!");
11204                 }
11205                 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
11206                 return nativeResponseValue;
11207         }
11208         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
11209         export function UpdateFulfillHTLC_clone(orig: number): number {
11210                 if(!isWasmInitialized) {
11211                         throw new Error("initializeWasm() must be awaited first!");
11212                 }
11213                 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
11214                 return nativeResponseValue;
11215         }
11216         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
11217         export function UpdateFailHTLC_free(this_obj: number): void {
11218                 if(!isWasmInitialized) {
11219                         throw new Error("initializeWasm() must be awaited first!");
11220                 }
11221                 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
11222                 // debug statements here
11223         }
11224         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
11225         export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
11226                 if(!isWasmInitialized) {
11227                         throw new Error("initializeWasm() must be awaited first!");
11228                 }
11229                 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
11230                 return decodeArray(nativeResponseValue);
11231         }
11232         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11233         export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
11234                 if(!isWasmInitialized) {
11235                         throw new Error("initializeWasm() must be awaited first!");
11236                 }
11237                 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
11238                 // debug statements here
11239         }
11240         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
11241         export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
11242                 if(!isWasmInitialized) {
11243                         throw new Error("initializeWasm() must be awaited first!");
11244                 }
11245                 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
11246                 return nativeResponseValue;
11247         }
11248         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
11249         export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
11250                 if(!isWasmInitialized) {
11251                         throw new Error("initializeWasm() must be awaited first!");
11252                 }
11253                 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
11254                 // debug statements here
11255         }
11256         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
11257         export function UpdateFailHTLC_clone(orig: number): number {
11258                 if(!isWasmInitialized) {
11259                         throw new Error("initializeWasm() must be awaited first!");
11260                 }
11261                 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
11262                 return nativeResponseValue;
11263         }
11264         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
11265         export function UpdateFailMalformedHTLC_free(this_obj: number): void {
11266                 if(!isWasmInitialized) {
11267                         throw new Error("initializeWasm() must be awaited first!");
11268                 }
11269                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
11270                 // debug statements here
11271         }
11272         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
11273         export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
11274                 if(!isWasmInitialized) {
11275                         throw new Error("initializeWasm() must be awaited first!");
11276                 }
11277                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
11278                 return decodeArray(nativeResponseValue);
11279         }
11280         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11281         export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
11282                 if(!isWasmInitialized) {
11283                         throw new Error("initializeWasm() must be awaited first!");
11284                 }
11285                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
11286                 // debug statements here
11287         }
11288         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
11289         export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
11290                 if(!isWasmInitialized) {
11291                         throw new Error("initializeWasm() must be awaited first!");
11292                 }
11293                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
11294                 return nativeResponseValue;
11295         }
11296         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
11297         export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
11298                 if(!isWasmInitialized) {
11299                         throw new Error("initializeWasm() must be awaited first!");
11300                 }
11301                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
11302                 // debug statements here
11303         }
11304         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
11305         export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
11306                 if(!isWasmInitialized) {
11307                         throw new Error("initializeWasm() must be awaited first!");
11308                 }
11309                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
11310                 return nativeResponseValue;
11311         }
11312         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
11313         export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
11314                 if(!isWasmInitialized) {
11315                         throw new Error("initializeWasm() must be awaited first!");
11316                 }
11317                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
11318                 // debug statements here
11319         }
11320         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
11321         export function UpdateFailMalformedHTLC_clone(orig: number): number {
11322                 if(!isWasmInitialized) {
11323                         throw new Error("initializeWasm() must be awaited first!");
11324                 }
11325                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
11326                 return nativeResponseValue;
11327         }
11328         // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
11329         export function CommitmentSigned_free(this_obj: number): void {
11330                 if(!isWasmInitialized) {
11331                         throw new Error("initializeWasm() must be awaited first!");
11332                 }
11333                 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
11334                 // debug statements here
11335         }
11336         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
11337         export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
11338                 if(!isWasmInitialized) {
11339                         throw new Error("initializeWasm() must be awaited first!");
11340                 }
11341                 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
11342                 return decodeArray(nativeResponseValue);
11343         }
11344         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11345         export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
11346                 if(!isWasmInitialized) {
11347                         throw new Error("initializeWasm() must be awaited first!");
11348                 }
11349                 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
11350                 // debug statements here
11351         }
11352         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
11353         export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
11354                 if(!isWasmInitialized) {
11355                         throw new Error("initializeWasm() must be awaited first!");
11356                 }
11357                 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
11358                 return decodeArray(nativeResponseValue);
11359         }
11360         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
11361         export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
11362                 if(!isWasmInitialized) {
11363                         throw new Error("initializeWasm() must be awaited first!");
11364                 }
11365                 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
11366                 // debug statements here
11367         }
11368         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
11369         export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
11370                 if(!isWasmInitialized) {
11371                         throw new Error("initializeWasm() must be awaited first!");
11372                 }
11373                 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
11374                 // debug statements here
11375         }
11376         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
11377         export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
11378                 if(!isWasmInitialized) {
11379                         throw new Error("initializeWasm() must be awaited first!");
11380                 }
11381                 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
11382                 return nativeResponseValue;
11383         }
11384         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
11385         export function CommitmentSigned_clone(orig: number): number {
11386                 if(!isWasmInitialized) {
11387                         throw new Error("initializeWasm() must be awaited first!");
11388                 }
11389                 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
11390                 return nativeResponseValue;
11391         }
11392         // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
11393         export function RevokeAndACK_free(this_obj: number): void {
11394                 if(!isWasmInitialized) {
11395                         throw new Error("initializeWasm() must be awaited first!");
11396                 }
11397                 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
11398                 // debug statements here
11399         }
11400         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
11401         export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
11402                 if(!isWasmInitialized) {
11403                         throw new Error("initializeWasm() must be awaited first!");
11404                 }
11405                 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
11406                 return decodeArray(nativeResponseValue);
11407         }
11408         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11409         export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
11410                 if(!isWasmInitialized) {
11411                         throw new Error("initializeWasm() must be awaited first!");
11412                 }
11413                 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
11414                 // debug statements here
11415         }
11416         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
11417         export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
11418                 if(!isWasmInitialized) {
11419                         throw new Error("initializeWasm() must be awaited first!");
11420                 }
11421                 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
11422                 return decodeArray(nativeResponseValue);
11423         }
11424         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11425         export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
11426                 if(!isWasmInitialized) {
11427                         throw new Error("initializeWasm() must be awaited first!");
11428                 }
11429                 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
11430                 // debug statements here
11431         }
11432         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
11433         export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
11434                 if(!isWasmInitialized) {
11435                         throw new Error("initializeWasm() must be awaited first!");
11436                 }
11437                 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
11438                 return decodeArray(nativeResponseValue);
11439         }
11440         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11441         export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11442                 if(!isWasmInitialized) {
11443                         throw new Error("initializeWasm() must be awaited first!");
11444                 }
11445                 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
11446                 // debug statements here
11447         }
11448         // 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);
11449         export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
11450                 if(!isWasmInitialized) {
11451                         throw new Error("initializeWasm() must be awaited first!");
11452                 }
11453                 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
11454                 return nativeResponseValue;
11455         }
11456         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
11457         export function RevokeAndACK_clone(orig: number): number {
11458                 if(!isWasmInitialized) {
11459                         throw new Error("initializeWasm() must be awaited first!");
11460                 }
11461                 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
11462                 return nativeResponseValue;
11463         }
11464         // void UpdateFee_free(struct LDKUpdateFee this_obj);
11465         export function UpdateFee_free(this_obj: number): void {
11466                 if(!isWasmInitialized) {
11467                         throw new Error("initializeWasm() must be awaited first!");
11468                 }
11469                 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
11470                 // debug statements here
11471         }
11472         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
11473         export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
11474                 if(!isWasmInitialized) {
11475                         throw new Error("initializeWasm() must be awaited first!");
11476                 }
11477                 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
11478                 return decodeArray(nativeResponseValue);
11479         }
11480         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11481         export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
11482                 if(!isWasmInitialized) {
11483                         throw new Error("initializeWasm() must be awaited first!");
11484                 }
11485                 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
11486                 // debug statements here
11487         }
11488         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
11489         export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
11490                 if(!isWasmInitialized) {
11491                         throw new Error("initializeWasm() must be awaited first!");
11492                 }
11493                 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
11494                 return nativeResponseValue;
11495         }
11496         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
11497         export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
11498                 if(!isWasmInitialized) {
11499                         throw new Error("initializeWasm() must be awaited first!");
11500                 }
11501                 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
11502                 // debug statements here
11503         }
11504         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
11505         export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
11506                 if(!isWasmInitialized) {
11507                         throw new Error("initializeWasm() must be awaited first!");
11508                 }
11509                 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
11510                 return nativeResponseValue;
11511         }
11512         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
11513         export function UpdateFee_clone(orig: number): number {
11514                 if(!isWasmInitialized) {
11515                         throw new Error("initializeWasm() must be awaited first!");
11516                 }
11517                 const nativeResponseValue = wasm.UpdateFee_clone(orig);
11518                 return nativeResponseValue;
11519         }
11520         // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
11521         export function DataLossProtect_free(this_obj: number): void {
11522                 if(!isWasmInitialized) {
11523                         throw new Error("initializeWasm() must be awaited first!");
11524                 }
11525                 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
11526                 // debug statements here
11527         }
11528         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
11529         export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
11530                 if(!isWasmInitialized) {
11531                         throw new Error("initializeWasm() must be awaited first!");
11532                 }
11533                 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
11534                 return decodeArray(nativeResponseValue);
11535         }
11536         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11537         export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
11538                 if(!isWasmInitialized) {
11539                         throw new Error("initializeWasm() must be awaited first!");
11540                 }
11541                 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
11542                 // debug statements here
11543         }
11544         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
11545         export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
11546                 if(!isWasmInitialized) {
11547                         throw new Error("initializeWasm() must be awaited first!");
11548                 }
11549                 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
11550                 return decodeArray(nativeResponseValue);
11551         }
11552         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11553         export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11554                 if(!isWasmInitialized) {
11555                         throw new Error("initializeWasm() must be awaited first!");
11556                 }
11557                 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
11558                 // debug statements here
11559         }
11560         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
11561         export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
11562                 if(!isWasmInitialized) {
11563                         throw new Error("initializeWasm() must be awaited first!");
11564                 }
11565                 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
11566                 return nativeResponseValue;
11567         }
11568         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
11569         export function DataLossProtect_clone(orig: number): number {
11570                 if(!isWasmInitialized) {
11571                         throw new Error("initializeWasm() must be awaited first!");
11572                 }
11573                 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
11574                 return nativeResponseValue;
11575         }
11576         // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
11577         export function ChannelReestablish_free(this_obj: number): void {
11578                 if(!isWasmInitialized) {
11579                         throw new Error("initializeWasm() must be awaited first!");
11580                 }
11581                 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
11582                 // debug statements here
11583         }
11584         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
11585         export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
11586                 if(!isWasmInitialized) {
11587                         throw new Error("initializeWasm() must be awaited first!");
11588                 }
11589                 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
11590                 return decodeArray(nativeResponseValue);
11591         }
11592         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11593         export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
11594                 if(!isWasmInitialized) {
11595                         throw new Error("initializeWasm() must be awaited first!");
11596                 }
11597                 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
11598                 // debug statements here
11599         }
11600         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
11601         export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
11602                 if(!isWasmInitialized) {
11603                         throw new Error("initializeWasm() must be awaited first!");
11604                 }
11605                 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
11606                 return nativeResponseValue;
11607         }
11608         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
11609         export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
11610                 if(!isWasmInitialized) {
11611                         throw new Error("initializeWasm() must be awaited first!");
11612                 }
11613                 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
11614                 // debug statements here
11615         }
11616         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
11617         export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
11618                 if(!isWasmInitialized) {
11619                         throw new Error("initializeWasm() must be awaited first!");
11620                 }
11621                 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
11622                 return nativeResponseValue;
11623         }
11624         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
11625         export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
11626                 if(!isWasmInitialized) {
11627                         throw new Error("initializeWasm() must be awaited first!");
11628                 }
11629                 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
11630                 // debug statements here
11631         }
11632         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
11633         export function ChannelReestablish_clone(orig: number): number {
11634                 if(!isWasmInitialized) {
11635                         throw new Error("initializeWasm() must be awaited first!");
11636                 }
11637                 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
11638                 return nativeResponseValue;
11639         }
11640         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
11641         export function AnnouncementSignatures_free(this_obj: number): void {
11642                 if(!isWasmInitialized) {
11643                         throw new Error("initializeWasm() must be awaited first!");
11644                 }
11645                 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
11646                 // debug statements here
11647         }
11648         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
11649         export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
11650                 if(!isWasmInitialized) {
11651                         throw new Error("initializeWasm() must be awaited first!");
11652                 }
11653                 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
11654                 return decodeArray(nativeResponseValue);
11655         }
11656         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11657         export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
11658                 if(!isWasmInitialized) {
11659                         throw new Error("initializeWasm() must be awaited first!");
11660                 }
11661                 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
11662                 // debug statements here
11663         }
11664         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
11665         export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
11666                 if(!isWasmInitialized) {
11667                         throw new Error("initializeWasm() must be awaited first!");
11668                 }
11669                 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
11670                 return nativeResponseValue;
11671         }
11672         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
11673         export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
11674                 if(!isWasmInitialized) {
11675                         throw new Error("initializeWasm() must be awaited first!");
11676                 }
11677                 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
11678                 // debug statements here
11679         }
11680         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
11681         export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
11682                 if(!isWasmInitialized) {
11683                         throw new Error("initializeWasm() must be awaited first!");
11684                 }
11685                 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
11686                 return decodeArray(nativeResponseValue);
11687         }
11688         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
11689         export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
11690                 if(!isWasmInitialized) {
11691                         throw new Error("initializeWasm() must be awaited first!");
11692                 }
11693                 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
11694                 // debug statements here
11695         }
11696         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
11697         export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
11698                 if(!isWasmInitialized) {
11699                         throw new Error("initializeWasm() must be awaited first!");
11700                 }
11701                 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
11702                 return decodeArray(nativeResponseValue);
11703         }
11704         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
11705         export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
11706                 if(!isWasmInitialized) {
11707                         throw new Error("initializeWasm() must be awaited first!");
11708                 }
11709                 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
11710                 // debug statements here
11711         }
11712         // 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);
11713         export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
11714                 if(!isWasmInitialized) {
11715                         throw new Error("initializeWasm() must be awaited first!");
11716                 }
11717                 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
11718                 return nativeResponseValue;
11719         }
11720         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
11721         export function AnnouncementSignatures_clone(orig: number): number {
11722                 if(!isWasmInitialized) {
11723                         throw new Error("initializeWasm() must be awaited first!");
11724                 }
11725                 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
11726                 return nativeResponseValue;
11727         }
11728         // void NetAddress_free(struct LDKNetAddress this_ptr);
11729         export function NetAddress_free(this_ptr: number): void {
11730                 if(!isWasmInitialized) {
11731                         throw new Error("initializeWasm() must be awaited first!");
11732                 }
11733                 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
11734                 // debug statements here
11735         }
11736         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
11737         export function NetAddress_clone(orig: number): number {
11738                 if(!isWasmInitialized) {
11739                         throw new Error("initializeWasm() must be awaited first!");
11740                 }
11741                 const nativeResponseValue = wasm.NetAddress_clone(orig);
11742                 return nativeResponseValue;
11743         }
11744         // struct LDKNetAddress NetAddress_ipv4(struct LDKFourBytes addr, uint16_t port);
11745         export function NetAddress_ipv4(addr: Uint8Array, port: number): number {
11746                 if(!isWasmInitialized) {
11747                         throw new Error("initializeWasm() must be awaited first!");
11748                 }
11749                 const nativeResponseValue = wasm.NetAddress_ipv4(encodeArray(addr), port);
11750                 return nativeResponseValue;
11751         }
11752         // struct LDKNetAddress NetAddress_ipv6(struct LDKSixteenBytes addr, uint16_t port);
11753         export function NetAddress_ipv6(addr: Uint8Array, port: number): number {
11754                 if(!isWasmInitialized) {
11755                         throw new Error("initializeWasm() must be awaited first!");
11756                 }
11757                 const nativeResponseValue = wasm.NetAddress_ipv6(encodeArray(addr), port);
11758                 return nativeResponseValue;
11759         }
11760         // struct LDKNetAddress NetAddress_onion_v2(struct LDKTenBytes addr, uint16_t port);
11761         export function NetAddress_onion_v2(addr: Uint8Array, port: number): number {
11762                 if(!isWasmInitialized) {
11763                         throw new Error("initializeWasm() must be awaited first!");
11764                 }
11765                 const nativeResponseValue = wasm.NetAddress_onion_v2(encodeArray(addr), port);
11766                 return nativeResponseValue;
11767         }
11768         // struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
11769         export function NetAddress_onion_v3(ed25519_pubkey: Uint8Array, checksum: number, version: number, port: number): number {
11770                 if(!isWasmInitialized) {
11771                         throw new Error("initializeWasm() must be awaited first!");
11772                 }
11773                 const nativeResponseValue = wasm.NetAddress_onion_v3(encodeArray(ed25519_pubkey), checksum, version, port);
11774                 return nativeResponseValue;
11775         }
11776         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
11777         export function NetAddress_write(obj: number): Uint8Array {
11778                 if(!isWasmInitialized) {
11779                         throw new Error("initializeWasm() must be awaited first!");
11780                 }
11781                 const nativeResponseValue = wasm.NetAddress_write(obj);
11782                 return decodeArray(nativeResponseValue);
11783         }
11784         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
11785         export function Result_read(ser: Uint8Array): number {
11786                 if(!isWasmInitialized) {
11787                         throw new Error("initializeWasm() must be awaited first!");
11788                 }
11789                 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
11790                 return nativeResponseValue;
11791         }
11792         // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
11793         export function NetAddress_read(ser: Uint8Array): number {
11794                 if(!isWasmInitialized) {
11795                         throw new Error("initializeWasm() must be awaited first!");
11796                 }
11797                 const nativeResponseValue = wasm.NetAddress_read(encodeArray(ser));
11798                 return nativeResponseValue;
11799         }
11800         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
11801         export function UnsignedNodeAnnouncement_free(this_obj: number): void {
11802                 if(!isWasmInitialized) {
11803                         throw new Error("initializeWasm() must be awaited first!");
11804                 }
11805                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
11806                 // debug statements here
11807         }
11808         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
11809         export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
11810                 if(!isWasmInitialized) {
11811                         throw new Error("initializeWasm() must be awaited first!");
11812                 }
11813                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
11814                 return nativeResponseValue;
11815         }
11816         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
11817         export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
11818                 if(!isWasmInitialized) {
11819                         throw new Error("initializeWasm() must be awaited first!");
11820                 }
11821                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
11822                 // debug statements here
11823         }
11824         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
11825         export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
11826                 if(!isWasmInitialized) {
11827                         throw new Error("initializeWasm() must be awaited first!");
11828                 }
11829                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
11830                 return nativeResponseValue;
11831         }
11832         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
11833         export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
11834                 if(!isWasmInitialized) {
11835                         throw new Error("initializeWasm() must be awaited first!");
11836                 }
11837                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
11838                 // debug statements here
11839         }
11840         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
11841         export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
11842                 if(!isWasmInitialized) {
11843                         throw new Error("initializeWasm() must be awaited first!");
11844                 }
11845                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
11846                 return decodeArray(nativeResponseValue);
11847         }
11848         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11849         export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
11850                 if(!isWasmInitialized) {
11851                         throw new Error("initializeWasm() must be awaited first!");
11852                 }
11853                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
11854                 // debug statements here
11855         }
11856         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
11857         export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
11858                 if(!isWasmInitialized) {
11859                         throw new Error("initializeWasm() must be awaited first!");
11860                 }
11861                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
11862                 return decodeArray(nativeResponseValue);
11863         }
11864         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
11865         export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
11866                 if(!isWasmInitialized) {
11867                         throw new Error("initializeWasm() must be awaited first!");
11868                 }
11869                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
11870                 // debug statements here
11871         }
11872         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
11873         export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
11874                 if(!isWasmInitialized) {
11875                         throw new Error("initializeWasm() must be awaited first!");
11876                 }
11877                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
11878                 return decodeArray(nativeResponseValue);
11879         }
11880         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11881         export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
11882                 if(!isWasmInitialized) {
11883                         throw new Error("initializeWasm() must be awaited first!");
11884                 }
11885                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
11886                 // debug statements here
11887         }
11888         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
11889         export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
11890                 if(!isWasmInitialized) {
11891                         throw new Error("initializeWasm() must be awaited first!");
11892                 }
11893                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
11894                 // debug statements here
11895         }
11896         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
11897         export function UnsignedNodeAnnouncement_clone(orig: number): number {
11898                 if(!isWasmInitialized) {
11899                         throw new Error("initializeWasm() must be awaited first!");
11900                 }
11901                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
11902                 return nativeResponseValue;
11903         }
11904         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
11905         export function NodeAnnouncement_free(this_obj: number): void {
11906                 if(!isWasmInitialized) {
11907                         throw new Error("initializeWasm() must be awaited first!");
11908                 }
11909                 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
11910                 // debug statements here
11911         }
11912         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
11913         export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
11914                 if(!isWasmInitialized) {
11915                         throw new Error("initializeWasm() must be awaited first!");
11916                 }
11917                 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
11918                 return decodeArray(nativeResponseValue);
11919         }
11920         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
11921         export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
11922                 if(!isWasmInitialized) {
11923                         throw new Error("initializeWasm() must be awaited first!");
11924                 }
11925                 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
11926                 // debug statements here
11927         }
11928         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
11929         export function NodeAnnouncement_get_contents(this_ptr: number): number {
11930                 if(!isWasmInitialized) {
11931                         throw new Error("initializeWasm() must be awaited first!");
11932                 }
11933                 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
11934                 return nativeResponseValue;
11935         }
11936         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
11937         export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
11938                 if(!isWasmInitialized) {
11939                         throw new Error("initializeWasm() must be awaited first!");
11940                 }
11941                 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
11942                 // debug statements here
11943         }
11944         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
11945         export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
11946                 if(!isWasmInitialized) {
11947                         throw new Error("initializeWasm() must be awaited first!");
11948                 }
11949                 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
11950                 return nativeResponseValue;
11951         }
11952         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
11953         export function NodeAnnouncement_clone(orig: number): number {
11954                 if(!isWasmInitialized) {
11955                         throw new Error("initializeWasm() must be awaited first!");
11956                 }
11957                 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
11958                 return nativeResponseValue;
11959         }
11960         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
11961         export function UnsignedChannelAnnouncement_free(this_obj: number): void {
11962                 if(!isWasmInitialized) {
11963                         throw new Error("initializeWasm() must be awaited first!");
11964                 }
11965                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
11966                 // debug statements here
11967         }
11968         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
11969         export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
11970                 if(!isWasmInitialized) {
11971                         throw new Error("initializeWasm() must be awaited first!");
11972                 }
11973                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
11974                 return nativeResponseValue;
11975         }
11976         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
11977         export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
11978                 if(!isWasmInitialized) {
11979                         throw new Error("initializeWasm() must be awaited first!");
11980                 }
11981                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
11982                 // debug statements here
11983         }
11984         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
11985         export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
11986                 if(!isWasmInitialized) {
11987                         throw new Error("initializeWasm() must be awaited first!");
11988                 }
11989                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
11990                 return decodeArray(nativeResponseValue);
11991         }
11992         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11993         export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
11994                 if(!isWasmInitialized) {
11995                         throw new Error("initializeWasm() must be awaited first!");
11996                 }
11997                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
11998                 // debug statements here
11999         }
12000         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12001         export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
12002                 if(!isWasmInitialized) {
12003                         throw new Error("initializeWasm() must be awaited first!");
12004                 }
12005                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
12006                 return nativeResponseValue;
12007         }
12008         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
12009         export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
12010                 if(!isWasmInitialized) {
12011                         throw new Error("initializeWasm() must be awaited first!");
12012                 }
12013                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
12014                 // debug statements here
12015         }
12016         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12017         export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
12018                 if(!isWasmInitialized) {
12019                         throw new Error("initializeWasm() must be awaited first!");
12020                 }
12021                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
12022                 return decodeArray(nativeResponseValue);
12023         }
12024         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12025         export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
12026                 if(!isWasmInitialized) {
12027                         throw new Error("initializeWasm() must be awaited first!");
12028                 }
12029                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
12030                 // debug statements here
12031         }
12032         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12033         export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
12034                 if(!isWasmInitialized) {
12035                         throw new Error("initializeWasm() must be awaited first!");
12036                 }
12037                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
12038                 return decodeArray(nativeResponseValue);
12039         }
12040         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12041         export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
12042                 if(!isWasmInitialized) {
12043                         throw new Error("initializeWasm() must be awaited first!");
12044                 }
12045                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
12046                 // debug statements here
12047         }
12048         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12049         export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
12050                 if(!isWasmInitialized) {
12051                         throw new Error("initializeWasm() must be awaited first!");
12052                 }
12053                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
12054                 return decodeArray(nativeResponseValue);
12055         }
12056         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12057         export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
12058                 if(!isWasmInitialized) {
12059                         throw new Error("initializeWasm() must be awaited first!");
12060                 }
12061                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
12062                 // debug statements here
12063         }
12064         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12065         export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
12066                 if(!isWasmInitialized) {
12067                         throw new Error("initializeWasm() must be awaited first!");
12068                 }
12069                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
12070                 return decodeArray(nativeResponseValue);
12071         }
12072         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12073         export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
12074                 if(!isWasmInitialized) {
12075                         throw new Error("initializeWasm() must be awaited first!");
12076                 }
12077                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
12078                 // debug statements here
12079         }
12080         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
12081         export function UnsignedChannelAnnouncement_clone(orig: number): number {
12082                 if(!isWasmInitialized) {
12083                         throw new Error("initializeWasm() must be awaited first!");
12084                 }
12085                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
12086                 return nativeResponseValue;
12087         }
12088         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
12089         export function ChannelAnnouncement_free(this_obj: number): void {
12090                 if(!isWasmInitialized) {
12091                         throw new Error("initializeWasm() must be awaited first!");
12092                 }
12093                 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
12094                 // debug statements here
12095         }
12096         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12097         export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
12098                 if(!isWasmInitialized) {
12099                         throw new Error("initializeWasm() must be awaited first!");
12100                 }
12101                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
12102                 return decodeArray(nativeResponseValue);
12103         }
12104         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12105         export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
12106                 if(!isWasmInitialized) {
12107                         throw new Error("initializeWasm() must be awaited first!");
12108                 }
12109                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
12110                 // debug statements here
12111         }
12112         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12113         export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
12114                 if(!isWasmInitialized) {
12115                         throw new Error("initializeWasm() must be awaited first!");
12116                 }
12117                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
12118                 return decodeArray(nativeResponseValue);
12119         }
12120         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12121         export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
12122                 if(!isWasmInitialized) {
12123                         throw new Error("initializeWasm() must be awaited first!");
12124                 }
12125                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
12126                 // debug statements here
12127         }
12128         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12129         export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
12130                 if(!isWasmInitialized) {
12131                         throw new Error("initializeWasm() must be awaited first!");
12132                 }
12133                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
12134                 return decodeArray(nativeResponseValue);
12135         }
12136         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12137         export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
12138                 if(!isWasmInitialized) {
12139                         throw new Error("initializeWasm() must be awaited first!");
12140                 }
12141                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
12142                 // debug statements here
12143         }
12144         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12145         export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
12146                 if(!isWasmInitialized) {
12147                         throw new Error("initializeWasm() must be awaited first!");
12148                 }
12149                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
12150                 return decodeArray(nativeResponseValue);
12151         }
12152         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12153         export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
12154                 if(!isWasmInitialized) {
12155                         throw new Error("initializeWasm() must be awaited first!");
12156                 }
12157                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
12158                 // debug statements here
12159         }
12160         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12161         export function ChannelAnnouncement_get_contents(this_ptr: number): number {
12162                 if(!isWasmInitialized) {
12163                         throw new Error("initializeWasm() must be awaited first!");
12164                 }
12165                 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
12166                 return nativeResponseValue;
12167         }
12168         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
12169         export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
12170                 if(!isWasmInitialized) {
12171                         throw new Error("initializeWasm() must be awaited first!");
12172                 }
12173                 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
12174                 // debug statements here
12175         }
12176         // 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);
12177         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 {
12178                 if(!isWasmInitialized) {
12179                         throw new Error("initializeWasm() must be awaited first!");
12180                 }
12181                 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);
12182                 return nativeResponseValue;
12183         }
12184         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
12185         export function ChannelAnnouncement_clone(orig: number): number {
12186                 if(!isWasmInitialized) {
12187                         throw new Error("initializeWasm() must be awaited first!");
12188                 }
12189                 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
12190                 return nativeResponseValue;
12191         }
12192         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
12193         export function UnsignedChannelUpdate_free(this_obj: number): void {
12194                 if(!isWasmInitialized) {
12195                         throw new Error("initializeWasm() must be awaited first!");
12196                 }
12197                 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
12198                 // debug statements here
12199         }
12200         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
12201         export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
12202                 if(!isWasmInitialized) {
12203                         throw new Error("initializeWasm() must be awaited first!");
12204                 }
12205                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
12206                 return decodeArray(nativeResponseValue);
12207         }
12208         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12209         export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12210                 if(!isWasmInitialized) {
12211                         throw new Error("initializeWasm() must be awaited first!");
12212                 }
12213                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
12214                 // debug statements here
12215         }
12216         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12217         export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
12218                 if(!isWasmInitialized) {
12219                         throw new Error("initializeWasm() must be awaited first!");
12220                 }
12221                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
12222                 return nativeResponseValue;
12223         }
12224         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
12225         export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
12226                 if(!isWasmInitialized) {
12227                         throw new Error("initializeWasm() must be awaited first!");
12228                 }
12229                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
12230                 // debug statements here
12231         }
12232         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12233         export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
12234                 if(!isWasmInitialized) {
12235                         throw new Error("initializeWasm() must be awaited first!");
12236                 }
12237                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
12238                 return nativeResponseValue;
12239         }
12240         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
12241         export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
12242                 if(!isWasmInitialized) {
12243                         throw new Error("initializeWasm() must be awaited first!");
12244                 }
12245                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
12246                 // debug statements here
12247         }
12248         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12249         export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
12250                 if(!isWasmInitialized) {
12251                         throw new Error("initializeWasm() must be awaited first!");
12252                 }
12253                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
12254                 return nativeResponseValue;
12255         }
12256         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
12257         export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
12258                 if(!isWasmInitialized) {
12259                         throw new Error("initializeWasm() must be awaited first!");
12260                 }
12261                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
12262                 // debug statements here
12263         }
12264         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12265         export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
12266                 if(!isWasmInitialized) {
12267                         throw new Error("initializeWasm() must be awaited first!");
12268                 }
12269                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
12270                 return nativeResponseValue;
12271         }
12272         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
12273         export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
12274                 if(!isWasmInitialized) {
12275                         throw new Error("initializeWasm() must be awaited first!");
12276                 }
12277                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
12278                 // debug statements here
12279         }
12280         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12281         export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
12282                 if(!isWasmInitialized) {
12283                         throw new Error("initializeWasm() must be awaited first!");
12284                 }
12285                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
12286                 return nativeResponseValue;
12287         }
12288         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
12289         export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
12290                 if(!isWasmInitialized) {
12291                         throw new Error("initializeWasm() must be awaited first!");
12292                 }
12293                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
12294                 // debug statements here
12295         }
12296         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12297         export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
12298                 if(!isWasmInitialized) {
12299                         throw new Error("initializeWasm() must be awaited first!");
12300                 }
12301                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
12302                 return nativeResponseValue;
12303         }
12304         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
12305         export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
12306                 if(!isWasmInitialized) {
12307                         throw new Error("initializeWasm() must be awaited first!");
12308                 }
12309                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
12310                 // debug statements here
12311         }
12312         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12313         export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
12314                 if(!isWasmInitialized) {
12315                         throw new Error("initializeWasm() must be awaited first!");
12316                 }
12317                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
12318                 return nativeResponseValue;
12319         }
12320         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
12321         export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
12322                 if(!isWasmInitialized) {
12323                         throw new Error("initializeWasm() must be awaited first!");
12324                 }
12325                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
12326                 // debug statements here
12327         }
12328         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
12329         export function UnsignedChannelUpdate_clone(orig: number): number {
12330                 if(!isWasmInitialized) {
12331                         throw new Error("initializeWasm() must be awaited first!");
12332                 }
12333                 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
12334                 return nativeResponseValue;
12335         }
12336         // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
12337         export function ChannelUpdate_free(this_obj: number): void {
12338                 if(!isWasmInitialized) {
12339                         throw new Error("initializeWasm() must be awaited first!");
12340                 }
12341                 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
12342                 // debug statements here
12343         }
12344         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
12345         export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
12346                 if(!isWasmInitialized) {
12347                         throw new Error("initializeWasm() must be awaited first!");
12348                 }
12349                 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
12350                 return decodeArray(nativeResponseValue);
12351         }
12352         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
12353         export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
12354                 if(!isWasmInitialized) {
12355                         throw new Error("initializeWasm() must be awaited first!");
12356                 }
12357                 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
12358                 // debug statements here
12359         }
12360         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
12361         export function ChannelUpdate_get_contents(this_ptr: number): number {
12362                 if(!isWasmInitialized) {
12363                         throw new Error("initializeWasm() must be awaited first!");
12364                 }
12365                 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
12366                 return nativeResponseValue;
12367         }
12368         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
12369         export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
12370                 if(!isWasmInitialized) {
12371                         throw new Error("initializeWasm() must be awaited first!");
12372                 }
12373                 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
12374                 // debug statements here
12375         }
12376         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
12377         export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
12378                 if(!isWasmInitialized) {
12379                         throw new Error("initializeWasm() must be awaited first!");
12380                 }
12381                 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
12382                 return nativeResponseValue;
12383         }
12384         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
12385         export function ChannelUpdate_clone(orig: number): number {
12386                 if(!isWasmInitialized) {
12387                         throw new Error("initializeWasm() must be awaited first!");
12388                 }
12389                 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
12390                 return nativeResponseValue;
12391         }
12392         // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
12393         export function QueryChannelRange_free(this_obj: number): void {
12394                 if(!isWasmInitialized) {
12395                         throw new Error("initializeWasm() must be awaited first!");
12396                 }
12397                 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
12398                 // debug statements here
12399         }
12400         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
12401         export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
12402                 if(!isWasmInitialized) {
12403                         throw new Error("initializeWasm() must be awaited first!");
12404                 }
12405                 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
12406                 return decodeArray(nativeResponseValue);
12407         }
12408         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12409         export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12410                 if(!isWasmInitialized) {
12411                         throw new Error("initializeWasm() must be awaited first!");
12412                 }
12413                 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
12414                 // debug statements here
12415         }
12416         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
12417         export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
12418                 if(!isWasmInitialized) {
12419                         throw new Error("initializeWasm() must be awaited first!");
12420                 }
12421                 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
12422                 return nativeResponseValue;
12423         }
12424         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
12425         export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
12426                 if(!isWasmInitialized) {
12427                         throw new Error("initializeWasm() must be awaited first!");
12428                 }
12429                 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
12430                 // debug statements here
12431         }
12432         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
12433         export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
12434                 if(!isWasmInitialized) {
12435                         throw new Error("initializeWasm() must be awaited first!");
12436                 }
12437                 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
12438                 return nativeResponseValue;
12439         }
12440         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
12441         export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
12442                 if(!isWasmInitialized) {
12443                         throw new Error("initializeWasm() must be awaited first!");
12444                 }
12445                 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
12446                 // debug statements here
12447         }
12448         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
12449         export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
12450                 if(!isWasmInitialized) {
12451                         throw new Error("initializeWasm() must be awaited first!");
12452                 }
12453                 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
12454                 return nativeResponseValue;
12455         }
12456         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
12457         export function QueryChannelRange_clone(orig: number): number {
12458                 if(!isWasmInitialized) {
12459                         throw new Error("initializeWasm() must be awaited first!");
12460                 }
12461                 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
12462                 return nativeResponseValue;
12463         }
12464         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
12465         export function ReplyChannelRange_free(this_obj: number): void {
12466                 if(!isWasmInitialized) {
12467                         throw new Error("initializeWasm() must be awaited first!");
12468                 }
12469                 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
12470                 // debug statements here
12471         }
12472         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
12473         export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
12474                 if(!isWasmInitialized) {
12475                         throw new Error("initializeWasm() must be awaited first!");
12476                 }
12477                 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
12478                 return decodeArray(nativeResponseValue);
12479         }
12480         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12481         export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12482                 if(!isWasmInitialized) {
12483                         throw new Error("initializeWasm() must be awaited first!");
12484                 }
12485                 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
12486                 // debug statements here
12487         }
12488         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
12489         export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
12490                 if(!isWasmInitialized) {
12491                         throw new Error("initializeWasm() must be awaited first!");
12492                 }
12493                 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
12494                 return nativeResponseValue;
12495         }
12496         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
12497         export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
12498                 if(!isWasmInitialized) {
12499                         throw new Error("initializeWasm() must be awaited first!");
12500                 }
12501                 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
12502                 // debug statements here
12503         }
12504         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
12505         export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
12506                 if(!isWasmInitialized) {
12507                         throw new Error("initializeWasm() must be awaited first!");
12508                 }
12509                 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
12510                 return nativeResponseValue;
12511         }
12512         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
12513         export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
12514                 if(!isWasmInitialized) {
12515                         throw new Error("initializeWasm() must be awaited first!");
12516                 }
12517                 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
12518                 // debug statements here
12519         }
12520         // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
12521         export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
12522                 if(!isWasmInitialized) {
12523                         throw new Error("initializeWasm() must be awaited first!");
12524                 }
12525                 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
12526                 return nativeResponseValue;
12527         }
12528         // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
12529         export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
12530                 if(!isWasmInitialized) {
12531                         throw new Error("initializeWasm() must be awaited first!");
12532                 }
12533                 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
12534                 // debug statements here
12535         }
12536         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
12537         export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
12538                 if(!isWasmInitialized) {
12539                         throw new Error("initializeWasm() must be awaited first!");
12540                 }
12541                 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
12542                 // debug statements here
12543         }
12544         // 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);
12545         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 {
12546                 if(!isWasmInitialized) {
12547                         throw new Error("initializeWasm() must be awaited first!");
12548                 }
12549                 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
12550                 return nativeResponseValue;
12551         }
12552         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
12553         export function ReplyChannelRange_clone(orig: number): number {
12554                 if(!isWasmInitialized) {
12555                         throw new Error("initializeWasm() must be awaited first!");
12556                 }
12557                 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
12558                 return nativeResponseValue;
12559         }
12560         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
12561         export function QueryShortChannelIds_free(this_obj: number): void {
12562                 if(!isWasmInitialized) {
12563                         throw new Error("initializeWasm() must be awaited first!");
12564                 }
12565                 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
12566                 // debug statements here
12567         }
12568         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
12569         export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
12570                 if(!isWasmInitialized) {
12571                         throw new Error("initializeWasm() must be awaited first!");
12572                 }
12573                 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
12574                 return decodeArray(nativeResponseValue);
12575         }
12576         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12577         export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12578                 if(!isWasmInitialized) {
12579                         throw new Error("initializeWasm() must be awaited first!");
12580                 }
12581                 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
12582                 // debug statements here
12583         }
12584         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
12585         export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
12586                 if(!isWasmInitialized) {
12587                         throw new Error("initializeWasm() must be awaited first!");
12588                 }
12589                 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
12590                 // debug statements here
12591         }
12592         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
12593         export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
12594                 if(!isWasmInitialized) {
12595                         throw new Error("initializeWasm() must be awaited first!");
12596                 }
12597                 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
12598                 return nativeResponseValue;
12599         }
12600         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
12601         export function QueryShortChannelIds_clone(orig: number): number {
12602                 if(!isWasmInitialized) {
12603                         throw new Error("initializeWasm() must be awaited first!");
12604                 }
12605                 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
12606                 return nativeResponseValue;
12607         }
12608         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
12609         export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
12610                 if(!isWasmInitialized) {
12611                         throw new Error("initializeWasm() must be awaited first!");
12612                 }
12613                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
12614                 // debug statements here
12615         }
12616         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
12617         export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
12618                 if(!isWasmInitialized) {
12619                         throw new Error("initializeWasm() must be awaited first!");
12620                 }
12621                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
12622                 return decodeArray(nativeResponseValue);
12623         }
12624         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12625         export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12626                 if(!isWasmInitialized) {
12627                         throw new Error("initializeWasm() must be awaited first!");
12628                 }
12629                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
12630                 // debug statements here
12631         }
12632         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
12633         export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
12634                 if(!isWasmInitialized) {
12635                         throw new Error("initializeWasm() must be awaited first!");
12636                 }
12637                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
12638                 return nativeResponseValue;
12639         }
12640         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
12641         export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
12642                 if(!isWasmInitialized) {
12643                         throw new Error("initializeWasm() must be awaited first!");
12644                 }
12645                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
12646                 // debug statements here
12647         }
12648         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
12649         export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
12650                 if(!isWasmInitialized) {
12651                         throw new Error("initializeWasm() must be awaited first!");
12652                 }
12653                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
12654                 return nativeResponseValue;
12655         }
12656         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
12657         export function ReplyShortChannelIdsEnd_clone(orig: number): number {
12658                 if(!isWasmInitialized) {
12659                         throw new Error("initializeWasm() must be awaited first!");
12660                 }
12661                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
12662                 return nativeResponseValue;
12663         }
12664         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
12665         export function GossipTimestampFilter_free(this_obj: number): void {
12666                 if(!isWasmInitialized) {
12667                         throw new Error("initializeWasm() must be awaited first!");
12668                 }
12669                 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
12670                 // debug statements here
12671         }
12672         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
12673         export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
12674                 if(!isWasmInitialized) {
12675                         throw new Error("initializeWasm() must be awaited first!");
12676                 }
12677                 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
12678                 return decodeArray(nativeResponseValue);
12679         }
12680         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12681         export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12682                 if(!isWasmInitialized) {
12683                         throw new Error("initializeWasm() must be awaited first!");
12684                 }
12685                 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
12686                 // debug statements here
12687         }
12688         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
12689         export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
12690                 if(!isWasmInitialized) {
12691                         throw new Error("initializeWasm() must be awaited first!");
12692                 }
12693                 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
12694                 return nativeResponseValue;
12695         }
12696         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
12697         export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
12698                 if(!isWasmInitialized) {
12699                         throw new Error("initializeWasm() must be awaited first!");
12700                 }
12701                 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
12702                 // debug statements here
12703         }
12704         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
12705         export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
12706                 if(!isWasmInitialized) {
12707                         throw new Error("initializeWasm() must be awaited first!");
12708                 }
12709                 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
12710                 return nativeResponseValue;
12711         }
12712         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
12713         export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
12714                 if(!isWasmInitialized) {
12715                         throw new Error("initializeWasm() must be awaited first!");
12716                 }
12717                 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
12718                 // debug statements here
12719         }
12720         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
12721         export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
12722                 if(!isWasmInitialized) {
12723                         throw new Error("initializeWasm() must be awaited first!");
12724                 }
12725                 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
12726                 return nativeResponseValue;
12727         }
12728         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
12729         export function GossipTimestampFilter_clone(orig: number): number {
12730                 if(!isWasmInitialized) {
12731                         throw new Error("initializeWasm() must be awaited first!");
12732                 }
12733                 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
12734                 return nativeResponseValue;
12735         }
12736         // void ErrorAction_free(struct LDKErrorAction this_ptr);
12737         export function ErrorAction_free(this_ptr: number): void {
12738                 if(!isWasmInitialized) {
12739                         throw new Error("initializeWasm() must be awaited first!");
12740                 }
12741                 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
12742                 // debug statements here
12743         }
12744         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
12745         export function ErrorAction_clone(orig: number): number {
12746                 if(!isWasmInitialized) {
12747                         throw new Error("initializeWasm() must be awaited first!");
12748                 }
12749                 const nativeResponseValue = wasm.ErrorAction_clone(orig);
12750                 return nativeResponseValue;
12751         }
12752         // struct LDKErrorAction ErrorAction_disconnect_peer(struct LDKErrorMessage msg);
12753         export function ErrorAction_disconnect_peer(msg: number): number {
12754                 if(!isWasmInitialized) {
12755                         throw new Error("initializeWasm() must be awaited first!");
12756                 }
12757                 const nativeResponseValue = wasm.ErrorAction_disconnect_peer(msg);
12758                 return nativeResponseValue;
12759         }
12760         // struct LDKErrorAction ErrorAction_ignore_error(void);
12761         export function ErrorAction_ignore_error(): number {
12762                 if(!isWasmInitialized) {
12763                         throw new Error("initializeWasm() must be awaited first!");
12764                 }
12765                 const nativeResponseValue = wasm.ErrorAction_ignore_error();
12766                 return nativeResponseValue;
12767         }
12768         // struct LDKErrorAction ErrorAction_ignore_and_log(enum LDKLevel a);
12769         export function ErrorAction_ignore_and_log(a: Level): number {
12770                 if(!isWasmInitialized) {
12771                         throw new Error("initializeWasm() must be awaited first!");
12772                 }
12773                 const nativeResponseValue = wasm.ErrorAction_ignore_and_log(a);
12774                 return nativeResponseValue;
12775         }
12776         // struct LDKErrorAction ErrorAction_send_error_message(struct LDKErrorMessage msg);
12777         export function ErrorAction_send_error_message(msg: number): number {
12778                 if(!isWasmInitialized) {
12779                         throw new Error("initializeWasm() must be awaited first!");
12780                 }
12781                 const nativeResponseValue = wasm.ErrorAction_send_error_message(msg);
12782                 return nativeResponseValue;
12783         }
12784         // void LightningError_free(struct LDKLightningError this_obj);
12785         export function LightningError_free(this_obj: number): void {
12786                 if(!isWasmInitialized) {
12787                         throw new Error("initializeWasm() must be awaited first!");
12788                 }
12789                 const nativeResponseValue = wasm.LightningError_free(this_obj);
12790                 // debug statements here
12791         }
12792         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
12793         export function LightningError_get_err(this_ptr: number): String {
12794                 if(!isWasmInitialized) {
12795                         throw new Error("initializeWasm() must be awaited first!");
12796                 }
12797                 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
12798                 return nativeResponseValue;
12799         }
12800         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKStr val);
12801         export function LightningError_set_err(this_ptr: number, val: String): void {
12802                 if(!isWasmInitialized) {
12803                         throw new Error("initializeWasm() must be awaited first!");
12804                 }
12805                 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, val);
12806                 // debug statements here
12807         }
12808         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
12809         export function LightningError_get_action(this_ptr: number): number {
12810                 if(!isWasmInitialized) {
12811                         throw new Error("initializeWasm() must be awaited first!");
12812                 }
12813                 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
12814                 return nativeResponseValue;
12815         }
12816         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
12817         export function LightningError_set_action(this_ptr: number, val: number): void {
12818                 if(!isWasmInitialized) {
12819                         throw new Error("initializeWasm() must be awaited first!");
12820                 }
12821                 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
12822                 // debug statements here
12823         }
12824         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKStr err_arg, struct LDKErrorAction action_arg);
12825         export function LightningError_new(err_arg: String, action_arg: number): number {
12826                 if(!isWasmInitialized) {
12827                         throw new Error("initializeWasm() must be awaited first!");
12828                 }
12829                 const nativeResponseValue = wasm.LightningError_new(err_arg, action_arg);
12830                 return nativeResponseValue;
12831         }
12832         // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
12833         export function LightningError_clone(orig: number): number {
12834                 if(!isWasmInitialized) {
12835                         throw new Error("initializeWasm() must be awaited first!");
12836                 }
12837                 const nativeResponseValue = wasm.LightningError_clone(orig);
12838                 return nativeResponseValue;
12839         }
12840         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
12841         export function CommitmentUpdate_free(this_obj: number): void {
12842                 if(!isWasmInitialized) {
12843                         throw new Error("initializeWasm() must be awaited first!");
12844                 }
12845                 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
12846                 // debug statements here
12847         }
12848         // struct LDKCVec_UpdateAddHTLCZ CommitmentUpdate_get_update_add_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
12849         export function CommitmentUpdate_get_update_add_htlcs(this_ptr: number): number[] {
12850                 if(!isWasmInitialized) {
12851                         throw new Error("initializeWasm() must be awaited first!");
12852                 }
12853                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_add_htlcs(this_ptr);
12854                 return nativeResponseValue;
12855         }
12856         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
12857         export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
12858                 if(!isWasmInitialized) {
12859                         throw new Error("initializeWasm() must be awaited first!");
12860                 }
12861                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
12862                 // debug statements here
12863         }
12864         // struct LDKCVec_UpdateFulfillHTLCZ CommitmentUpdate_get_update_fulfill_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
12865         export function CommitmentUpdate_get_update_fulfill_htlcs(this_ptr: number): number[] {
12866                 if(!isWasmInitialized) {
12867                         throw new Error("initializeWasm() must be awaited first!");
12868                 }
12869                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fulfill_htlcs(this_ptr);
12870                 return nativeResponseValue;
12871         }
12872         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
12873         export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
12874                 if(!isWasmInitialized) {
12875                         throw new Error("initializeWasm() must be awaited first!");
12876                 }
12877                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
12878                 // debug statements here
12879         }
12880         // struct LDKCVec_UpdateFailHTLCZ CommitmentUpdate_get_update_fail_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
12881         export function CommitmentUpdate_get_update_fail_htlcs(this_ptr: number): number[] {
12882                 if(!isWasmInitialized) {
12883                         throw new Error("initializeWasm() must be awaited first!");
12884                 }
12885                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fail_htlcs(this_ptr);
12886                 return nativeResponseValue;
12887         }
12888         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
12889         export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
12890                 if(!isWasmInitialized) {
12891                         throw new Error("initializeWasm() must be awaited first!");
12892                 }
12893                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
12894                 // debug statements here
12895         }
12896         // struct LDKCVec_UpdateFailMalformedHTLCZ CommitmentUpdate_get_update_fail_malformed_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
12897         export function CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr: number): number[] {
12898                 if(!isWasmInitialized) {
12899                         throw new Error("initializeWasm() must be awaited first!");
12900                 }
12901                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr);
12902                 return nativeResponseValue;
12903         }
12904         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
12905         export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
12906                 if(!isWasmInitialized) {
12907                         throw new Error("initializeWasm() must be awaited first!");
12908                 }
12909                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
12910                 // debug statements here
12911         }
12912         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
12913         export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
12914                 if(!isWasmInitialized) {
12915                         throw new Error("initializeWasm() must be awaited first!");
12916                 }
12917                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
12918                 return nativeResponseValue;
12919         }
12920         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
12921         export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
12922                 if(!isWasmInitialized) {
12923                         throw new Error("initializeWasm() must be awaited first!");
12924                 }
12925                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
12926                 // debug statements here
12927         }
12928         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
12929         export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
12930                 if(!isWasmInitialized) {
12931                         throw new Error("initializeWasm() must be awaited first!");
12932                 }
12933                 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
12934                 return nativeResponseValue;
12935         }
12936         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
12937         export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
12938                 if(!isWasmInitialized) {
12939                         throw new Error("initializeWasm() must be awaited first!");
12940                 }
12941                 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
12942                 // debug statements here
12943         }
12944         // 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);
12945         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 {
12946                 if(!isWasmInitialized) {
12947                         throw new Error("initializeWasm() must be awaited first!");
12948                 }
12949                 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);
12950                 return nativeResponseValue;
12951         }
12952         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
12953         export function CommitmentUpdate_clone(orig: number): number {
12954                 if(!isWasmInitialized) {
12955                         throw new Error("initializeWasm() must be awaited first!");
12956                 }
12957                 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
12958                 return nativeResponseValue;
12959         }
12960         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
12961         export function ChannelMessageHandler_free(this_ptr: number): void {
12962                 if(!isWasmInitialized) {
12963                         throw new Error("initializeWasm() must be awaited first!");
12964                 }
12965                 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
12966                 // debug statements here
12967         }
12968         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
12969         export function RoutingMessageHandler_free(this_ptr: number): void {
12970                 if(!isWasmInitialized) {
12971                         throw new Error("initializeWasm() must be awaited first!");
12972                 }
12973                 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
12974                 // debug statements here
12975         }
12976         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
12977         export function AcceptChannel_write(obj: number): Uint8Array {
12978                 if(!isWasmInitialized) {
12979                         throw new Error("initializeWasm() must be awaited first!");
12980                 }
12981                 const nativeResponseValue = wasm.AcceptChannel_write(obj);
12982                 return decodeArray(nativeResponseValue);
12983         }
12984         // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
12985         export function AcceptChannel_read(ser: Uint8Array): number {
12986                 if(!isWasmInitialized) {
12987                         throw new Error("initializeWasm() must be awaited first!");
12988                 }
12989                 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
12990                 return nativeResponseValue;
12991         }
12992         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
12993         export function AnnouncementSignatures_write(obj: number): Uint8Array {
12994                 if(!isWasmInitialized) {
12995                         throw new Error("initializeWasm() must be awaited first!");
12996                 }
12997                 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
12998                 return decodeArray(nativeResponseValue);
12999         }
13000         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
13001         export function AnnouncementSignatures_read(ser: Uint8Array): number {
13002                 if(!isWasmInitialized) {
13003                         throw new Error("initializeWasm() must be awaited first!");
13004                 }
13005                 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
13006                 return nativeResponseValue;
13007         }
13008         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
13009         export function ChannelReestablish_write(obj: number): Uint8Array {
13010                 if(!isWasmInitialized) {
13011                         throw new Error("initializeWasm() must be awaited first!");
13012                 }
13013                 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
13014                 return decodeArray(nativeResponseValue);
13015         }
13016         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
13017         export function ChannelReestablish_read(ser: Uint8Array): number {
13018                 if(!isWasmInitialized) {
13019                         throw new Error("initializeWasm() must be awaited first!");
13020                 }
13021                 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
13022                 return nativeResponseValue;
13023         }
13024         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
13025         export function ClosingSigned_write(obj: number): Uint8Array {
13026                 if(!isWasmInitialized) {
13027                         throw new Error("initializeWasm() must be awaited first!");
13028                 }
13029                 const nativeResponseValue = wasm.ClosingSigned_write(obj);
13030                 return decodeArray(nativeResponseValue);
13031         }
13032         // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
13033         export function ClosingSigned_read(ser: Uint8Array): number {
13034                 if(!isWasmInitialized) {
13035                         throw new Error("initializeWasm() must be awaited first!");
13036                 }
13037                 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
13038                 return nativeResponseValue;
13039         }
13040         // struct LDKCVec_u8Z ClosingSignedFeeRange_write(const struct LDKClosingSignedFeeRange *NONNULL_PTR obj);
13041         export function ClosingSignedFeeRange_write(obj: number): Uint8Array {
13042                 if(!isWasmInitialized) {
13043                         throw new Error("initializeWasm() must be awaited first!");
13044                 }
13045                 const nativeResponseValue = wasm.ClosingSignedFeeRange_write(obj);
13046                 return decodeArray(nativeResponseValue);
13047         }
13048         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ ClosingSignedFeeRange_read(struct LDKu8slice ser);
13049         export function ClosingSignedFeeRange_read(ser: Uint8Array): number {
13050                 if(!isWasmInitialized) {
13051                         throw new Error("initializeWasm() must be awaited first!");
13052                 }
13053                 const nativeResponseValue = wasm.ClosingSignedFeeRange_read(encodeArray(ser));
13054                 return nativeResponseValue;
13055         }
13056         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
13057         export function CommitmentSigned_write(obj: number): Uint8Array {
13058                 if(!isWasmInitialized) {
13059                         throw new Error("initializeWasm() must be awaited first!");
13060                 }
13061                 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
13062                 return decodeArray(nativeResponseValue);
13063         }
13064         // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
13065         export function CommitmentSigned_read(ser: Uint8Array): number {
13066                 if(!isWasmInitialized) {
13067                         throw new Error("initializeWasm() must be awaited first!");
13068                 }
13069                 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
13070                 return nativeResponseValue;
13071         }
13072         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
13073         export function FundingCreated_write(obj: number): Uint8Array {
13074                 if(!isWasmInitialized) {
13075                         throw new Error("initializeWasm() must be awaited first!");
13076                 }
13077                 const nativeResponseValue = wasm.FundingCreated_write(obj);
13078                 return decodeArray(nativeResponseValue);
13079         }
13080         // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
13081         export function FundingCreated_read(ser: Uint8Array): number {
13082                 if(!isWasmInitialized) {
13083                         throw new Error("initializeWasm() must be awaited first!");
13084                 }
13085                 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
13086                 return nativeResponseValue;
13087         }
13088         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
13089         export function FundingSigned_write(obj: number): Uint8Array {
13090                 if(!isWasmInitialized) {
13091                         throw new Error("initializeWasm() must be awaited first!");
13092                 }
13093                 const nativeResponseValue = wasm.FundingSigned_write(obj);
13094                 return decodeArray(nativeResponseValue);
13095         }
13096         // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
13097         export function FundingSigned_read(ser: Uint8Array): number {
13098                 if(!isWasmInitialized) {
13099                         throw new Error("initializeWasm() must be awaited first!");
13100                 }
13101                 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
13102                 return nativeResponseValue;
13103         }
13104         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
13105         export function FundingLocked_write(obj: number): Uint8Array {
13106                 if(!isWasmInitialized) {
13107                         throw new Error("initializeWasm() must be awaited first!");
13108                 }
13109                 const nativeResponseValue = wasm.FundingLocked_write(obj);
13110                 return decodeArray(nativeResponseValue);
13111         }
13112         // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
13113         export function FundingLocked_read(ser: Uint8Array): number {
13114                 if(!isWasmInitialized) {
13115                         throw new Error("initializeWasm() must be awaited first!");
13116                 }
13117                 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
13118                 return nativeResponseValue;
13119         }
13120         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
13121         export function Init_write(obj: number): Uint8Array {
13122                 if(!isWasmInitialized) {
13123                         throw new Error("initializeWasm() must be awaited first!");
13124                 }
13125                 const nativeResponseValue = wasm.Init_write(obj);
13126                 return decodeArray(nativeResponseValue);
13127         }
13128         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
13129         export function Init_read(ser: Uint8Array): number {
13130                 if(!isWasmInitialized) {
13131                         throw new Error("initializeWasm() must be awaited first!");
13132                 }
13133                 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
13134                 return nativeResponseValue;
13135         }
13136         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
13137         export function OpenChannel_write(obj: number): Uint8Array {
13138                 if(!isWasmInitialized) {
13139                         throw new Error("initializeWasm() must be awaited first!");
13140                 }
13141                 const nativeResponseValue = wasm.OpenChannel_write(obj);
13142                 return decodeArray(nativeResponseValue);
13143         }
13144         // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
13145         export function OpenChannel_read(ser: Uint8Array): number {
13146                 if(!isWasmInitialized) {
13147                         throw new Error("initializeWasm() must be awaited first!");
13148                 }
13149                 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
13150                 return nativeResponseValue;
13151         }
13152         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
13153         export function RevokeAndACK_write(obj: number): Uint8Array {
13154                 if(!isWasmInitialized) {
13155                         throw new Error("initializeWasm() must be awaited first!");
13156                 }
13157                 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
13158                 return decodeArray(nativeResponseValue);
13159         }
13160         // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
13161         export function RevokeAndACK_read(ser: Uint8Array): number {
13162                 if(!isWasmInitialized) {
13163                         throw new Error("initializeWasm() must be awaited first!");
13164                 }
13165                 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
13166                 return nativeResponseValue;
13167         }
13168         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
13169         export function Shutdown_write(obj: number): Uint8Array {
13170                 if(!isWasmInitialized) {
13171                         throw new Error("initializeWasm() must be awaited first!");
13172                 }
13173                 const nativeResponseValue = wasm.Shutdown_write(obj);
13174                 return decodeArray(nativeResponseValue);
13175         }
13176         // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
13177         export function Shutdown_read(ser: Uint8Array): number {
13178                 if(!isWasmInitialized) {
13179                         throw new Error("initializeWasm() must be awaited first!");
13180                 }
13181                 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
13182                 return nativeResponseValue;
13183         }
13184         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
13185         export function UpdateFailHTLC_write(obj: number): Uint8Array {
13186                 if(!isWasmInitialized) {
13187                         throw new Error("initializeWasm() must be awaited first!");
13188                 }
13189                 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
13190                 return decodeArray(nativeResponseValue);
13191         }
13192         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
13193         export function UpdateFailHTLC_read(ser: Uint8Array): number {
13194                 if(!isWasmInitialized) {
13195                         throw new Error("initializeWasm() must be awaited first!");
13196                 }
13197                 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
13198                 return nativeResponseValue;
13199         }
13200         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
13201         export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
13202                 if(!isWasmInitialized) {
13203                         throw new Error("initializeWasm() must be awaited first!");
13204                 }
13205                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
13206                 return decodeArray(nativeResponseValue);
13207         }
13208         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
13209         export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
13210                 if(!isWasmInitialized) {
13211                         throw new Error("initializeWasm() must be awaited first!");
13212                 }
13213                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
13214                 return nativeResponseValue;
13215         }
13216         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
13217         export function UpdateFee_write(obj: number): Uint8Array {
13218                 if(!isWasmInitialized) {
13219                         throw new Error("initializeWasm() must be awaited first!");
13220                 }
13221                 const nativeResponseValue = wasm.UpdateFee_write(obj);
13222                 return decodeArray(nativeResponseValue);
13223         }
13224         // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
13225         export function UpdateFee_read(ser: Uint8Array): number {
13226                 if(!isWasmInitialized) {
13227                         throw new Error("initializeWasm() must be awaited first!");
13228                 }
13229                 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
13230                 return nativeResponseValue;
13231         }
13232         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
13233         export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
13234                 if(!isWasmInitialized) {
13235                         throw new Error("initializeWasm() must be awaited first!");
13236                 }
13237                 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
13238                 return decodeArray(nativeResponseValue);
13239         }
13240         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
13241         export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
13242                 if(!isWasmInitialized) {
13243                         throw new Error("initializeWasm() must be awaited first!");
13244                 }
13245                 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
13246                 return nativeResponseValue;
13247         }
13248         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
13249         export function UpdateAddHTLC_write(obj: number): Uint8Array {
13250                 if(!isWasmInitialized) {
13251                         throw new Error("initializeWasm() must be awaited first!");
13252                 }
13253                 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
13254                 return decodeArray(nativeResponseValue);
13255         }
13256         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
13257         export function UpdateAddHTLC_read(ser: Uint8Array): number {
13258                 if(!isWasmInitialized) {
13259                         throw new Error("initializeWasm() must be awaited first!");
13260                 }
13261                 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
13262                 return nativeResponseValue;
13263         }
13264         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
13265         export function Ping_write(obj: number): Uint8Array {
13266                 if(!isWasmInitialized) {
13267                         throw new Error("initializeWasm() must be awaited first!");
13268                 }
13269                 const nativeResponseValue = wasm.Ping_write(obj);
13270                 return decodeArray(nativeResponseValue);
13271         }
13272         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
13273         export function Ping_read(ser: Uint8Array): number {
13274                 if(!isWasmInitialized) {
13275                         throw new Error("initializeWasm() must be awaited first!");
13276                 }
13277                 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
13278                 return nativeResponseValue;
13279         }
13280         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
13281         export function Pong_write(obj: number): Uint8Array {
13282                 if(!isWasmInitialized) {
13283                         throw new Error("initializeWasm() must be awaited first!");
13284                 }
13285                 const nativeResponseValue = wasm.Pong_write(obj);
13286                 return decodeArray(nativeResponseValue);
13287         }
13288         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
13289         export function Pong_read(ser: Uint8Array): number {
13290                 if(!isWasmInitialized) {
13291                         throw new Error("initializeWasm() must be awaited first!");
13292                 }
13293                 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
13294                 return nativeResponseValue;
13295         }
13296         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
13297         export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
13298                 if(!isWasmInitialized) {
13299                         throw new Error("initializeWasm() must be awaited first!");
13300                 }
13301                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
13302                 return decodeArray(nativeResponseValue);
13303         }
13304         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
13305         export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
13306                 if(!isWasmInitialized) {
13307                         throw new Error("initializeWasm() must be awaited first!");
13308                 }
13309                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
13310                 return nativeResponseValue;
13311         }
13312         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
13313         export function ChannelAnnouncement_write(obj: number): Uint8Array {
13314                 if(!isWasmInitialized) {
13315                         throw new Error("initializeWasm() must be awaited first!");
13316                 }
13317                 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
13318                 return decodeArray(nativeResponseValue);
13319         }
13320         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
13321         export function ChannelAnnouncement_read(ser: Uint8Array): number {
13322                 if(!isWasmInitialized) {
13323                         throw new Error("initializeWasm() must be awaited first!");
13324                 }
13325                 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
13326                 return nativeResponseValue;
13327         }
13328         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
13329         export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
13330                 if(!isWasmInitialized) {
13331                         throw new Error("initializeWasm() must be awaited first!");
13332                 }
13333                 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
13334                 return decodeArray(nativeResponseValue);
13335         }
13336         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
13337         export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
13338                 if(!isWasmInitialized) {
13339                         throw new Error("initializeWasm() must be awaited first!");
13340                 }
13341                 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
13342                 return nativeResponseValue;
13343         }
13344         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
13345         export function ChannelUpdate_write(obj: number): Uint8Array {
13346                 if(!isWasmInitialized) {
13347                         throw new Error("initializeWasm() must be awaited first!");
13348                 }
13349                 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
13350                 return decodeArray(nativeResponseValue);
13351         }
13352         // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
13353         export function ChannelUpdate_read(ser: Uint8Array): number {
13354                 if(!isWasmInitialized) {
13355                         throw new Error("initializeWasm() must be awaited first!");
13356                 }
13357                 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
13358                 return nativeResponseValue;
13359         }
13360         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
13361         export function ErrorMessage_write(obj: number): Uint8Array {
13362                 if(!isWasmInitialized) {
13363                         throw new Error("initializeWasm() must be awaited first!");
13364                 }
13365                 const nativeResponseValue = wasm.ErrorMessage_write(obj);
13366                 return decodeArray(nativeResponseValue);
13367         }
13368         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
13369         export function ErrorMessage_read(ser: Uint8Array): number {
13370                 if(!isWasmInitialized) {
13371                         throw new Error("initializeWasm() must be awaited first!");
13372                 }
13373                 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
13374                 return nativeResponseValue;
13375         }
13376         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
13377         export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
13378                 if(!isWasmInitialized) {
13379                         throw new Error("initializeWasm() must be awaited first!");
13380                 }
13381                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
13382                 return decodeArray(nativeResponseValue);
13383         }
13384         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
13385         export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
13386                 if(!isWasmInitialized) {
13387                         throw new Error("initializeWasm() must be awaited first!");
13388                 }
13389                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
13390                 return nativeResponseValue;
13391         }
13392         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
13393         export function NodeAnnouncement_write(obj: number): Uint8Array {
13394                 if(!isWasmInitialized) {
13395                         throw new Error("initializeWasm() must be awaited first!");
13396                 }
13397                 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
13398                 return decodeArray(nativeResponseValue);
13399         }
13400         // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
13401         export function NodeAnnouncement_read(ser: Uint8Array): number {
13402                 if(!isWasmInitialized) {
13403                         throw new Error("initializeWasm() must be awaited first!");
13404                 }
13405                 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
13406                 return nativeResponseValue;
13407         }
13408         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
13409         export function QueryShortChannelIds_read(ser: Uint8Array): number {
13410                 if(!isWasmInitialized) {
13411                         throw new Error("initializeWasm() must be awaited first!");
13412                 }
13413                 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
13414                 return nativeResponseValue;
13415         }
13416         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
13417         export function QueryShortChannelIds_write(obj: number): Uint8Array {
13418                 if(!isWasmInitialized) {
13419                         throw new Error("initializeWasm() must be awaited first!");
13420                 }
13421                 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
13422                 return decodeArray(nativeResponseValue);
13423         }
13424         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
13425         export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
13426                 if(!isWasmInitialized) {
13427                         throw new Error("initializeWasm() must be awaited first!");
13428                 }
13429                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
13430                 return decodeArray(nativeResponseValue);
13431         }
13432         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
13433         export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
13434                 if(!isWasmInitialized) {
13435                         throw new Error("initializeWasm() must be awaited first!");
13436                 }
13437                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
13438                 return nativeResponseValue;
13439         }
13440         // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
13441         export function QueryChannelRange_end_blocknum(this_arg: number): number {
13442                 if(!isWasmInitialized) {
13443                         throw new Error("initializeWasm() must be awaited first!");
13444                 }
13445                 const nativeResponseValue = wasm.QueryChannelRange_end_blocknum(this_arg);
13446                 return nativeResponseValue;
13447         }
13448         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
13449         export function QueryChannelRange_write(obj: number): Uint8Array {
13450                 if(!isWasmInitialized) {
13451                         throw new Error("initializeWasm() must be awaited first!");
13452                 }
13453                 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
13454                 return decodeArray(nativeResponseValue);
13455         }
13456         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
13457         export function QueryChannelRange_read(ser: Uint8Array): number {
13458                 if(!isWasmInitialized) {
13459                         throw new Error("initializeWasm() must be awaited first!");
13460                 }
13461                 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
13462                 return nativeResponseValue;
13463         }
13464         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
13465         export function ReplyChannelRange_read(ser: Uint8Array): number {
13466                 if(!isWasmInitialized) {
13467                         throw new Error("initializeWasm() must be awaited first!");
13468                 }
13469                 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
13470                 return nativeResponseValue;
13471         }
13472         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
13473         export function ReplyChannelRange_write(obj: number): Uint8Array {
13474                 if(!isWasmInitialized) {
13475                         throw new Error("initializeWasm() must be awaited first!");
13476                 }
13477                 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
13478                 return decodeArray(nativeResponseValue);
13479         }
13480         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
13481         export function GossipTimestampFilter_write(obj: number): Uint8Array {
13482                 if(!isWasmInitialized) {
13483                         throw new Error("initializeWasm() must be awaited first!");
13484                 }
13485                 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
13486                 return decodeArray(nativeResponseValue);
13487         }
13488         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
13489         export function GossipTimestampFilter_read(ser: Uint8Array): number {
13490                 if(!isWasmInitialized) {
13491                         throw new Error("initializeWasm() must be awaited first!");
13492                 }
13493                 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
13494                 return nativeResponseValue;
13495         }
13496         // void CustomMessageHandler_free(struct LDKCustomMessageHandler this_ptr);
13497         export function CustomMessageHandler_free(this_ptr: number): void {
13498                 if(!isWasmInitialized) {
13499                         throw new Error("initializeWasm() must be awaited first!");
13500                 }
13501                 const nativeResponseValue = wasm.CustomMessageHandler_free(this_ptr);
13502                 // debug statements here
13503         }
13504         // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
13505         export function IgnoringMessageHandler_free(this_obj: number): void {
13506                 if(!isWasmInitialized) {
13507                         throw new Error("initializeWasm() must be awaited first!");
13508                 }
13509                 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
13510                 // debug statements here
13511         }
13512         // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
13513         export function IgnoringMessageHandler_new(): number {
13514                 if(!isWasmInitialized) {
13515                         throw new Error("initializeWasm() must be awaited first!");
13516                 }
13517                 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
13518                 return nativeResponseValue;
13519         }
13520         // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
13521         export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
13522                 if(!isWasmInitialized) {
13523                         throw new Error("initializeWasm() must be awaited first!");
13524                 }
13525                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
13526                 return nativeResponseValue;
13527         }
13528         // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
13529         export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
13530                 if(!isWasmInitialized) {
13531                         throw new Error("initializeWasm() must be awaited first!");
13532                 }
13533                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
13534                 return nativeResponseValue;
13535         }
13536         // struct LDKCustomMessageReader IgnoringMessageHandler_as_CustomMessageReader(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
13537         export function IgnoringMessageHandler_as_CustomMessageReader(this_arg: number): number {
13538                 if(!isWasmInitialized) {
13539                         throw new Error("initializeWasm() must be awaited first!");
13540                 }
13541                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_CustomMessageReader(this_arg);
13542                 return nativeResponseValue;
13543         }
13544         // struct LDKCustomMessageHandler IgnoringMessageHandler_as_CustomMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
13545         export function IgnoringMessageHandler_as_CustomMessageHandler(this_arg: number): number {
13546                 if(!isWasmInitialized) {
13547                         throw new Error("initializeWasm() must be awaited first!");
13548                 }
13549                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_CustomMessageHandler(this_arg);
13550                 return nativeResponseValue;
13551         }
13552         // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
13553         export function ErroringMessageHandler_free(this_obj: number): void {
13554                 if(!isWasmInitialized) {
13555                         throw new Error("initializeWasm() must be awaited first!");
13556                 }
13557                 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
13558                 // debug statements here
13559         }
13560         // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
13561         export function ErroringMessageHandler_new(): number {
13562                 if(!isWasmInitialized) {
13563                         throw new Error("initializeWasm() must be awaited first!");
13564                 }
13565                 const nativeResponseValue = wasm.ErroringMessageHandler_new();
13566                 return nativeResponseValue;
13567         }
13568         // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
13569         export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
13570                 if(!isWasmInitialized) {
13571                         throw new Error("initializeWasm() must be awaited first!");
13572                 }
13573                 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
13574                 return nativeResponseValue;
13575         }
13576         // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
13577         export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
13578                 if(!isWasmInitialized) {
13579                         throw new Error("initializeWasm() must be awaited first!");
13580                 }
13581                 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
13582                 return nativeResponseValue;
13583         }
13584         // void MessageHandler_free(struct LDKMessageHandler this_obj);
13585         export function MessageHandler_free(this_obj: number): void {
13586                 if(!isWasmInitialized) {
13587                         throw new Error("initializeWasm() must be awaited first!");
13588                 }
13589                 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
13590                 // debug statements here
13591         }
13592         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
13593         export function MessageHandler_get_chan_handler(this_ptr: number): number {
13594                 if(!isWasmInitialized) {
13595                         throw new Error("initializeWasm() must be awaited first!");
13596                 }
13597                 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
13598                 return nativeResponseValue;
13599         }
13600         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
13601         export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
13602                 if(!isWasmInitialized) {
13603                         throw new Error("initializeWasm() must be awaited first!");
13604                 }
13605                 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
13606                 // debug statements here
13607         }
13608         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
13609         export function MessageHandler_get_route_handler(this_ptr: number): number {
13610                 if(!isWasmInitialized) {
13611                         throw new Error("initializeWasm() must be awaited first!");
13612                 }
13613                 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
13614                 return nativeResponseValue;
13615         }
13616         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
13617         export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
13618                 if(!isWasmInitialized) {
13619                         throw new Error("initializeWasm() must be awaited first!");
13620                 }
13621                 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
13622                 // debug statements here
13623         }
13624         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
13625         export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
13626                 if(!isWasmInitialized) {
13627                         throw new Error("initializeWasm() must be awaited first!");
13628                 }
13629                 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
13630                 return nativeResponseValue;
13631         }
13632         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
13633         export function SocketDescriptor_clone(orig: number): number {
13634                 if(!isWasmInitialized) {
13635                         throw new Error("initializeWasm() must be awaited first!");
13636                 }
13637                 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
13638                 return nativeResponseValue;
13639         }
13640         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
13641         export function SocketDescriptor_free(this_ptr: number): void {
13642                 if(!isWasmInitialized) {
13643                         throw new Error("initializeWasm() must be awaited first!");
13644                 }
13645                 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
13646                 // debug statements here
13647         }
13648         // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
13649         export function PeerHandleError_free(this_obj: number): void {
13650                 if(!isWasmInitialized) {
13651                         throw new Error("initializeWasm() must be awaited first!");
13652                 }
13653                 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
13654                 // debug statements here
13655         }
13656         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
13657         export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
13658                 if(!isWasmInitialized) {
13659                         throw new Error("initializeWasm() must be awaited first!");
13660                 }
13661                 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
13662                 return nativeResponseValue;
13663         }
13664         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
13665         export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
13666                 if(!isWasmInitialized) {
13667                         throw new Error("initializeWasm() must be awaited first!");
13668                 }
13669                 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
13670                 // debug statements here
13671         }
13672         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
13673         export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
13674                 if(!isWasmInitialized) {
13675                         throw new Error("initializeWasm() must be awaited first!");
13676                 }
13677                 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
13678                 return nativeResponseValue;
13679         }
13680         // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
13681         export function PeerHandleError_clone(orig: number): number {
13682                 if(!isWasmInitialized) {
13683                         throw new Error("initializeWasm() must be awaited first!");
13684                 }
13685                 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
13686                 return nativeResponseValue;
13687         }
13688         // void PeerManager_free(struct LDKPeerManager this_obj);
13689         export function PeerManager_free(this_obj: number): void {
13690                 if(!isWasmInitialized) {
13691                         throw new Error("initializeWasm() must be awaited first!");
13692                 }
13693                 const nativeResponseValue = wasm.PeerManager_free(this_obj);
13694                 // debug statements here
13695         }
13696         // MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, struct LDKSecretKey our_node_secret, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger, struct LDKCustomMessageHandler custom_message_handler);
13697         export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number, custom_message_handler: number): number {
13698                 if(!isWasmInitialized) {
13699                         throw new Error("initializeWasm() must be awaited first!");
13700                 }
13701                 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger, custom_message_handler);
13702                 return nativeResponseValue;
13703         }
13704         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
13705         export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
13706                 if(!isWasmInitialized) {
13707                         throw new Error("initializeWasm() must be awaited first!");
13708                 }
13709                 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
13710                 return nativeResponseValue;
13711         }
13712         // 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);
13713         export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
13714                 if(!isWasmInitialized) {
13715                         throw new Error("initializeWasm() must be awaited first!");
13716                 }
13717                 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
13718                 return nativeResponseValue;
13719         }
13720         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
13721         export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
13722                 if(!isWasmInitialized) {
13723                         throw new Error("initializeWasm() must be awaited first!");
13724                 }
13725                 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
13726                 return nativeResponseValue;
13727         }
13728         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
13729         export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
13730                 if(!isWasmInitialized) {
13731                         throw new Error("initializeWasm() must be awaited first!");
13732                 }
13733                 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
13734                 return nativeResponseValue;
13735         }
13736         // 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);
13737         export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
13738                 if(!isWasmInitialized) {
13739                         throw new Error("initializeWasm() must be awaited first!");
13740                 }
13741                 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
13742                 return nativeResponseValue;
13743         }
13744         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
13745         export function PeerManager_process_events(this_arg: number): void {
13746                 if(!isWasmInitialized) {
13747                         throw new Error("initializeWasm() must be awaited first!");
13748                 }
13749                 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
13750                 // debug statements here
13751         }
13752         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
13753         export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
13754                 if(!isWasmInitialized) {
13755                         throw new Error("initializeWasm() must be awaited first!");
13756                 }
13757                 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
13758                 // debug statements here
13759         }
13760         // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
13761         export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
13762                 if(!isWasmInitialized) {
13763                         throw new Error("initializeWasm() must be awaited first!");
13764                 }
13765                 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
13766                 // debug statements here
13767         }
13768         // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
13769         export function PeerManager_timer_tick_occurred(this_arg: number): void {
13770                 if(!isWasmInitialized) {
13771                         throw new Error("initializeWasm() must be awaited first!");
13772                 }
13773                 const nativeResponseValue = wasm.PeerManager_timer_tick_occurred(this_arg);
13774                 // debug statements here
13775         }
13776         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
13777         export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
13778                 if(!isWasmInitialized) {
13779                         throw new Error("initializeWasm() must be awaited first!");
13780                 }
13781                 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
13782                 return decodeArray(nativeResponseValue);
13783         }
13784         // struct LDKTransaction build_closing_transaction(uint64_t to_holder_value_sat, uint64_t to_counterparty_value_sat, struct LDKCVec_u8Z to_holder_script, struct LDKCVec_u8Z to_counterparty_script, struct LDKOutPoint funding_outpoint);
13785         export function build_closing_transaction(to_holder_value_sat: number, to_counterparty_value_sat: number, to_holder_script: Uint8Array, to_counterparty_script: Uint8Array, funding_outpoint: number): Uint8Array {
13786                 if(!isWasmInitialized) {
13787                         throw new Error("initializeWasm() must be awaited first!");
13788                 }
13789                 const nativeResponseValue = wasm.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, encodeArray(to_holder_script), encodeArray(to_counterparty_script), funding_outpoint);
13790                 return decodeArray(nativeResponseValue);
13791         }
13792         // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
13793         export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
13794                 if(!isWasmInitialized) {
13795                         throw new Error("initializeWasm() must be awaited first!");
13796                 }
13797                 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
13798                 return nativeResponseValue;
13799         }
13800         // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
13801         export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
13802                 if(!isWasmInitialized) {
13803                         throw new Error("initializeWasm() must be awaited first!");
13804                 }
13805                 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
13806                 return nativeResponseValue;
13807         }
13808         // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
13809         export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
13810                 if(!isWasmInitialized) {
13811                         throw new Error("initializeWasm() must be awaited first!");
13812                 }
13813                 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
13814                 return nativeResponseValue;
13815         }
13816         // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
13817         export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
13818                 if(!isWasmInitialized) {
13819                         throw new Error("initializeWasm() must be awaited first!");
13820                 }
13821                 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
13822                 return nativeResponseValue;
13823         }
13824         // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
13825         export function TxCreationKeys_free(this_obj: number): void {
13826                 if(!isWasmInitialized) {
13827                         throw new Error("initializeWasm() must be awaited first!");
13828                 }
13829                 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
13830                 // debug statements here
13831         }
13832         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
13833         export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
13834                 if(!isWasmInitialized) {
13835                         throw new Error("initializeWasm() must be awaited first!");
13836                 }
13837                 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
13838                 return decodeArray(nativeResponseValue);
13839         }
13840         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13841         export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
13842                 if(!isWasmInitialized) {
13843                         throw new Error("initializeWasm() must be awaited first!");
13844                 }
13845                 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
13846                 // debug statements here
13847         }
13848         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
13849         export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
13850                 if(!isWasmInitialized) {
13851                         throw new Error("initializeWasm() must be awaited first!");
13852                 }
13853                 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
13854                 return decodeArray(nativeResponseValue);
13855         }
13856         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13857         export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
13858                 if(!isWasmInitialized) {
13859                         throw new Error("initializeWasm() must be awaited first!");
13860                 }
13861                 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
13862                 // debug statements here
13863         }
13864         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
13865         export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
13866                 if(!isWasmInitialized) {
13867                         throw new Error("initializeWasm() must be awaited first!");
13868                 }
13869                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
13870                 return decodeArray(nativeResponseValue);
13871         }
13872         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13873         export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
13874                 if(!isWasmInitialized) {
13875                         throw new Error("initializeWasm() must be awaited first!");
13876                 }
13877                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
13878                 // debug statements here
13879         }
13880         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
13881         export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
13882                 if(!isWasmInitialized) {
13883                         throw new Error("initializeWasm() must be awaited first!");
13884                 }
13885                 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
13886                 return decodeArray(nativeResponseValue);
13887         }
13888         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13889         export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
13890                 if(!isWasmInitialized) {
13891                         throw new Error("initializeWasm() must be awaited first!");
13892                 }
13893                 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
13894                 // debug statements here
13895         }
13896         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
13897         export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
13898                 if(!isWasmInitialized) {
13899                         throw new Error("initializeWasm() must be awaited first!");
13900                 }
13901                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
13902                 return decodeArray(nativeResponseValue);
13903         }
13904         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13905         export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
13906                 if(!isWasmInitialized) {
13907                         throw new Error("initializeWasm() must be awaited first!");
13908                 }
13909                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
13910                 // debug statements here
13911         }
13912         // 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);
13913         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 {
13914                 if(!isWasmInitialized) {
13915                         throw new Error("initializeWasm() must be awaited first!");
13916                 }
13917                 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));
13918                 return nativeResponseValue;
13919         }
13920         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
13921         export function TxCreationKeys_clone(orig: number): number {
13922                 if(!isWasmInitialized) {
13923                         throw new Error("initializeWasm() must be awaited first!");
13924                 }
13925                 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
13926                 return nativeResponseValue;
13927         }
13928         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
13929         export function TxCreationKeys_write(obj: number): Uint8Array {
13930                 if(!isWasmInitialized) {
13931                         throw new Error("initializeWasm() must be awaited first!");
13932                 }
13933                 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
13934                 return decodeArray(nativeResponseValue);
13935         }
13936         // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
13937         export function TxCreationKeys_read(ser: Uint8Array): number {
13938                 if(!isWasmInitialized) {
13939                         throw new Error("initializeWasm() must be awaited first!");
13940                 }
13941                 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
13942                 return nativeResponseValue;
13943         }
13944         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
13945         export function ChannelPublicKeys_free(this_obj: number): void {
13946                 if(!isWasmInitialized) {
13947                         throw new Error("initializeWasm() must be awaited first!");
13948                 }
13949                 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
13950                 // debug statements here
13951         }
13952         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
13953         export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
13954                 if(!isWasmInitialized) {
13955                         throw new Error("initializeWasm() must be awaited first!");
13956                 }
13957                 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
13958                 return decodeArray(nativeResponseValue);
13959         }
13960         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13961         export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
13962                 if(!isWasmInitialized) {
13963                         throw new Error("initializeWasm() must be awaited first!");
13964                 }
13965                 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
13966                 // debug statements here
13967         }
13968         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
13969         export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
13970                 if(!isWasmInitialized) {
13971                         throw new Error("initializeWasm() must be awaited first!");
13972                 }
13973                 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
13974                 return decodeArray(nativeResponseValue);
13975         }
13976         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13977         export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
13978                 if(!isWasmInitialized) {
13979                         throw new Error("initializeWasm() must be awaited first!");
13980                 }
13981                 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
13982                 // debug statements here
13983         }
13984         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
13985         export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
13986                 if(!isWasmInitialized) {
13987                         throw new Error("initializeWasm() must be awaited first!");
13988                 }
13989                 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
13990                 return decodeArray(nativeResponseValue);
13991         }
13992         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
13993         export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
13994                 if(!isWasmInitialized) {
13995                         throw new Error("initializeWasm() must be awaited first!");
13996                 }
13997                 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
13998                 // debug statements here
13999         }
14000         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
14001         export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
14002                 if(!isWasmInitialized) {
14003                         throw new Error("initializeWasm() must be awaited first!");
14004                 }
14005                 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
14006                 return decodeArray(nativeResponseValue);
14007         }
14008         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14009         export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
14010                 if(!isWasmInitialized) {
14011                         throw new Error("initializeWasm() must be awaited first!");
14012                 }
14013                 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
14014                 // debug statements here
14015         }
14016         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
14017         export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
14018                 if(!isWasmInitialized) {
14019                         throw new Error("initializeWasm() must be awaited first!");
14020                 }
14021                 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
14022                 return decodeArray(nativeResponseValue);
14023         }
14024         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14025         export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
14026                 if(!isWasmInitialized) {
14027                         throw new Error("initializeWasm() must be awaited first!");
14028                 }
14029                 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
14030                 // debug statements here
14031         }
14032         // 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);
14033         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 {
14034                 if(!isWasmInitialized) {
14035                         throw new Error("initializeWasm() must be awaited first!");
14036                 }
14037                 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));
14038                 return nativeResponseValue;
14039         }
14040         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
14041         export function ChannelPublicKeys_clone(orig: number): number {
14042                 if(!isWasmInitialized) {
14043                         throw new Error("initializeWasm() must be awaited first!");
14044                 }
14045                 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
14046                 return nativeResponseValue;
14047         }
14048         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
14049         export function ChannelPublicKeys_write(obj: number): Uint8Array {
14050                 if(!isWasmInitialized) {
14051                         throw new Error("initializeWasm() must be awaited first!");
14052                 }
14053                 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
14054                 return decodeArray(nativeResponseValue);
14055         }
14056         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
14057         export function ChannelPublicKeys_read(ser: Uint8Array): number {
14058                 if(!isWasmInitialized) {
14059                         throw new Error("initializeWasm() must be awaited first!");
14060                 }
14061                 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
14062                 return nativeResponseValue;
14063         }
14064         // 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);
14065         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 {
14066                 if(!isWasmInitialized) {
14067                         throw new Error("initializeWasm() must be awaited first!");
14068                 }
14069                 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));
14070                 return nativeResponseValue;
14071         }
14072         // 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);
14073         export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
14074                 if(!isWasmInitialized) {
14075                         throw new Error("initializeWasm() must be awaited first!");
14076                 }
14077                 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
14078                 return nativeResponseValue;
14079         }
14080         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
14081         export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
14082                 if(!isWasmInitialized) {
14083                         throw new Error("initializeWasm() must be awaited first!");
14084                 }
14085                 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
14086                 return decodeArray(nativeResponseValue);
14087         }
14088         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
14089         export function HTLCOutputInCommitment_free(this_obj: number): void {
14090                 if(!isWasmInitialized) {
14091                         throw new Error("initializeWasm() must be awaited first!");
14092                 }
14093                 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
14094                 // debug statements here
14095         }
14096         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
14097         export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
14098                 if(!isWasmInitialized) {
14099                         throw new Error("initializeWasm() must be awaited first!");
14100                 }
14101                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
14102                 return nativeResponseValue;
14103         }
14104         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
14105         export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
14106                 if(!isWasmInitialized) {
14107                         throw new Error("initializeWasm() must be awaited first!");
14108                 }
14109                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
14110                 // debug statements here
14111         }
14112         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
14113         export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
14114                 if(!isWasmInitialized) {
14115                         throw new Error("initializeWasm() must be awaited first!");
14116                 }
14117                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
14118                 return nativeResponseValue;
14119         }
14120         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
14121         export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
14122                 if(!isWasmInitialized) {
14123                         throw new Error("initializeWasm() must be awaited first!");
14124                 }
14125                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
14126                 // debug statements here
14127         }
14128         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
14129         export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
14130                 if(!isWasmInitialized) {
14131                         throw new Error("initializeWasm() must be awaited first!");
14132                 }
14133                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
14134                 return nativeResponseValue;
14135         }
14136         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
14137         export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
14138                 if(!isWasmInitialized) {
14139                         throw new Error("initializeWasm() must be awaited first!");
14140                 }
14141                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
14142                 // debug statements here
14143         }
14144         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
14145         export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
14146                 if(!isWasmInitialized) {
14147                         throw new Error("initializeWasm() must be awaited first!");
14148                 }
14149                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
14150                 return decodeArray(nativeResponseValue);
14151         }
14152         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14153         export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
14154                 if(!isWasmInitialized) {
14155                         throw new Error("initializeWasm() must be awaited first!");
14156                 }
14157                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
14158                 // debug statements here
14159         }
14160         // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
14161         export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
14162                 if(!isWasmInitialized) {
14163                         throw new Error("initializeWasm() must be awaited first!");
14164                 }
14165                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
14166                 return nativeResponseValue;
14167         }
14168         // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
14169         export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
14170                 if(!isWasmInitialized) {
14171                         throw new Error("initializeWasm() must be awaited first!");
14172                 }
14173                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
14174                 // debug statements here
14175         }
14176         // 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);
14177         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 {
14178                 if(!isWasmInitialized) {
14179                         throw new Error("initializeWasm() must be awaited first!");
14180                 }
14181                 const nativeResponseValue = wasm.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeArray(payment_hash_arg), transaction_output_index_arg);
14182                 return nativeResponseValue;
14183         }
14184         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
14185         export function HTLCOutputInCommitment_clone(orig: number): number {
14186                 if(!isWasmInitialized) {
14187                         throw new Error("initializeWasm() must be awaited first!");
14188                 }
14189                 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
14190                 return nativeResponseValue;
14191         }
14192         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
14193         export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
14194                 if(!isWasmInitialized) {
14195                         throw new Error("initializeWasm() must be awaited first!");
14196                 }
14197                 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
14198                 return decodeArray(nativeResponseValue);
14199         }
14200         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
14201         export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
14202                 if(!isWasmInitialized) {
14203                         throw new Error("initializeWasm() must be awaited first!");
14204                 }
14205                 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
14206                 return nativeResponseValue;
14207         }
14208         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
14209         export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
14210                 if(!isWasmInitialized) {
14211                         throw new Error("initializeWasm() must be awaited first!");
14212                 }
14213                 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
14214                 return decodeArray(nativeResponseValue);
14215         }
14216         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
14217         export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
14218                 if(!isWasmInitialized) {
14219                         throw new Error("initializeWasm() must be awaited first!");
14220                 }
14221                 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
14222                 return decodeArray(nativeResponseValue);
14223         }
14224         // struct LDKTransaction build_htlc_transaction(const uint8_t (*commitment_txid)[32], uint32_t feerate_per_kw, uint16_t contest_delay, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, struct LDKPublicKey broadcaster_delayed_payment_key, struct LDKPublicKey revocation_key);
14225         export function build_htlc_transaction(commitment_txid: Uint8Array, feerate_per_kw: number, contest_delay: number, htlc: number, broadcaster_delayed_payment_key: Uint8Array, revocation_key: Uint8Array): Uint8Array {
14226                 if(!isWasmInitialized) {
14227                         throw new Error("initializeWasm() must be awaited first!");
14228                 }
14229                 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(commitment_txid), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
14230                 return decodeArray(nativeResponseValue);
14231         }
14232         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
14233         export function ChannelTransactionParameters_free(this_obj: number): void {
14234                 if(!isWasmInitialized) {
14235                         throw new Error("initializeWasm() must be awaited first!");
14236                 }
14237                 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
14238                 // debug statements here
14239         }
14240         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14241         export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
14242                 if(!isWasmInitialized) {
14243                         throw new Error("initializeWasm() must be awaited first!");
14244                 }
14245                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
14246                 return nativeResponseValue;
14247         }
14248         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
14249         export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
14250                 if(!isWasmInitialized) {
14251                         throw new Error("initializeWasm() must be awaited first!");
14252                 }
14253                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
14254                 // debug statements here
14255         }
14256         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14257         export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
14258                 if(!isWasmInitialized) {
14259                         throw new Error("initializeWasm() must be awaited first!");
14260                 }
14261                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
14262                 return nativeResponseValue;
14263         }
14264         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
14265         export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
14266                 if(!isWasmInitialized) {
14267                         throw new Error("initializeWasm() must be awaited first!");
14268                 }
14269                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
14270                 // debug statements here
14271         }
14272         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14273         export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
14274                 if(!isWasmInitialized) {
14275                         throw new Error("initializeWasm() must be awaited first!");
14276                 }
14277                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
14278                 return nativeResponseValue;
14279         }
14280         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
14281         export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
14282                 if(!isWasmInitialized) {
14283                         throw new Error("initializeWasm() must be awaited first!");
14284                 }
14285                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
14286                 // debug statements here
14287         }
14288         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14289         export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
14290                 if(!isWasmInitialized) {
14291                         throw new Error("initializeWasm() must be awaited first!");
14292                 }
14293                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
14294                 return nativeResponseValue;
14295         }
14296         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
14297         export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
14298                 if(!isWasmInitialized) {
14299                         throw new Error("initializeWasm() must be awaited first!");
14300                 }
14301                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
14302                 // debug statements here
14303         }
14304         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14305         export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
14306                 if(!isWasmInitialized) {
14307                         throw new Error("initializeWasm() must be awaited first!");
14308                 }
14309                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
14310                 return nativeResponseValue;
14311         }
14312         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
14313         export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
14314                 if(!isWasmInitialized) {
14315                         throw new Error("initializeWasm() must be awaited first!");
14316                 }
14317                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
14318                 // debug statements here
14319         }
14320         // 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);
14321         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 {
14322                 if(!isWasmInitialized) {
14323                         throw new Error("initializeWasm() must be awaited first!");
14324                 }
14325                 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
14326                 return nativeResponseValue;
14327         }
14328         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
14329         export function ChannelTransactionParameters_clone(orig: number): number {
14330                 if(!isWasmInitialized) {
14331                         throw new Error("initializeWasm() must be awaited first!");
14332                 }
14333                 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
14334                 return nativeResponseValue;
14335         }
14336         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
14337         export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
14338                 if(!isWasmInitialized) {
14339                         throw new Error("initializeWasm() must be awaited first!");
14340                 }
14341                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
14342                 // debug statements here
14343         }
14344         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
14345         export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
14346                 if(!isWasmInitialized) {
14347                         throw new Error("initializeWasm() must be awaited first!");
14348                 }
14349                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
14350                 return nativeResponseValue;
14351         }
14352         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
14353         export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
14354                 if(!isWasmInitialized) {
14355                         throw new Error("initializeWasm() must be awaited first!");
14356                 }
14357                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
14358                 // debug statements here
14359         }
14360         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
14361         export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
14362                 if(!isWasmInitialized) {
14363                         throw new Error("initializeWasm() must be awaited first!");
14364                 }
14365                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
14366                 return nativeResponseValue;
14367         }
14368         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
14369         export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
14370                 if(!isWasmInitialized) {
14371                         throw new Error("initializeWasm() must be awaited first!");
14372                 }
14373                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
14374                 // debug statements here
14375         }
14376         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
14377         export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
14378                 if(!isWasmInitialized) {
14379                         throw new Error("initializeWasm() must be awaited first!");
14380                 }
14381                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
14382                 return nativeResponseValue;
14383         }
14384         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
14385         export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
14386                 if(!isWasmInitialized) {
14387                         throw new Error("initializeWasm() must be awaited first!");
14388                 }
14389                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
14390                 return nativeResponseValue;
14391         }
14392         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
14393         export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
14394                 if(!isWasmInitialized) {
14395                         throw new Error("initializeWasm() must be awaited first!");
14396                 }
14397                 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
14398                 return nativeResponseValue;
14399         }
14400         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
14401         export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
14402                 if(!isWasmInitialized) {
14403                         throw new Error("initializeWasm() must be awaited first!");
14404                 }
14405                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
14406                 return nativeResponseValue;
14407         }
14408         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
14409         export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
14410                 if(!isWasmInitialized) {
14411                         throw new Error("initializeWasm() must be awaited first!");
14412                 }
14413                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
14414                 return nativeResponseValue;
14415         }
14416         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
14417         export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
14418                 if(!isWasmInitialized) {
14419                         throw new Error("initializeWasm() must be awaited first!");
14420                 }
14421                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
14422                 return decodeArray(nativeResponseValue);
14423         }
14424         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
14425         export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
14426                 if(!isWasmInitialized) {
14427                         throw new Error("initializeWasm() must be awaited first!");
14428                 }
14429                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
14430                 return nativeResponseValue;
14431         }
14432         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
14433         export function ChannelTransactionParameters_write(obj: number): Uint8Array {
14434                 if(!isWasmInitialized) {
14435                         throw new Error("initializeWasm() must be awaited first!");
14436                 }
14437                 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
14438                 return decodeArray(nativeResponseValue);
14439         }
14440         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
14441         export function ChannelTransactionParameters_read(ser: Uint8Array): number {
14442                 if(!isWasmInitialized) {
14443                         throw new Error("initializeWasm() must be awaited first!");
14444                 }
14445                 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
14446                 return nativeResponseValue;
14447         }
14448         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
14449         export function DirectedChannelTransactionParameters_free(this_obj: number): void {
14450                 if(!isWasmInitialized) {
14451                         throw new Error("initializeWasm() must be awaited first!");
14452                 }
14453                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
14454                 // debug statements here
14455         }
14456         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14457         export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
14458                 if(!isWasmInitialized) {
14459                         throw new Error("initializeWasm() must be awaited first!");
14460                 }
14461                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
14462                 return nativeResponseValue;
14463         }
14464         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14465         export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
14466                 if(!isWasmInitialized) {
14467                         throw new Error("initializeWasm() must be awaited first!");
14468                 }
14469                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
14470                 return nativeResponseValue;
14471         }
14472         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14473         export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
14474                 if(!isWasmInitialized) {
14475                         throw new Error("initializeWasm() must be awaited first!");
14476                 }
14477                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
14478                 return nativeResponseValue;
14479         }
14480         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14481         export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
14482                 if(!isWasmInitialized) {
14483                         throw new Error("initializeWasm() must be awaited first!");
14484                 }
14485                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
14486                 return nativeResponseValue;
14487         }
14488         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14489         export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
14490                 if(!isWasmInitialized) {
14491                         throw new Error("initializeWasm() must be awaited first!");
14492                 }
14493                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
14494                 return nativeResponseValue;
14495         }
14496         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
14497         export function HolderCommitmentTransaction_free(this_obj: number): void {
14498                 if(!isWasmInitialized) {
14499                         throw new Error("initializeWasm() must be awaited first!");
14500                 }
14501                 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
14502                 // debug statements here
14503         }
14504         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
14505         export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
14506                 if(!isWasmInitialized) {
14507                         throw new Error("initializeWasm() must be awaited first!");
14508                 }
14509                 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
14510                 return decodeArray(nativeResponseValue);
14511         }
14512         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
14513         export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
14514                 if(!isWasmInitialized) {
14515                         throw new Error("initializeWasm() must be awaited first!");
14516                 }
14517                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
14518                 // debug statements here
14519         }
14520         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
14521         export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
14522                 if(!isWasmInitialized) {
14523                         throw new Error("initializeWasm() must be awaited first!");
14524                 }
14525                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
14526                 // debug statements here
14527         }
14528         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
14529         export function HolderCommitmentTransaction_clone(orig: number): number {
14530                 if(!isWasmInitialized) {
14531                         throw new Error("initializeWasm() must be awaited first!");
14532                 }
14533                 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
14534                 return nativeResponseValue;
14535         }
14536         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
14537         export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
14538                 if(!isWasmInitialized) {
14539                         throw new Error("initializeWasm() must be awaited first!");
14540                 }
14541                 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
14542                 return decodeArray(nativeResponseValue);
14543         }
14544         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
14545         export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
14546                 if(!isWasmInitialized) {
14547                         throw new Error("initializeWasm() must be awaited first!");
14548                 }
14549                 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
14550                 return nativeResponseValue;
14551         }
14552         // 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);
14553         export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
14554                 if(!isWasmInitialized) {
14555                         throw new Error("initializeWasm() must be awaited first!");
14556                 }
14557                 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
14558                 return nativeResponseValue;
14559         }
14560         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
14561         export function BuiltCommitmentTransaction_free(this_obj: number): void {
14562                 if(!isWasmInitialized) {
14563                         throw new Error("initializeWasm() must be awaited first!");
14564                 }
14565                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
14566                 // debug statements here
14567         }
14568         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
14569         export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
14570                 if(!isWasmInitialized) {
14571                         throw new Error("initializeWasm() must be awaited first!");
14572                 }
14573                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
14574                 return decodeArray(nativeResponseValue);
14575         }
14576         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
14577         export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
14578                 if(!isWasmInitialized) {
14579                         throw new Error("initializeWasm() must be awaited first!");
14580                 }
14581                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
14582                 // debug statements here
14583         }
14584         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
14585         export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
14586                 if(!isWasmInitialized) {
14587                         throw new Error("initializeWasm() must be awaited first!");
14588                 }
14589                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
14590                 return decodeArray(nativeResponseValue);
14591         }
14592         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14593         export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
14594                 if(!isWasmInitialized) {
14595                         throw new Error("initializeWasm() must be awaited first!");
14596                 }
14597                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
14598                 // debug statements here
14599         }
14600         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
14601         export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
14602                 if(!isWasmInitialized) {
14603                         throw new Error("initializeWasm() must be awaited first!");
14604                 }
14605                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
14606                 return nativeResponseValue;
14607         }
14608         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
14609         export function BuiltCommitmentTransaction_clone(orig: number): number {
14610                 if(!isWasmInitialized) {
14611                         throw new Error("initializeWasm() must be awaited first!");
14612                 }
14613                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
14614                 return nativeResponseValue;
14615         }
14616         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
14617         export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
14618                 if(!isWasmInitialized) {
14619                         throw new Error("initializeWasm() must be awaited first!");
14620                 }
14621                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
14622                 return decodeArray(nativeResponseValue);
14623         }
14624         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
14625         export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
14626                 if(!isWasmInitialized) {
14627                         throw new Error("initializeWasm() must be awaited first!");
14628                 }
14629                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
14630                 return nativeResponseValue;
14631         }
14632         // 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);
14633         export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
14634                 if(!isWasmInitialized) {
14635                         throw new Error("initializeWasm() must be awaited first!");
14636                 }
14637                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
14638                 return decodeArray(nativeResponseValue);
14639         }
14640         // 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);
14641         export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
14642                 if(!isWasmInitialized) {
14643                         throw new Error("initializeWasm() must be awaited first!");
14644                 }
14645                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
14646                 return decodeArray(nativeResponseValue);
14647         }
14648         // void ClosingTransaction_free(struct LDKClosingTransaction this_obj);
14649         export function ClosingTransaction_free(this_obj: number): void {
14650                 if(!isWasmInitialized) {
14651                         throw new Error("initializeWasm() must be awaited first!");
14652                 }
14653                 const nativeResponseValue = wasm.ClosingTransaction_free(this_obj);
14654                 // debug statements here
14655         }
14656         // MUST_USE_RES struct LDKClosingTransaction ClosingTransaction_new(uint64_t to_holder_value_sat, uint64_t to_counterparty_value_sat, struct LDKCVec_u8Z to_holder_script, struct LDKCVec_u8Z to_counterparty_script, struct LDKOutPoint funding_outpoint);
14657         export function ClosingTransaction_new(to_holder_value_sat: number, to_counterparty_value_sat: number, to_holder_script: Uint8Array, to_counterparty_script: Uint8Array, funding_outpoint: number): number {
14658                 if(!isWasmInitialized) {
14659                         throw new Error("initializeWasm() must be awaited first!");
14660                 }
14661                 const nativeResponseValue = wasm.ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, encodeArray(to_holder_script), encodeArray(to_counterparty_script), funding_outpoint);
14662                 return nativeResponseValue;
14663         }
14664         // MUST_USE_RES struct LDKTrustedClosingTransaction ClosingTransaction_trust(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
14665         export function ClosingTransaction_trust(this_arg: number): number {
14666                 if(!isWasmInitialized) {
14667                         throw new Error("initializeWasm() must be awaited first!");
14668                 }
14669                 const nativeResponseValue = wasm.ClosingTransaction_trust(this_arg);
14670                 return nativeResponseValue;
14671         }
14672         // MUST_USE_RES struct LDKCResult_TrustedClosingTransactionNoneZ ClosingTransaction_verify(const struct LDKClosingTransaction *NONNULL_PTR this_arg, struct LDKOutPoint funding_outpoint);
14673         export function ClosingTransaction_verify(this_arg: number, funding_outpoint: number): number {
14674                 if(!isWasmInitialized) {
14675                         throw new Error("initializeWasm() must be awaited first!");
14676                 }
14677                 const nativeResponseValue = wasm.ClosingTransaction_verify(this_arg, funding_outpoint);
14678                 return nativeResponseValue;
14679         }
14680         // MUST_USE_RES uint64_t ClosingTransaction_to_holder_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
14681         export function ClosingTransaction_to_holder_value_sat(this_arg: number): number {
14682                 if(!isWasmInitialized) {
14683                         throw new Error("initializeWasm() must be awaited first!");
14684                 }
14685                 const nativeResponseValue = wasm.ClosingTransaction_to_holder_value_sat(this_arg);
14686                 return nativeResponseValue;
14687         }
14688         // MUST_USE_RES uint64_t ClosingTransaction_to_counterparty_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
14689         export function ClosingTransaction_to_counterparty_value_sat(this_arg: number): number {
14690                 if(!isWasmInitialized) {
14691                         throw new Error("initializeWasm() must be awaited first!");
14692                 }
14693                 const nativeResponseValue = wasm.ClosingTransaction_to_counterparty_value_sat(this_arg);
14694                 return nativeResponseValue;
14695         }
14696         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_holder_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
14697         export function ClosingTransaction_to_holder_script(this_arg: number): Uint8Array {
14698                 if(!isWasmInitialized) {
14699                         throw new Error("initializeWasm() must be awaited first!");
14700                 }
14701                 const nativeResponseValue = wasm.ClosingTransaction_to_holder_script(this_arg);
14702                 return decodeArray(nativeResponseValue);
14703         }
14704         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_counterparty_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
14705         export function ClosingTransaction_to_counterparty_script(this_arg: number): Uint8Array {
14706                 if(!isWasmInitialized) {
14707                         throw new Error("initializeWasm() must be awaited first!");
14708                 }
14709                 const nativeResponseValue = wasm.ClosingTransaction_to_counterparty_script(this_arg);
14710                 return decodeArray(nativeResponseValue);
14711         }
14712         // void TrustedClosingTransaction_free(struct LDKTrustedClosingTransaction this_obj);
14713         export function TrustedClosingTransaction_free(this_obj: number): void {
14714                 if(!isWasmInitialized) {
14715                         throw new Error("initializeWasm() must be awaited first!");
14716                 }
14717                 const nativeResponseValue = wasm.TrustedClosingTransaction_free(this_obj);
14718                 // debug statements here
14719         }
14720         // MUST_USE_RES struct LDKTransaction TrustedClosingTransaction_built_transaction(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg);
14721         export function TrustedClosingTransaction_built_transaction(this_arg: number): Uint8Array {
14722                 if(!isWasmInitialized) {
14723                         throw new Error("initializeWasm() must be awaited first!");
14724                 }
14725                 const nativeResponseValue = wasm.TrustedClosingTransaction_built_transaction(this_arg);
14726                 return decodeArray(nativeResponseValue);
14727         }
14728         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedClosingTransaction_get_sighash_all(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg, struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
14729         export function TrustedClosingTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
14730                 if(!isWasmInitialized) {
14731                         throw new Error("initializeWasm() must be awaited first!");
14732                 }
14733                 const nativeResponseValue = wasm.TrustedClosingTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
14734                 return decodeArray(nativeResponseValue);
14735         }
14736         // MUST_USE_RES struct LDKSignature TrustedClosingTransaction_sign(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg, const uint8_t (*funding_key)[32], struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
14737         export function TrustedClosingTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
14738                 if(!isWasmInitialized) {
14739                         throw new Error("initializeWasm() must be awaited first!");
14740                 }
14741                 const nativeResponseValue = wasm.TrustedClosingTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
14742                 return decodeArray(nativeResponseValue);
14743         }
14744         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
14745         export function CommitmentTransaction_free(this_obj: number): void {
14746                 if(!isWasmInitialized) {
14747                         throw new Error("initializeWasm() must be awaited first!");
14748                 }
14749                 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
14750                 // debug statements here
14751         }
14752         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
14753         export function CommitmentTransaction_clone(orig: number): number {
14754                 if(!isWasmInitialized) {
14755                         throw new Error("initializeWasm() must be awaited first!");
14756                 }
14757                 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
14758                 return nativeResponseValue;
14759         }
14760         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
14761         export function CommitmentTransaction_write(obj: number): Uint8Array {
14762                 if(!isWasmInitialized) {
14763                         throw new Error("initializeWasm() must be awaited first!");
14764                 }
14765                 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
14766                 return decodeArray(nativeResponseValue);
14767         }
14768         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
14769         export function CommitmentTransaction_read(ser: Uint8Array): number {
14770                 if(!isWasmInitialized) {
14771                         throw new Error("initializeWasm() must be awaited first!");
14772                 }
14773                 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
14774                 return nativeResponseValue;
14775         }
14776         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
14777         export function CommitmentTransaction_commitment_number(this_arg: number): number {
14778                 if(!isWasmInitialized) {
14779                         throw new Error("initializeWasm() must be awaited first!");
14780                 }
14781                 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
14782                 return nativeResponseValue;
14783         }
14784         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
14785         export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
14786                 if(!isWasmInitialized) {
14787                         throw new Error("initializeWasm() must be awaited first!");
14788                 }
14789                 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
14790                 return nativeResponseValue;
14791         }
14792         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
14793         export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
14794                 if(!isWasmInitialized) {
14795                         throw new Error("initializeWasm() must be awaited first!");
14796                 }
14797                 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
14798                 return nativeResponseValue;
14799         }
14800         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
14801         export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
14802                 if(!isWasmInitialized) {
14803                         throw new Error("initializeWasm() must be awaited first!");
14804                 }
14805                 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
14806                 return nativeResponseValue;
14807         }
14808         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
14809         export function CommitmentTransaction_trust(this_arg: number): number {
14810                 if(!isWasmInitialized) {
14811                         throw new Error("initializeWasm() must be awaited first!");
14812                 }
14813                 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
14814                 return nativeResponseValue;
14815         }
14816         // 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);
14817         export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
14818                 if(!isWasmInitialized) {
14819                         throw new Error("initializeWasm() must be awaited first!");
14820                 }
14821                 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
14822                 return nativeResponseValue;
14823         }
14824         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
14825         export function TrustedCommitmentTransaction_free(this_obj: number): void {
14826                 if(!isWasmInitialized) {
14827                         throw new Error("initializeWasm() must be awaited first!");
14828                 }
14829                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
14830                 // debug statements here
14831         }
14832         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
14833         export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
14834                 if(!isWasmInitialized) {
14835                         throw new Error("initializeWasm() must be awaited first!");
14836                 }
14837                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
14838                 return decodeArray(nativeResponseValue);
14839         }
14840         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
14841         export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
14842                 if(!isWasmInitialized) {
14843                         throw new Error("initializeWasm() must be awaited first!");
14844                 }
14845                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
14846                 return nativeResponseValue;
14847         }
14848         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
14849         export function TrustedCommitmentTransaction_keys(this_arg: number): number {
14850                 if(!isWasmInitialized) {
14851                         throw new Error("initializeWasm() must be awaited first!");
14852                 }
14853                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
14854                 return nativeResponseValue;
14855         }
14856         // 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);
14857         export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
14858                 if(!isWasmInitialized) {
14859                         throw new Error("initializeWasm() must be awaited first!");
14860                 }
14861                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
14862                 return nativeResponseValue;
14863         }
14864         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
14865         export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
14866                 if(!isWasmInitialized) {
14867                         throw new Error("initializeWasm() must be awaited first!");
14868                 }
14869                 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
14870                 return nativeResponseValue;
14871         }
14872         // bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b);
14873         export function InitFeatures_eq(a: number, b: number): boolean {
14874                 if(!isWasmInitialized) {
14875                         throw new Error("initializeWasm() must be awaited first!");
14876                 }
14877                 const nativeResponseValue = wasm.InitFeatures_eq(a, b);
14878                 return nativeResponseValue;
14879         }
14880         // bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b);
14881         export function NodeFeatures_eq(a: number, b: number): boolean {
14882                 if(!isWasmInitialized) {
14883                         throw new Error("initializeWasm() must be awaited first!");
14884                 }
14885                 const nativeResponseValue = wasm.NodeFeatures_eq(a, b);
14886                 return nativeResponseValue;
14887         }
14888         // bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b);
14889         export function ChannelFeatures_eq(a: number, b: number): boolean {
14890                 if(!isWasmInitialized) {
14891                         throw new Error("initializeWasm() must be awaited first!");
14892                 }
14893                 const nativeResponseValue = wasm.ChannelFeatures_eq(a, b);
14894                 return nativeResponseValue;
14895         }
14896         // bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b);
14897         export function InvoiceFeatures_eq(a: number, b: number): boolean {
14898                 if(!isWasmInitialized) {
14899                         throw new Error("initializeWasm() must be awaited first!");
14900                 }
14901                 const nativeResponseValue = wasm.InvoiceFeatures_eq(a, b);
14902                 return nativeResponseValue;
14903         }
14904         // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
14905         export function InitFeatures_clone(orig: number): number {
14906                 if(!isWasmInitialized) {
14907                         throw new Error("initializeWasm() must be awaited first!");
14908                 }
14909                 const nativeResponseValue = wasm.InitFeatures_clone(orig);
14910                 return nativeResponseValue;
14911         }
14912         // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
14913         export function NodeFeatures_clone(orig: number): number {
14914                 if(!isWasmInitialized) {
14915                         throw new Error("initializeWasm() must be awaited first!");
14916                 }
14917                 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
14918                 return nativeResponseValue;
14919         }
14920         // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
14921         export function ChannelFeatures_clone(orig: number): number {
14922                 if(!isWasmInitialized) {
14923                         throw new Error("initializeWasm() must be awaited first!");
14924                 }
14925                 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
14926                 return nativeResponseValue;
14927         }
14928         // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
14929         export function InvoiceFeatures_clone(orig: number): number {
14930                 if(!isWasmInitialized) {
14931                         throw new Error("initializeWasm() must be awaited first!");
14932                 }
14933                 const nativeResponseValue = wasm.InvoiceFeatures_clone(orig);
14934                 return nativeResponseValue;
14935         }
14936         // void InitFeatures_free(struct LDKInitFeatures this_obj);
14937         export function InitFeatures_free(this_obj: number): void {
14938                 if(!isWasmInitialized) {
14939                         throw new Error("initializeWasm() must be awaited first!");
14940                 }
14941                 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
14942                 // debug statements here
14943         }
14944         // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
14945         export function NodeFeatures_free(this_obj: number): void {
14946                 if(!isWasmInitialized) {
14947                         throw new Error("initializeWasm() must be awaited first!");
14948                 }
14949                 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
14950                 // debug statements here
14951         }
14952         // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
14953         export function ChannelFeatures_free(this_obj: number): void {
14954                 if(!isWasmInitialized) {
14955                         throw new Error("initializeWasm() must be awaited first!");
14956                 }
14957                 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
14958                 // debug statements here
14959         }
14960         // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
14961         export function InvoiceFeatures_free(this_obj: number): void {
14962                 if(!isWasmInitialized) {
14963                         throw new Error("initializeWasm() must be awaited first!");
14964                 }
14965                 const nativeResponseValue = wasm.InvoiceFeatures_free(this_obj);
14966                 // debug statements here
14967         }
14968         // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
14969         export function InitFeatures_empty(): number {
14970                 if(!isWasmInitialized) {
14971                         throw new Error("initializeWasm() must be awaited first!");
14972                 }
14973                 const nativeResponseValue = wasm.InitFeatures_empty();
14974                 return nativeResponseValue;
14975         }
14976         // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
14977         export function InitFeatures_known(): number {
14978                 if(!isWasmInitialized) {
14979                         throw new Error("initializeWasm() must be awaited first!");
14980                 }
14981                 const nativeResponseValue = wasm.InitFeatures_known();
14982                 return nativeResponseValue;
14983         }
14984         // MUST_USE_RES bool InitFeatures_requires_unknown_bits(const struct LDKInitFeatures *NONNULL_PTR this_arg);
14985         export function InitFeatures_requires_unknown_bits(this_arg: number): boolean {
14986                 if(!isWasmInitialized) {
14987                         throw new Error("initializeWasm() must be awaited first!");
14988                 }
14989                 const nativeResponseValue = wasm.InitFeatures_requires_unknown_bits(this_arg);
14990                 return nativeResponseValue;
14991         }
14992         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
14993         export function NodeFeatures_empty(): number {
14994                 if(!isWasmInitialized) {
14995                         throw new Error("initializeWasm() must be awaited first!");
14996                 }
14997                 const nativeResponseValue = wasm.NodeFeatures_empty();
14998                 return nativeResponseValue;
14999         }
15000         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
15001         export function NodeFeatures_known(): number {
15002                 if(!isWasmInitialized) {
15003                         throw new Error("initializeWasm() must be awaited first!");
15004                 }
15005                 const nativeResponseValue = wasm.NodeFeatures_known();
15006                 return nativeResponseValue;
15007         }
15008         // MUST_USE_RES bool NodeFeatures_requires_unknown_bits(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
15009         export function NodeFeatures_requires_unknown_bits(this_arg: number): boolean {
15010                 if(!isWasmInitialized) {
15011                         throw new Error("initializeWasm() must be awaited first!");
15012                 }
15013                 const nativeResponseValue = wasm.NodeFeatures_requires_unknown_bits(this_arg);
15014                 return nativeResponseValue;
15015         }
15016         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
15017         export function ChannelFeatures_empty(): number {
15018                 if(!isWasmInitialized) {
15019                         throw new Error("initializeWasm() must be awaited first!");
15020                 }
15021                 const nativeResponseValue = wasm.ChannelFeatures_empty();
15022                 return nativeResponseValue;
15023         }
15024         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
15025         export function ChannelFeatures_known(): number {
15026                 if(!isWasmInitialized) {
15027                         throw new Error("initializeWasm() must be awaited first!");
15028                 }
15029                 const nativeResponseValue = wasm.ChannelFeatures_known();
15030                 return nativeResponseValue;
15031         }
15032         // MUST_USE_RES bool ChannelFeatures_requires_unknown_bits(const struct LDKChannelFeatures *NONNULL_PTR this_arg);
15033         export function ChannelFeatures_requires_unknown_bits(this_arg: number): boolean {
15034                 if(!isWasmInitialized) {
15035                         throw new Error("initializeWasm() must be awaited first!");
15036                 }
15037                 const nativeResponseValue = wasm.ChannelFeatures_requires_unknown_bits(this_arg);
15038                 return nativeResponseValue;
15039         }
15040         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
15041         export function InvoiceFeatures_empty(): number {
15042                 if(!isWasmInitialized) {
15043                         throw new Error("initializeWasm() must be awaited first!");
15044                 }
15045                 const nativeResponseValue = wasm.InvoiceFeatures_empty();
15046                 return nativeResponseValue;
15047         }
15048         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
15049         export function InvoiceFeatures_known(): number {
15050                 if(!isWasmInitialized) {
15051                         throw new Error("initializeWasm() must be awaited first!");
15052                 }
15053                 const nativeResponseValue = wasm.InvoiceFeatures_known();
15054                 return nativeResponseValue;
15055         }
15056         // MUST_USE_RES bool InvoiceFeatures_requires_unknown_bits(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
15057         export function InvoiceFeatures_requires_unknown_bits(this_arg: number): boolean {
15058                 if(!isWasmInitialized) {
15059                         throw new Error("initializeWasm() must be awaited first!");
15060                 }
15061                 const nativeResponseValue = wasm.InvoiceFeatures_requires_unknown_bits(this_arg);
15062                 return nativeResponseValue;
15063         }
15064         // MUST_USE_RES bool InitFeatures_supports_payment_secret(const struct LDKInitFeatures *NONNULL_PTR this_arg);
15065         export function InitFeatures_supports_payment_secret(this_arg: number): boolean {
15066                 if(!isWasmInitialized) {
15067                         throw new Error("initializeWasm() must be awaited first!");
15068                 }
15069                 const nativeResponseValue = wasm.InitFeatures_supports_payment_secret(this_arg);
15070                 return nativeResponseValue;
15071         }
15072         // MUST_USE_RES bool NodeFeatures_supports_payment_secret(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
15073         export function NodeFeatures_supports_payment_secret(this_arg: number): boolean {
15074                 if(!isWasmInitialized) {
15075                         throw new Error("initializeWasm() must be awaited first!");
15076                 }
15077                 const nativeResponseValue = wasm.NodeFeatures_supports_payment_secret(this_arg);
15078                 return nativeResponseValue;
15079         }
15080         // MUST_USE_RES bool InvoiceFeatures_supports_payment_secret(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
15081         export function InvoiceFeatures_supports_payment_secret(this_arg: number): boolean {
15082                 if(!isWasmInitialized) {
15083                         throw new Error("initializeWasm() must be awaited first!");
15084                 }
15085                 const nativeResponseValue = wasm.InvoiceFeatures_supports_payment_secret(this_arg);
15086                 return nativeResponseValue;
15087         }
15088         // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
15089         export function InitFeatures_write(obj: number): Uint8Array {
15090                 if(!isWasmInitialized) {
15091                         throw new Error("initializeWasm() must be awaited first!");
15092                 }
15093                 const nativeResponseValue = wasm.InitFeatures_write(obj);
15094                 return decodeArray(nativeResponseValue);
15095         }
15096         // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
15097         export function NodeFeatures_write(obj: number): Uint8Array {
15098                 if(!isWasmInitialized) {
15099                         throw new Error("initializeWasm() must be awaited first!");
15100                 }
15101                 const nativeResponseValue = wasm.NodeFeatures_write(obj);
15102                 return decodeArray(nativeResponseValue);
15103         }
15104         // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
15105         export function ChannelFeatures_write(obj: number): Uint8Array {
15106                 if(!isWasmInitialized) {
15107                         throw new Error("initializeWasm() must be awaited first!");
15108                 }
15109                 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
15110                 return decodeArray(nativeResponseValue);
15111         }
15112         // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
15113         export function InvoiceFeatures_write(obj: number): Uint8Array {
15114                 if(!isWasmInitialized) {
15115                         throw new Error("initializeWasm() must be awaited first!");
15116                 }
15117                 const nativeResponseValue = wasm.InvoiceFeatures_write(obj);
15118                 return decodeArray(nativeResponseValue);
15119         }
15120         // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
15121         export function InitFeatures_read(ser: Uint8Array): number {
15122                 if(!isWasmInitialized) {
15123                         throw new Error("initializeWasm() must be awaited first!");
15124                 }
15125                 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
15126                 return nativeResponseValue;
15127         }
15128         // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
15129         export function NodeFeatures_read(ser: Uint8Array): number {
15130                 if(!isWasmInitialized) {
15131                         throw new Error("initializeWasm() must be awaited first!");
15132                 }
15133                 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
15134                 return nativeResponseValue;
15135         }
15136         // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
15137         export function ChannelFeatures_read(ser: Uint8Array): number {
15138                 if(!isWasmInitialized) {
15139                         throw new Error("initializeWasm() must be awaited first!");
15140                 }
15141                 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
15142                 return nativeResponseValue;
15143         }
15144         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
15145         export function InvoiceFeatures_read(ser: Uint8Array): number {
15146                 if(!isWasmInitialized) {
15147                         throw new Error("initializeWasm() must be awaited first!");
15148                 }
15149                 const nativeResponseValue = wasm.InvoiceFeatures_read(encodeArray(ser));
15150                 return nativeResponseValue;
15151         }
15152         // void ShutdownScript_free(struct LDKShutdownScript this_obj);
15153         export function ShutdownScript_free(this_obj: number): void {
15154                 if(!isWasmInitialized) {
15155                         throw new Error("initializeWasm() must be awaited first!");
15156                 }
15157                 const nativeResponseValue = wasm.ShutdownScript_free(this_obj);
15158                 // debug statements here
15159         }
15160         // struct LDKShutdownScript ShutdownScript_clone(const struct LDKShutdownScript *NONNULL_PTR orig);
15161         export function ShutdownScript_clone(orig: number): number {
15162                 if(!isWasmInitialized) {
15163                         throw new Error("initializeWasm() must be awaited first!");
15164                 }
15165                 const nativeResponseValue = wasm.ShutdownScript_clone(orig);
15166                 return nativeResponseValue;
15167         }
15168         // void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
15169         export function InvalidShutdownScript_free(this_obj: number): void {
15170                 if(!isWasmInitialized) {
15171                         throw new Error("initializeWasm() must be awaited first!");
15172                 }
15173                 const nativeResponseValue = wasm.InvalidShutdownScript_free(this_obj);
15174                 // debug statements here
15175         }
15176         // struct LDKu8slice InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
15177         export function InvalidShutdownScript_get_script(this_ptr: number): Uint8Array {
15178                 if(!isWasmInitialized) {
15179                         throw new Error("initializeWasm() must be awaited first!");
15180                 }
15181                 const nativeResponseValue = wasm.InvalidShutdownScript_get_script(this_ptr);
15182                 return decodeArray(nativeResponseValue);
15183         }
15184         // void InvalidShutdownScript_set_script(struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
15185         export function InvalidShutdownScript_set_script(this_ptr: number, val: Uint8Array): void {
15186                 if(!isWasmInitialized) {
15187                         throw new Error("initializeWasm() must be awaited first!");
15188                 }
15189                 const nativeResponseValue = wasm.InvalidShutdownScript_set_script(this_ptr, encodeArray(val));
15190                 // debug statements here
15191         }
15192         // MUST_USE_RES struct LDKInvalidShutdownScript InvalidShutdownScript_new(struct LDKCVec_u8Z script_arg);
15193         export function InvalidShutdownScript_new(script_arg: Uint8Array): number {
15194                 if(!isWasmInitialized) {
15195                         throw new Error("initializeWasm() must be awaited first!");
15196                 }
15197                 const nativeResponseValue = wasm.InvalidShutdownScript_new(encodeArray(script_arg));
15198                 return nativeResponseValue;
15199         }
15200         // struct LDKCVec_u8Z ShutdownScript_write(const struct LDKShutdownScript *NONNULL_PTR obj);
15201         export function ShutdownScript_write(obj: number): Uint8Array {
15202                 if(!isWasmInitialized) {
15203                         throw new Error("initializeWasm() must be awaited first!");
15204                 }
15205                 const nativeResponseValue = wasm.ShutdownScript_write(obj);
15206                 return decodeArray(nativeResponseValue);
15207         }
15208         // struct LDKCResult_ShutdownScriptDecodeErrorZ ShutdownScript_read(struct LDKu8slice ser);
15209         export function ShutdownScript_read(ser: Uint8Array): number {
15210                 if(!isWasmInitialized) {
15211                         throw new Error("initializeWasm() must be awaited first!");
15212                 }
15213                 const nativeResponseValue = wasm.ShutdownScript_read(encodeArray(ser));
15214                 return nativeResponseValue;
15215         }
15216         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2pkh(const uint8_t (*pubkey_hash)[20]);
15217         export function ShutdownScript_new_p2pkh(pubkey_hash: Uint8Array): number {
15218                 if(!isWasmInitialized) {
15219                         throw new Error("initializeWasm() must be awaited first!");
15220                 }
15221                 const nativeResponseValue = wasm.ShutdownScript_new_p2pkh(encodeArray(pubkey_hash));
15222                 return nativeResponseValue;
15223         }
15224         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2sh(const uint8_t (*script_hash)[20]);
15225         export function ShutdownScript_new_p2sh(script_hash: Uint8Array): number {
15226                 if(!isWasmInitialized) {
15227                         throw new Error("initializeWasm() must be awaited first!");
15228                 }
15229                 const nativeResponseValue = wasm.ShutdownScript_new_p2sh(encodeArray(script_hash));
15230                 return nativeResponseValue;
15231         }
15232         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wpkh(const uint8_t (*pubkey_hash)[20]);
15233         export function ShutdownScript_new_p2wpkh(pubkey_hash: Uint8Array): number {
15234                 if(!isWasmInitialized) {
15235                         throw new Error("initializeWasm() must be awaited first!");
15236                 }
15237                 const nativeResponseValue = wasm.ShutdownScript_new_p2wpkh(encodeArray(pubkey_hash));
15238                 return nativeResponseValue;
15239         }
15240         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wsh(const uint8_t (*script_hash)[32]);
15241         export function ShutdownScript_new_p2wsh(script_hash: Uint8Array): number {
15242                 if(!isWasmInitialized) {
15243                         throw new Error("initializeWasm() must be awaited first!");
15244                 }
15245                 const nativeResponseValue = wasm.ShutdownScript_new_p2wsh(encodeArray(script_hash));
15246                 return nativeResponseValue;
15247         }
15248         // MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(uint8_t version, struct LDKu8slice program);
15249         export function ShutdownScript_new_witness_program(version: number, program: Uint8Array): number {
15250                 if(!isWasmInitialized) {
15251                         throw new Error("initializeWasm() must be awaited first!");
15252                 }
15253                 const nativeResponseValue = wasm.ShutdownScript_new_witness_program(version, encodeArray(program));
15254                 return nativeResponseValue;
15255         }
15256         // MUST_USE_RES struct LDKCVec_u8Z ShutdownScript_into_inner(struct LDKShutdownScript this_arg);
15257         export function ShutdownScript_into_inner(this_arg: number): Uint8Array {
15258                 if(!isWasmInitialized) {
15259                         throw new Error("initializeWasm() must be awaited first!");
15260                 }
15261                 const nativeResponseValue = wasm.ShutdownScript_into_inner(this_arg);
15262                 return decodeArray(nativeResponseValue);
15263         }
15264         // MUST_USE_RES struct LDKPublicKey ShutdownScript_as_legacy_pubkey(const struct LDKShutdownScript *NONNULL_PTR this_arg);
15265         export function ShutdownScript_as_legacy_pubkey(this_arg: number): Uint8Array {
15266                 if(!isWasmInitialized) {
15267                         throw new Error("initializeWasm() must be awaited first!");
15268                 }
15269                 const nativeResponseValue = wasm.ShutdownScript_as_legacy_pubkey(this_arg);
15270                 return decodeArray(nativeResponseValue);
15271         }
15272         // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
15273         export function ShutdownScript_is_compatible(this_arg: number, features: number): boolean {
15274                 if(!isWasmInitialized) {
15275                         throw new Error("initializeWasm() must be awaited first!");
15276                 }
15277                 const nativeResponseValue = wasm.ShutdownScript_is_compatible(this_arg, features);
15278                 return nativeResponseValue;
15279         }
15280         // void CustomMessageReader_free(struct LDKCustomMessageReader this_ptr);
15281         export function CustomMessageReader_free(this_ptr: number): void {
15282                 if(!isWasmInitialized) {
15283                         throw new Error("initializeWasm() must be awaited first!");
15284                 }
15285                 const nativeResponseValue = wasm.CustomMessageReader_free(this_ptr);
15286                 // debug statements here
15287         }
15288         // struct LDKType Type_clone(const struct LDKType *NONNULL_PTR orig);
15289         export function Type_clone(orig: number): number {
15290                 if(!isWasmInitialized) {
15291                         throw new Error("initializeWasm() must be awaited first!");
15292                 }
15293                 const nativeResponseValue = wasm.Type_clone(orig);
15294                 return nativeResponseValue;
15295         }
15296         // void Type_free(struct LDKType this_ptr);
15297         export function Type_free(this_ptr: number): void {
15298                 if(!isWasmInitialized) {
15299                         throw new Error("initializeWasm() must be awaited first!");
15300                 }
15301                 const nativeResponseValue = wasm.Type_free(this_ptr);
15302                 // debug statements here
15303         }
15304         // void RouteHop_free(struct LDKRouteHop this_obj);
15305         export function RouteHop_free(this_obj: number): void {
15306                 if(!isWasmInitialized) {
15307                         throw new Error("initializeWasm() must be awaited first!");
15308                 }
15309                 const nativeResponseValue = wasm.RouteHop_free(this_obj);
15310                 // debug statements here
15311         }
15312         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
15313         export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
15314                 if(!isWasmInitialized) {
15315                         throw new Error("initializeWasm() must be awaited first!");
15316                 }
15317                 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
15318                 return decodeArray(nativeResponseValue);
15319         }
15320         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15321         export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
15322                 if(!isWasmInitialized) {
15323                         throw new Error("initializeWasm() must be awaited first!");
15324                 }
15325                 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
15326                 // debug statements here
15327         }
15328         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
15329         export function RouteHop_get_node_features(this_ptr: number): number {
15330                 if(!isWasmInitialized) {
15331                         throw new Error("initializeWasm() must be awaited first!");
15332                 }
15333                 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
15334                 return nativeResponseValue;
15335         }
15336         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
15337         export function RouteHop_set_node_features(this_ptr: number, val: number): void {
15338                 if(!isWasmInitialized) {
15339                         throw new Error("initializeWasm() must be awaited first!");
15340                 }
15341                 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
15342                 // debug statements here
15343         }
15344         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
15345         export function RouteHop_get_short_channel_id(this_ptr: number): number {
15346                 if(!isWasmInitialized) {
15347                         throw new Error("initializeWasm() must be awaited first!");
15348                 }
15349                 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
15350                 return nativeResponseValue;
15351         }
15352         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
15353         export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
15354                 if(!isWasmInitialized) {
15355                         throw new Error("initializeWasm() must be awaited first!");
15356                 }
15357                 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
15358                 // debug statements here
15359         }
15360         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
15361         export function RouteHop_get_channel_features(this_ptr: number): number {
15362                 if(!isWasmInitialized) {
15363                         throw new Error("initializeWasm() must be awaited first!");
15364                 }
15365                 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
15366                 return nativeResponseValue;
15367         }
15368         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
15369         export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
15370                 if(!isWasmInitialized) {
15371                         throw new Error("initializeWasm() must be awaited first!");
15372                 }
15373                 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
15374                 // debug statements here
15375         }
15376         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
15377         export function RouteHop_get_fee_msat(this_ptr: number): number {
15378                 if(!isWasmInitialized) {
15379                         throw new Error("initializeWasm() must be awaited first!");
15380                 }
15381                 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
15382                 return nativeResponseValue;
15383         }
15384         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
15385         export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
15386                 if(!isWasmInitialized) {
15387                         throw new Error("initializeWasm() must be awaited first!");
15388                 }
15389                 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
15390                 // debug statements here
15391         }
15392         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
15393         export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
15394                 if(!isWasmInitialized) {
15395                         throw new Error("initializeWasm() must be awaited first!");
15396                 }
15397                 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
15398                 return nativeResponseValue;
15399         }
15400         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
15401         export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
15402                 if(!isWasmInitialized) {
15403                         throw new Error("initializeWasm() must be awaited first!");
15404                 }
15405                 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
15406                 // debug statements here
15407         }
15408         // 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);
15409         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 {
15410                 if(!isWasmInitialized) {
15411                         throw new Error("initializeWasm() must be awaited first!");
15412                 }
15413                 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);
15414                 return nativeResponseValue;
15415         }
15416         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
15417         export function RouteHop_clone(orig: number): number {
15418                 if(!isWasmInitialized) {
15419                         throw new Error("initializeWasm() must be awaited first!");
15420                 }
15421                 const nativeResponseValue = wasm.RouteHop_clone(orig);
15422                 return nativeResponseValue;
15423         }
15424         // uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
15425         export function RouteHop_hash(o: number): number {
15426                 if(!isWasmInitialized) {
15427                         throw new Error("initializeWasm() must be awaited first!");
15428                 }
15429                 const nativeResponseValue = wasm.RouteHop_hash(o);
15430                 return nativeResponseValue;
15431         }
15432         // bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
15433         export function RouteHop_eq(a: number, b: number): boolean {
15434                 if(!isWasmInitialized) {
15435                         throw new Error("initializeWasm() must be awaited first!");
15436                 }
15437                 const nativeResponseValue = wasm.RouteHop_eq(a, b);
15438                 return nativeResponseValue;
15439         }
15440         // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
15441         export function RouteHop_write(obj: number): Uint8Array {
15442                 if(!isWasmInitialized) {
15443                         throw new Error("initializeWasm() must be awaited first!");
15444                 }
15445                 const nativeResponseValue = wasm.RouteHop_write(obj);
15446                 return decodeArray(nativeResponseValue);
15447         }
15448         // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
15449         export function RouteHop_read(ser: Uint8Array): number {
15450                 if(!isWasmInitialized) {
15451                         throw new Error("initializeWasm() must be awaited first!");
15452                 }
15453                 const nativeResponseValue = wasm.RouteHop_read(encodeArray(ser));
15454                 return nativeResponseValue;
15455         }
15456         // void Route_free(struct LDKRoute this_obj);
15457         export function Route_free(this_obj: number): void {
15458                 if(!isWasmInitialized) {
15459                         throw new Error("initializeWasm() must be awaited first!");
15460                 }
15461                 const nativeResponseValue = wasm.Route_free(this_obj);
15462                 // debug statements here
15463         }
15464         // struct LDKCVec_CVec_RouteHopZZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
15465         export function Route_get_paths(this_ptr: number): number[][] {
15466                 if(!isWasmInitialized) {
15467                         throw new Error("initializeWasm() must be awaited first!");
15468                 }
15469                 const nativeResponseValue = wasm.Route_get_paths(this_ptr);
15470                 return nativeResponseValue;
15471         }
15472         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
15473         export function Route_set_paths(this_ptr: number, val: number[][]): void {
15474                 if(!isWasmInitialized) {
15475                         throw new Error("initializeWasm() must be awaited first!");
15476                 }
15477                 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
15478                 // debug statements here
15479         }
15480         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
15481         export function Route_new(paths_arg: number[][]): number {
15482                 if(!isWasmInitialized) {
15483                         throw new Error("initializeWasm() must be awaited first!");
15484                 }
15485                 const nativeResponseValue = wasm.Route_new(paths_arg);
15486                 return nativeResponseValue;
15487         }
15488         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
15489         export function Route_clone(orig: number): number {
15490                 if(!isWasmInitialized) {
15491                         throw new Error("initializeWasm() must be awaited first!");
15492                 }
15493                 const nativeResponseValue = wasm.Route_clone(orig);
15494                 return nativeResponseValue;
15495         }
15496         // uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
15497         export function Route_hash(o: number): number {
15498                 if(!isWasmInitialized) {
15499                         throw new Error("initializeWasm() must be awaited first!");
15500                 }
15501                 const nativeResponseValue = wasm.Route_hash(o);
15502                 return nativeResponseValue;
15503         }
15504         // bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
15505         export function Route_eq(a: number, b: number): boolean {
15506                 if(!isWasmInitialized) {
15507                         throw new Error("initializeWasm() must be awaited first!");
15508                 }
15509                 const nativeResponseValue = wasm.Route_eq(a, b);
15510                 return nativeResponseValue;
15511         }
15512         // MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
15513         export function Route_get_total_fees(this_arg: number): number {
15514                 if(!isWasmInitialized) {
15515                         throw new Error("initializeWasm() must be awaited first!");
15516                 }
15517                 const nativeResponseValue = wasm.Route_get_total_fees(this_arg);
15518                 return nativeResponseValue;
15519         }
15520         // MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
15521         export function Route_get_total_amount(this_arg: number): number {
15522                 if(!isWasmInitialized) {
15523                         throw new Error("initializeWasm() must be awaited first!");
15524                 }
15525                 const nativeResponseValue = wasm.Route_get_total_amount(this_arg);
15526                 return nativeResponseValue;
15527         }
15528         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
15529         export function Route_write(obj: number): Uint8Array {
15530                 if(!isWasmInitialized) {
15531                         throw new Error("initializeWasm() must be awaited first!");
15532                 }
15533                 const nativeResponseValue = wasm.Route_write(obj);
15534                 return decodeArray(nativeResponseValue);
15535         }
15536         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
15537         export function Route_read(ser: Uint8Array): number {
15538                 if(!isWasmInitialized) {
15539                         throw new Error("initializeWasm() must be awaited first!");
15540                 }
15541                 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
15542                 return nativeResponseValue;
15543         }
15544         // void RouteHint_free(struct LDKRouteHint this_obj);
15545         export function RouteHint_free(this_obj: number): void {
15546                 if(!isWasmInitialized) {
15547                         throw new Error("initializeWasm() must be awaited first!");
15548                 }
15549                 const nativeResponseValue = wasm.RouteHint_free(this_obj);
15550                 // debug statements here
15551         }
15552         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
15553         export function RouteHint_clone(orig: number): number {
15554                 if(!isWasmInitialized) {
15555                         throw new Error("initializeWasm() must be awaited first!");
15556                 }
15557                 const nativeResponseValue = wasm.RouteHint_clone(orig);
15558                 return nativeResponseValue;
15559         }
15560         // uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
15561         export function RouteHint_hash(o: number): number {
15562                 if(!isWasmInitialized) {
15563                         throw new Error("initializeWasm() must be awaited first!");
15564                 }
15565                 const nativeResponseValue = wasm.RouteHint_hash(o);
15566                 return nativeResponseValue;
15567         }
15568         // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
15569         export function RouteHint_eq(a: number, b: number): boolean {
15570                 if(!isWasmInitialized) {
15571                         throw new Error("initializeWasm() must be awaited first!");
15572                 }
15573                 const nativeResponseValue = wasm.RouteHint_eq(a, b);
15574                 return nativeResponseValue;
15575         }
15576         // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
15577         export function RouteHintHop_free(this_obj: number): void {
15578                 if(!isWasmInitialized) {
15579                         throw new Error("initializeWasm() must be awaited first!");
15580                 }
15581                 const nativeResponseValue = wasm.RouteHintHop_free(this_obj);
15582                 // debug statements here
15583         }
15584         // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
15585         export function RouteHintHop_get_src_node_id(this_ptr: number): Uint8Array {
15586                 if(!isWasmInitialized) {
15587                         throw new Error("initializeWasm() must be awaited first!");
15588                 }
15589                 const nativeResponseValue = wasm.RouteHintHop_get_src_node_id(this_ptr);
15590                 return decodeArray(nativeResponseValue);
15591         }
15592         // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
15593         export function RouteHintHop_set_src_node_id(this_ptr: number, val: Uint8Array): void {
15594                 if(!isWasmInitialized) {
15595                         throw new Error("initializeWasm() must be awaited first!");
15596                 }
15597                 const nativeResponseValue = wasm.RouteHintHop_set_src_node_id(this_ptr, encodeArray(val));
15598                 // debug statements here
15599         }
15600         // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
15601         export function RouteHintHop_get_short_channel_id(this_ptr: number): number {
15602                 if(!isWasmInitialized) {
15603                         throw new Error("initializeWasm() must be awaited first!");
15604                 }
15605                 const nativeResponseValue = wasm.RouteHintHop_get_short_channel_id(this_ptr);
15606                 return nativeResponseValue;
15607         }
15608         // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
15609         export function RouteHintHop_set_short_channel_id(this_ptr: number, val: number): void {
15610                 if(!isWasmInitialized) {
15611                         throw new Error("initializeWasm() must be awaited first!");
15612                 }
15613                 const nativeResponseValue = wasm.RouteHintHop_set_short_channel_id(this_ptr, val);
15614                 // debug statements here
15615         }
15616         // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
15617         export function RouteHintHop_get_fees(this_ptr: number): number {
15618                 if(!isWasmInitialized) {
15619                         throw new Error("initializeWasm() must be awaited first!");
15620                 }
15621                 const nativeResponseValue = wasm.RouteHintHop_get_fees(this_ptr);
15622                 return nativeResponseValue;
15623         }
15624         // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
15625         export function RouteHintHop_set_fees(this_ptr: number, val: number): void {
15626                 if(!isWasmInitialized) {
15627                         throw new Error("initializeWasm() must be awaited first!");
15628                 }
15629                 const nativeResponseValue = wasm.RouteHintHop_set_fees(this_ptr, val);
15630                 // debug statements here
15631         }
15632         // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
15633         export function RouteHintHop_get_cltv_expiry_delta(this_ptr: number): number {
15634                 if(!isWasmInitialized) {
15635                         throw new Error("initializeWasm() must be awaited first!");
15636                 }
15637                 const nativeResponseValue = wasm.RouteHintHop_get_cltv_expiry_delta(this_ptr);
15638                 return nativeResponseValue;
15639         }
15640         // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
15641         export function RouteHintHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
15642                 if(!isWasmInitialized) {
15643                         throw new Error("initializeWasm() must be awaited first!");
15644                 }
15645                 const nativeResponseValue = wasm.RouteHintHop_set_cltv_expiry_delta(this_ptr, val);
15646                 // debug statements here
15647         }
15648         // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
15649         export function RouteHintHop_get_htlc_minimum_msat(this_ptr: number): number {
15650                 if(!isWasmInitialized) {
15651                         throw new Error("initializeWasm() must be awaited first!");
15652                 }
15653                 const nativeResponseValue = wasm.RouteHintHop_get_htlc_minimum_msat(this_ptr);
15654                 return nativeResponseValue;
15655         }
15656         // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
15657         export function RouteHintHop_set_htlc_minimum_msat(this_ptr: number, val: number): void {
15658                 if(!isWasmInitialized) {
15659                         throw new Error("initializeWasm() must be awaited first!");
15660                 }
15661                 const nativeResponseValue = wasm.RouteHintHop_set_htlc_minimum_msat(this_ptr, val);
15662                 // debug statements here
15663         }
15664         // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
15665         export function RouteHintHop_get_htlc_maximum_msat(this_ptr: number): number {
15666                 if(!isWasmInitialized) {
15667                         throw new Error("initializeWasm() must be awaited first!");
15668                 }
15669                 const nativeResponseValue = wasm.RouteHintHop_get_htlc_maximum_msat(this_ptr);
15670                 return nativeResponseValue;
15671         }
15672         // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
15673         export function RouteHintHop_set_htlc_maximum_msat(this_ptr: number, val: number): void {
15674                 if(!isWasmInitialized) {
15675                         throw new Error("initializeWasm() must be awaited first!");
15676                 }
15677                 const nativeResponseValue = wasm.RouteHintHop_set_htlc_maximum_msat(this_ptr, val);
15678                 // debug statements here
15679         }
15680         // MUST_USE_RES struct LDKRouteHintHop RouteHintHop_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg);
15681         export function RouteHintHop_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 {
15682                 if(!isWasmInitialized) {
15683                         throw new Error("initializeWasm() must be awaited first!");
15684                 }
15685                 const nativeResponseValue = wasm.RouteHintHop_new(encodeArray(src_node_id_arg), short_channel_id_arg, fees_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg);
15686                 return nativeResponseValue;
15687         }
15688         // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
15689         export function RouteHintHop_clone(orig: number): number {
15690                 if(!isWasmInitialized) {
15691                         throw new Error("initializeWasm() must be awaited first!");
15692                 }
15693                 const nativeResponseValue = wasm.RouteHintHop_clone(orig);
15694                 return nativeResponseValue;
15695         }
15696         // uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
15697         export function RouteHintHop_hash(o: number): number {
15698                 if(!isWasmInitialized) {
15699                         throw new Error("initializeWasm() must be awaited first!");
15700                 }
15701                 const nativeResponseValue = wasm.RouteHintHop_hash(o);
15702                 return nativeResponseValue;
15703         }
15704         // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
15705         export function RouteHintHop_eq(a: number, b: number): boolean {
15706                 if(!isWasmInitialized) {
15707                         throw new Error("initializeWasm() must be awaited first!");
15708                 }
15709                 const nativeResponseValue = wasm.RouteHintHop_eq(a, b);
15710                 return nativeResponseValue;
15711         }
15712         // struct LDKCResult_RouteLightningErrorZ get_keysend_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
15713         export function get_keysend_route(our_node_id: Uint8Array, network: number, payee: Uint8Array, first_hops: number[], last_hops: number[], final_value_msat: number, final_cltv: number, logger: number): number {
15714                 if(!isWasmInitialized) {
15715                         throw new Error("initializeWasm() must be awaited first!");
15716                 }
15717                 const nativeResponseValue = wasm.get_keysend_route(encodeArray(our_node_id), network, encodeArray(payee), first_hops, last_hops, final_value_msat, final_cltv, logger);
15718                 return nativeResponseValue;
15719         }
15720         // 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);
15721         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 {
15722                 if(!isWasmInitialized) {
15723                         throw new Error("initializeWasm() must be awaited first!");
15724                 }
15725                 const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(payee), payee_features, first_hops, last_hops, final_value_msat, final_cltv, logger);
15726                 return nativeResponseValue;
15727         }
15728         // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
15729         export function NetworkGraph_free(this_obj: number): void {
15730                 if(!isWasmInitialized) {
15731                         throw new Error("initializeWasm() must be awaited first!");
15732                 }
15733                 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
15734                 // debug statements here
15735         }
15736         // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
15737         export function NetworkGraph_clone(orig: number): number {
15738                 if(!isWasmInitialized) {
15739                         throw new Error("initializeWasm() must be awaited first!");
15740                 }
15741                 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
15742                 return nativeResponseValue;
15743         }
15744         // void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
15745         export function ReadOnlyNetworkGraph_free(this_obj: number): void {
15746                 if(!isWasmInitialized) {
15747                         throw new Error("initializeWasm() must be awaited first!");
15748                 }
15749                 const nativeResponseValue = wasm.ReadOnlyNetworkGraph_free(this_obj);
15750                 // debug statements here
15751         }
15752         // void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
15753         export function NetworkUpdate_free(this_ptr: number): void {
15754                 if(!isWasmInitialized) {
15755                         throw new Error("initializeWasm() must be awaited first!");
15756                 }
15757                 const nativeResponseValue = wasm.NetworkUpdate_free(this_ptr);
15758                 // debug statements here
15759         }
15760         // struct LDKNetworkUpdate NetworkUpdate_clone(const struct LDKNetworkUpdate *NONNULL_PTR orig);
15761         export function NetworkUpdate_clone(orig: number): number {
15762                 if(!isWasmInitialized) {
15763                         throw new Error("initializeWasm() must be awaited first!");
15764                 }
15765                 const nativeResponseValue = wasm.NetworkUpdate_clone(orig);
15766                 return nativeResponseValue;
15767         }
15768         // struct LDKNetworkUpdate NetworkUpdate_channel_update_message(struct LDKChannelUpdate msg);
15769         export function NetworkUpdate_channel_update_message(msg: number): number {
15770                 if(!isWasmInitialized) {
15771                         throw new Error("initializeWasm() must be awaited first!");
15772                 }
15773                 const nativeResponseValue = wasm.NetworkUpdate_channel_update_message(msg);
15774                 return nativeResponseValue;
15775         }
15776         // struct LDKNetworkUpdate NetworkUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
15777         export function NetworkUpdate_channel_closed(short_channel_id: number, is_permanent: boolean): number {
15778                 if(!isWasmInitialized) {
15779                         throw new Error("initializeWasm() must be awaited first!");
15780                 }
15781                 const nativeResponseValue = wasm.NetworkUpdate_channel_closed(short_channel_id, is_permanent);
15782                 return nativeResponseValue;
15783         }
15784         // struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
15785         export function NetworkUpdate_node_failure(node_id: Uint8Array, is_permanent: boolean): number {
15786                 if(!isWasmInitialized) {
15787                         throw new Error("initializeWasm() must be awaited first!");
15788                 }
15789                 const nativeResponseValue = wasm.NetworkUpdate_node_failure(encodeArray(node_id), is_permanent);
15790                 return nativeResponseValue;
15791         }
15792         // struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
15793         export function NetworkUpdate_write(obj: number): Uint8Array {
15794                 if(!isWasmInitialized) {
15795                         throw new Error("initializeWasm() must be awaited first!");
15796                 }
15797                 const nativeResponseValue = wasm.NetworkUpdate_write(obj);
15798                 return decodeArray(nativeResponseValue);
15799         }
15800         // struct LDKEventHandler NetGraphMsgHandler_as_EventHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
15801         export function NetGraphMsgHandler_as_EventHandler(this_arg: number): number {
15802                 if(!isWasmInitialized) {
15803                         throw new Error("initializeWasm() must be awaited first!");
15804                 }
15805                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_EventHandler(this_arg);
15806                 return nativeResponseValue;
15807         }
15808         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
15809         export function NetGraphMsgHandler_free(this_obj: number): void {
15810                 if(!isWasmInitialized) {
15811                         throw new Error("initializeWasm() must be awaited first!");
15812                 }
15813                 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
15814                 // debug statements here
15815         }
15816         // struct LDKNetworkGraph NetGraphMsgHandler_get_network_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_ptr);
15817         export function NetGraphMsgHandler_get_network_graph(this_ptr: number): number {
15818                 if(!isWasmInitialized) {
15819                         throw new Error("initializeWasm() must be awaited first!");
15820                 }
15821                 const nativeResponseValue = wasm.NetGraphMsgHandler_get_network_graph(this_ptr);
15822                 return nativeResponseValue;
15823         }
15824         // void NetGraphMsgHandler_set_network_graph(struct LDKNetGraphMsgHandler *NONNULL_PTR this_ptr, struct LDKNetworkGraph val);
15825         export function NetGraphMsgHandler_set_network_graph(this_ptr: number, val: number): void {
15826                 if(!isWasmInitialized) {
15827                         throw new Error("initializeWasm() must be awaited first!");
15828                 }
15829                 const nativeResponseValue = wasm.NetGraphMsgHandler_set_network_graph(this_ptr, val);
15830                 // debug statements here
15831         }
15832         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKNetworkGraph network_graph, struct LDKCOption_AccessZ chain_access, struct LDKLogger logger);
15833         export function NetGraphMsgHandler_new(network_graph: number, chain_access: number, logger: number): number {
15834                 if(!isWasmInitialized) {
15835                         throw new Error("initializeWasm() must be awaited first!");
15836                 }
15837                 const nativeResponseValue = wasm.NetGraphMsgHandler_new(network_graph, chain_access, logger);
15838                 return nativeResponseValue;
15839         }
15840         // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKCOption_AccessZ chain_access);
15841         export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
15842                 if(!isWasmInitialized) {
15843                         throw new Error("initializeWasm() must be awaited first!");
15844                 }
15845                 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
15846                 // debug statements here
15847         }
15848         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
15849         export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
15850                 if(!isWasmInitialized) {
15851                         throw new Error("initializeWasm() must be awaited first!");
15852                 }
15853                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
15854                 return nativeResponseValue;
15855         }
15856         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
15857         export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
15858                 if(!isWasmInitialized) {
15859                         throw new Error("initializeWasm() must be awaited first!");
15860                 }
15861                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
15862                 return nativeResponseValue;
15863         }
15864         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
15865         export function DirectionalChannelInfo_free(this_obj: number): void {
15866                 if(!isWasmInitialized) {
15867                         throw new Error("initializeWasm() must be awaited first!");
15868                 }
15869                 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
15870                 // debug statements here
15871         }
15872         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15873         export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
15874                 if(!isWasmInitialized) {
15875                         throw new Error("initializeWasm() must be awaited first!");
15876                 }
15877                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
15878                 return nativeResponseValue;
15879         }
15880         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
15881         export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
15882                 if(!isWasmInitialized) {
15883                         throw new Error("initializeWasm() must be awaited first!");
15884                 }
15885                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
15886                 // debug statements here
15887         }
15888         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15889         export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
15890                 if(!isWasmInitialized) {
15891                         throw new Error("initializeWasm() must be awaited first!");
15892                 }
15893                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
15894                 return nativeResponseValue;
15895         }
15896         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
15897         export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
15898                 if(!isWasmInitialized) {
15899                         throw new Error("initializeWasm() must be awaited first!");
15900                 }
15901                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
15902                 // debug statements here
15903         }
15904         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15905         export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
15906                 if(!isWasmInitialized) {
15907                         throw new Error("initializeWasm() must be awaited first!");
15908                 }
15909                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
15910                 return nativeResponseValue;
15911         }
15912         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
15913         export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
15914                 if(!isWasmInitialized) {
15915                         throw new Error("initializeWasm() must be awaited first!");
15916                 }
15917                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
15918                 // debug statements here
15919         }
15920         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15921         export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
15922                 if(!isWasmInitialized) {
15923                         throw new Error("initializeWasm() must be awaited first!");
15924                 }
15925                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
15926                 return nativeResponseValue;
15927         }
15928         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
15929         export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
15930                 if(!isWasmInitialized) {
15931                         throw new Error("initializeWasm() must be awaited first!");
15932                 }
15933                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
15934                 // debug statements here
15935         }
15936         // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15937         export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
15938                 if(!isWasmInitialized) {
15939                         throw new Error("initializeWasm() must be awaited first!");
15940                 }
15941                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
15942                 return nativeResponseValue;
15943         }
15944         // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
15945         export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
15946                 if(!isWasmInitialized) {
15947                         throw new Error("initializeWasm() must be awaited first!");
15948                 }
15949                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
15950                 // debug statements here
15951         }
15952         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15953         export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
15954                 if(!isWasmInitialized) {
15955                         throw new Error("initializeWasm() must be awaited first!");
15956                 }
15957                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
15958                 return nativeResponseValue;
15959         }
15960         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
15961         export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
15962                 if(!isWasmInitialized) {
15963                         throw new Error("initializeWasm() must be awaited first!");
15964                 }
15965                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
15966                 // debug statements here
15967         }
15968         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15969         export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
15970                 if(!isWasmInitialized) {
15971                         throw new Error("initializeWasm() must be awaited first!");
15972                 }
15973                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
15974                 return nativeResponseValue;
15975         }
15976         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
15977         export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
15978                 if(!isWasmInitialized) {
15979                         throw new Error("initializeWasm() must be awaited first!");
15980                 }
15981                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
15982                 // debug statements here
15983         }
15984         // 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);
15985         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 {
15986                 if(!isWasmInitialized) {
15987                         throw new Error("initializeWasm() must be awaited first!");
15988                 }
15989                 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);
15990                 return nativeResponseValue;
15991         }
15992         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
15993         export function DirectionalChannelInfo_clone(orig: number): number {
15994                 if(!isWasmInitialized) {
15995                         throw new Error("initializeWasm() must be awaited first!");
15996                 }
15997                 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
15998                 return nativeResponseValue;
15999         }
16000         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
16001         export function DirectionalChannelInfo_write(obj: number): Uint8Array {
16002                 if(!isWasmInitialized) {
16003                         throw new Error("initializeWasm() must be awaited first!");
16004                 }
16005                 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
16006                 return decodeArray(nativeResponseValue);
16007         }
16008         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
16009         export function DirectionalChannelInfo_read(ser: Uint8Array): number {
16010                 if(!isWasmInitialized) {
16011                         throw new Error("initializeWasm() must be awaited first!");
16012                 }
16013                 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
16014                 return nativeResponseValue;
16015         }
16016         // void ChannelInfo_free(struct LDKChannelInfo this_obj);
16017         export function ChannelInfo_free(this_obj: number): void {
16018                 if(!isWasmInitialized) {
16019                         throw new Error("initializeWasm() must be awaited first!");
16020                 }
16021                 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
16022                 // debug statements here
16023         }
16024         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16025         export function ChannelInfo_get_features(this_ptr: number): number {
16026                 if(!isWasmInitialized) {
16027                         throw new Error("initializeWasm() must be awaited first!");
16028                 }
16029                 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
16030                 return nativeResponseValue;
16031         }
16032         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
16033         export function ChannelInfo_set_features(this_ptr: number, val: number): void {
16034                 if(!isWasmInitialized) {
16035                         throw new Error("initializeWasm() must be awaited first!");
16036                 }
16037                 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
16038                 // debug statements here
16039         }
16040         // struct LDKPublicKey ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16041         export function ChannelInfo_get_node_one(this_ptr: number): Uint8Array {
16042                 if(!isWasmInitialized) {
16043                         throw new Error("initializeWasm() must be awaited first!");
16044                 }
16045                 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
16046                 return decodeArray(nativeResponseValue);
16047         }
16048         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16049         export function ChannelInfo_set_node_one(this_ptr: number, val: Uint8Array): void {
16050                 if(!isWasmInitialized) {
16051                         throw new Error("initializeWasm() must be awaited first!");
16052                 }
16053                 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, encodeArray(val));
16054                 // debug statements here
16055         }
16056         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16057         export function ChannelInfo_get_one_to_two(this_ptr: number): number {
16058                 if(!isWasmInitialized) {
16059                         throw new Error("initializeWasm() must be awaited first!");
16060                 }
16061                 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
16062                 return nativeResponseValue;
16063         }
16064         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
16065         export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
16066                 if(!isWasmInitialized) {
16067                         throw new Error("initializeWasm() must be awaited first!");
16068                 }
16069                 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
16070                 // debug statements here
16071         }
16072         // struct LDKPublicKey ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16073         export function ChannelInfo_get_node_two(this_ptr: number): Uint8Array {
16074                 if(!isWasmInitialized) {
16075                         throw new Error("initializeWasm() must be awaited first!");
16076                 }
16077                 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
16078                 return decodeArray(nativeResponseValue);
16079         }
16080         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16081         export function ChannelInfo_set_node_two(this_ptr: number, val: Uint8Array): void {
16082                 if(!isWasmInitialized) {
16083                         throw new Error("initializeWasm() must be awaited first!");
16084                 }
16085                 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, encodeArray(val));
16086                 // debug statements here
16087         }
16088         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16089         export function ChannelInfo_get_two_to_one(this_ptr: number): number {
16090                 if(!isWasmInitialized) {
16091                         throw new Error("initializeWasm() must be awaited first!");
16092                 }
16093                 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
16094                 return nativeResponseValue;
16095         }
16096         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
16097         export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
16098                 if(!isWasmInitialized) {
16099                         throw new Error("initializeWasm() must be awaited first!");
16100                 }
16101                 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
16102                 // debug statements here
16103         }
16104         // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16105         export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
16106                 if(!isWasmInitialized) {
16107                         throw new Error("initializeWasm() must be awaited first!");
16108                 }
16109                 const nativeResponseValue = wasm.ChannelInfo_get_capacity_sats(this_ptr);
16110                 return nativeResponseValue;
16111         }
16112         // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
16113         export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
16114                 if(!isWasmInitialized) {
16115                         throw new Error("initializeWasm() must be awaited first!");
16116                 }
16117                 const nativeResponseValue = wasm.ChannelInfo_set_capacity_sats(this_ptr, val);
16118                 // debug statements here
16119         }
16120         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16121         export function ChannelInfo_get_announcement_message(this_ptr: number): number {
16122                 if(!isWasmInitialized) {
16123                         throw new Error("initializeWasm() must be awaited first!");
16124                 }
16125                 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
16126                 return nativeResponseValue;
16127         }
16128         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
16129         export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
16130                 if(!isWasmInitialized) {
16131                         throw new Error("initializeWasm() must be awaited first!");
16132                 }
16133                 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
16134                 // debug statements here
16135         }
16136         // 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);
16137         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 {
16138                 if(!isWasmInitialized) {
16139                         throw new Error("initializeWasm() must be awaited first!");
16140                 }
16141                 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);
16142                 return nativeResponseValue;
16143         }
16144         // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
16145         export function ChannelInfo_clone(orig: number): number {
16146                 if(!isWasmInitialized) {
16147                         throw new Error("initializeWasm() must be awaited first!");
16148                 }
16149                 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
16150                 return nativeResponseValue;
16151         }
16152         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
16153         export function ChannelInfo_write(obj: number): Uint8Array {
16154                 if(!isWasmInitialized) {
16155                         throw new Error("initializeWasm() must be awaited first!");
16156                 }
16157                 const nativeResponseValue = wasm.ChannelInfo_write(obj);
16158                 return decodeArray(nativeResponseValue);
16159         }
16160         // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
16161         export function ChannelInfo_read(ser: Uint8Array): number {
16162                 if(!isWasmInitialized) {
16163                         throw new Error("initializeWasm() must be awaited first!");
16164                 }
16165                 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
16166                 return nativeResponseValue;
16167         }
16168         // void RoutingFees_free(struct LDKRoutingFees this_obj);
16169         export function RoutingFees_free(this_obj: number): void {
16170                 if(!isWasmInitialized) {
16171                         throw new Error("initializeWasm() must be awaited first!");
16172                 }
16173                 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
16174                 // debug statements here
16175         }
16176         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
16177         export function RoutingFees_get_base_msat(this_ptr: number): number {
16178                 if(!isWasmInitialized) {
16179                         throw new Error("initializeWasm() must be awaited first!");
16180                 }
16181                 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
16182                 return nativeResponseValue;
16183         }
16184         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
16185         export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
16186                 if(!isWasmInitialized) {
16187                         throw new Error("initializeWasm() must be awaited first!");
16188                 }
16189                 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
16190                 // debug statements here
16191         }
16192         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
16193         export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
16194                 if(!isWasmInitialized) {
16195                         throw new Error("initializeWasm() must be awaited first!");
16196                 }
16197                 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
16198                 return nativeResponseValue;
16199         }
16200         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
16201         export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
16202                 if(!isWasmInitialized) {
16203                         throw new Error("initializeWasm() must be awaited first!");
16204                 }
16205                 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
16206                 // debug statements here
16207         }
16208         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
16209         export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
16210                 if(!isWasmInitialized) {
16211                         throw new Error("initializeWasm() must be awaited first!");
16212                 }
16213                 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
16214                 return nativeResponseValue;
16215         }
16216         // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
16217         export function RoutingFees_eq(a: number, b: number): boolean {
16218                 if(!isWasmInitialized) {
16219                         throw new Error("initializeWasm() must be awaited first!");
16220                 }
16221                 const nativeResponseValue = wasm.RoutingFees_eq(a, b);
16222                 return nativeResponseValue;
16223         }
16224         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
16225         export function RoutingFees_clone(orig: number): number {
16226                 if(!isWasmInitialized) {
16227                         throw new Error("initializeWasm() must be awaited first!");
16228                 }
16229                 const nativeResponseValue = wasm.RoutingFees_clone(orig);
16230                 return nativeResponseValue;
16231         }
16232         // uint64_t RoutingFees_hash(const struct LDKRoutingFees *NONNULL_PTR o);
16233         export function RoutingFees_hash(o: number): number {
16234                 if(!isWasmInitialized) {
16235                         throw new Error("initializeWasm() must be awaited first!");
16236                 }
16237                 const nativeResponseValue = wasm.RoutingFees_hash(o);
16238                 return nativeResponseValue;
16239         }
16240         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
16241         export function RoutingFees_write(obj: number): Uint8Array {
16242                 if(!isWasmInitialized) {
16243                         throw new Error("initializeWasm() must be awaited first!");
16244                 }
16245                 const nativeResponseValue = wasm.RoutingFees_write(obj);
16246                 return decodeArray(nativeResponseValue);
16247         }
16248         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
16249         export function RoutingFees_read(ser: Uint8Array): number {
16250                 if(!isWasmInitialized) {
16251                         throw new Error("initializeWasm() must be awaited first!");
16252                 }
16253                 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
16254                 return nativeResponseValue;
16255         }
16256         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
16257         export function NodeAnnouncementInfo_free(this_obj: number): void {
16258                 if(!isWasmInitialized) {
16259                         throw new Error("initializeWasm() must be awaited first!");
16260                 }
16261                 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
16262                 // debug statements here
16263         }
16264         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
16265         export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
16266                 if(!isWasmInitialized) {
16267                         throw new Error("initializeWasm() must be awaited first!");
16268                 }
16269                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
16270                 return nativeResponseValue;
16271         }
16272         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
16273         export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
16274                 if(!isWasmInitialized) {
16275                         throw new Error("initializeWasm() must be awaited first!");
16276                 }
16277                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
16278                 // debug statements here
16279         }
16280         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
16281         export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
16282                 if(!isWasmInitialized) {
16283                         throw new Error("initializeWasm() must be awaited first!");
16284                 }
16285                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
16286                 return nativeResponseValue;
16287         }
16288         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
16289         export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
16290                 if(!isWasmInitialized) {
16291                         throw new Error("initializeWasm() must be awaited first!");
16292                 }
16293                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
16294                 // debug statements here
16295         }
16296         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
16297         export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
16298                 if(!isWasmInitialized) {
16299                         throw new Error("initializeWasm() must be awaited first!");
16300                 }
16301                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
16302                 return decodeArray(nativeResponseValue);
16303         }
16304         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
16305         export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
16306                 if(!isWasmInitialized) {
16307                         throw new Error("initializeWasm() must be awaited first!");
16308                 }
16309                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
16310                 // debug statements here
16311         }
16312         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
16313         export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
16314                 if(!isWasmInitialized) {
16315                         throw new Error("initializeWasm() must be awaited first!");
16316                 }
16317                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
16318                 return decodeArray(nativeResponseValue);
16319         }
16320         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16321         export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
16322                 if(!isWasmInitialized) {
16323                         throw new Error("initializeWasm() must be awaited first!");
16324                 }
16325                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
16326                 // debug statements here
16327         }
16328         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
16329         export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
16330                 if(!isWasmInitialized) {
16331                         throw new Error("initializeWasm() must be awaited first!");
16332                 }
16333                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
16334                 // debug statements here
16335         }
16336         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
16337         export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
16338                 if(!isWasmInitialized) {
16339                         throw new Error("initializeWasm() must be awaited first!");
16340                 }
16341                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
16342                 return nativeResponseValue;
16343         }
16344         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
16345         export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
16346                 if(!isWasmInitialized) {
16347                         throw new Error("initializeWasm() must be awaited first!");
16348                 }
16349                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
16350                 // debug statements here
16351         }
16352         // 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);
16353         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 {
16354                 if(!isWasmInitialized) {
16355                         throw new Error("initializeWasm() must be awaited first!");
16356                 }
16357                 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
16358                 return nativeResponseValue;
16359         }
16360         // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
16361         export function NodeAnnouncementInfo_clone(orig: number): number {
16362                 if(!isWasmInitialized) {
16363                         throw new Error("initializeWasm() must be awaited first!");
16364                 }
16365                 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
16366                 return nativeResponseValue;
16367         }
16368         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
16369         export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
16370                 if(!isWasmInitialized) {
16371                         throw new Error("initializeWasm() must be awaited first!");
16372                 }
16373                 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
16374                 return decodeArray(nativeResponseValue);
16375         }
16376         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
16377         export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
16378                 if(!isWasmInitialized) {
16379                         throw new Error("initializeWasm() must be awaited first!");
16380                 }
16381                 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
16382                 return nativeResponseValue;
16383         }
16384         // void NodeInfo_free(struct LDKNodeInfo this_obj);
16385         export function NodeInfo_free(this_obj: number): void {
16386                 if(!isWasmInitialized) {
16387                         throw new Error("initializeWasm() must be awaited first!");
16388                 }
16389                 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
16390                 // debug statements here
16391         }
16392         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
16393         export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
16394                 if(!isWasmInitialized) {
16395                         throw new Error("initializeWasm() must be awaited first!");
16396                 }
16397                 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
16398                 // debug statements here
16399         }
16400         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
16401         export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
16402                 if(!isWasmInitialized) {
16403                         throw new Error("initializeWasm() must be awaited first!");
16404                 }
16405                 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
16406                 return nativeResponseValue;
16407         }
16408         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
16409         export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
16410                 if(!isWasmInitialized) {
16411                         throw new Error("initializeWasm() must be awaited first!");
16412                 }
16413                 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
16414                 // debug statements here
16415         }
16416         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
16417         export function NodeInfo_get_announcement_info(this_ptr: number): number {
16418                 if(!isWasmInitialized) {
16419                         throw new Error("initializeWasm() must be awaited first!");
16420                 }
16421                 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
16422                 return nativeResponseValue;
16423         }
16424         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
16425         export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
16426                 if(!isWasmInitialized) {
16427                         throw new Error("initializeWasm() must be awaited first!");
16428                 }
16429                 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
16430                 // debug statements here
16431         }
16432         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
16433         export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
16434                 if(!isWasmInitialized) {
16435                         throw new Error("initializeWasm() must be awaited first!");
16436                 }
16437                 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
16438                 return nativeResponseValue;
16439         }
16440         // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
16441         export function NodeInfo_clone(orig: number): number {
16442                 if(!isWasmInitialized) {
16443                         throw new Error("initializeWasm() must be awaited first!");
16444                 }
16445                 const nativeResponseValue = wasm.NodeInfo_clone(orig);
16446                 return nativeResponseValue;
16447         }
16448         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
16449         export function NodeInfo_write(obj: number): Uint8Array {
16450                 if(!isWasmInitialized) {
16451                         throw new Error("initializeWasm() must be awaited first!");
16452                 }
16453                 const nativeResponseValue = wasm.NodeInfo_write(obj);
16454                 return decodeArray(nativeResponseValue);
16455         }
16456         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
16457         export function NodeInfo_read(ser: Uint8Array): number {
16458                 if(!isWasmInitialized) {
16459                         throw new Error("initializeWasm() must be awaited first!");
16460                 }
16461                 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
16462                 return nativeResponseValue;
16463         }
16464         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
16465         export function NetworkGraph_write(obj: number): Uint8Array {
16466                 if(!isWasmInitialized) {
16467                         throw new Error("initializeWasm() must be awaited first!");
16468                 }
16469                 const nativeResponseValue = wasm.NetworkGraph_write(obj);
16470                 return decodeArray(nativeResponseValue);
16471         }
16472         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
16473         export function NetworkGraph_read(ser: Uint8Array): number {
16474                 if(!isWasmInitialized) {
16475                         throw new Error("initializeWasm() must be awaited first!");
16476                 }
16477                 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
16478                 return nativeResponseValue;
16479         }
16480         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
16481         export function NetworkGraph_new(genesis_hash: Uint8Array): number {
16482                 if(!isWasmInitialized) {
16483                         throw new Error("initializeWasm() must be awaited first!");
16484                 }
16485                 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
16486                 return nativeResponseValue;
16487         }
16488         // MUST_USE_RES struct LDKReadOnlyNetworkGraph NetworkGraph_read_only(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
16489         export function NetworkGraph_read_only(this_arg: number): number {
16490                 if(!isWasmInitialized) {
16491                         throw new Error("initializeWasm() must be awaited first!");
16492                 }
16493                 const nativeResponseValue = wasm.NetworkGraph_read_only(this_arg);
16494                 return nativeResponseValue;
16495         }
16496         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
16497         export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
16498                 if(!isWasmInitialized) {
16499                         throw new Error("initializeWasm() must be awaited first!");
16500                 }
16501                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
16502                 return nativeResponseValue;
16503         }
16504         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR msg);
16505         export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
16506                 if(!isWasmInitialized) {
16507                         throw new Error("initializeWasm() must be awaited first!");
16508                 }
16509                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
16510                 return nativeResponseValue;
16511         }
16512         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_AccessZ chain_access);
16513         export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
16514                 if(!isWasmInitialized) {
16515                         throw new Error("initializeWasm() must be awaited first!");
16516                 }
16517                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
16518                 return nativeResponseValue;
16519         }
16520         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_from_unsigned_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg, struct LDKCOption_AccessZ chain_access);
16521         export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
16522                 if(!isWasmInitialized) {
16523                         throw new Error("initializeWasm() must be awaited first!");
16524                 }
16525                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
16526                 return nativeResponseValue;
16527         }
16528         // void NetworkGraph_close_channel_from_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
16529         export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
16530                 if(!isWasmInitialized) {
16531                         throw new Error("initializeWasm() must be awaited first!");
16532                 }
16533                 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
16534                 // debug statements here
16535         }
16536         // void NetworkGraph_fail_node(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey _node_id, bool is_permanent);
16537         export function NetworkGraph_fail_node(this_arg: number, _node_id: Uint8Array, is_permanent: boolean): void {
16538                 if(!isWasmInitialized) {
16539                         throw new Error("initializeWasm() must be awaited first!");
16540                 }
16541                 const nativeResponseValue = wasm.NetworkGraph_fail_node(this_arg, encodeArray(_node_id), is_permanent);
16542                 // debug statements here
16543         }
16544         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
16545         export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
16546                 if(!isWasmInitialized) {
16547                         throw new Error("initializeWasm() must be awaited first!");
16548                 }
16549                 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
16550                 return nativeResponseValue;
16551         }
16552         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
16553         export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
16554                 if(!isWasmInitialized) {
16555                         throw new Error("initializeWasm() must be awaited first!");
16556                 }
16557                 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
16558                 return nativeResponseValue;
16559         }
16560         // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
16561         export function FilesystemPersister_free(this_obj: number): void {
16562                 if(!isWasmInitialized) {
16563                         throw new Error("initializeWasm() must be awaited first!");
16564                 }
16565                 const nativeResponseValue = wasm.FilesystemPersister_free(this_obj);
16566                 // debug statements here
16567         }
16568         // MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKStr path_to_channel_data);
16569         export function FilesystemPersister_new(path_to_channel_data: String): number {
16570                 if(!isWasmInitialized) {
16571                         throw new Error("initializeWasm() must be awaited first!");
16572                 }
16573                 const nativeResponseValue = wasm.FilesystemPersister_new(path_to_channel_data);
16574                 return nativeResponseValue;
16575         }
16576         // MUST_USE_RES struct LDKStr FilesystemPersister_get_data_dir(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
16577         export function FilesystemPersister_get_data_dir(this_arg: number): String {
16578                 if(!isWasmInitialized) {
16579                         throw new Error("initializeWasm() must be awaited first!");
16580                 }
16581                 const nativeResponseValue = wasm.FilesystemPersister_get_data_dir(this_arg);
16582                 return nativeResponseValue;
16583         }
16584         // MUST_USE_RES struct LDKCResult_NoneErrorZ FilesystemPersister_persist_manager(struct LDKStr data_dir, const struct LDKChannelManager *NONNULL_PTR manager);
16585         export function FilesystemPersister_persist_manager(data_dir: String, manager: number): number {
16586                 if(!isWasmInitialized) {
16587                         throw new Error("initializeWasm() must be awaited first!");
16588                 }
16589                 const nativeResponseValue = wasm.FilesystemPersister_persist_manager(data_dir, manager);
16590                 return nativeResponseValue;
16591         }
16592         // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ FilesystemPersister_read_channelmonitors(const struct LDKFilesystemPersister *NONNULL_PTR this_arg, struct LDKKeysInterface keys_manager);
16593         export function FilesystemPersister_read_channelmonitors(this_arg: number, keys_manager: number): number {
16594                 if(!isWasmInitialized) {
16595                         throw new Error("initializeWasm() must be awaited first!");
16596                 }
16597                 const nativeResponseValue = wasm.FilesystemPersister_read_channelmonitors(this_arg, keys_manager);
16598                 return nativeResponseValue;
16599         }
16600         // struct LDKPersist FilesystemPersister_as_Persist(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
16601         export function FilesystemPersister_as_Persist(this_arg: number): number {
16602                 if(!isWasmInitialized) {
16603                         throw new Error("initializeWasm() must be awaited first!");
16604                 }
16605                 const nativeResponseValue = wasm.FilesystemPersister_as_Persist(this_arg);
16606                 return nativeResponseValue;
16607         }
16608         // void BackgroundProcessor_free(struct LDKBackgroundProcessor this_obj);
16609         export function BackgroundProcessor_free(this_obj: number): void {
16610                 if(!isWasmInitialized) {
16611                         throw new Error("initializeWasm() must be awaited first!");
16612                 }
16613                 const nativeResponseValue = wasm.BackgroundProcessor_free(this_obj);
16614                 // debug statements here
16615         }
16616         // void ChannelManagerPersister_free(struct LDKChannelManagerPersister this_ptr);
16617         export function ChannelManagerPersister_free(this_ptr: number): void {
16618                 if(!isWasmInitialized) {
16619                         throw new Error("initializeWasm() must be awaited first!");
16620                 }
16621                 const nativeResponseValue = wasm.ChannelManagerPersister_free(this_ptr);
16622                 // debug statements here
16623         }
16624         // MUST_USE_RES struct LDKBackgroundProcessor BackgroundProcessor_start(struct LDKChannelManagerPersister persister, struct LDKEventHandler event_handler, const struct LDKChainMonitor *NONNULL_PTR chain_monitor, const struct LDKChannelManager *NONNULL_PTR channel_manager, struct LDKNetGraphMsgHandler net_graph_msg_handler, const struct LDKPeerManager *NONNULL_PTR peer_manager, struct LDKLogger logger);
16625         export function BackgroundProcessor_start(persister: number, event_handler: number, chain_monitor: number, channel_manager: number, net_graph_msg_handler: number, peer_manager: number, logger: number): number {
16626                 if(!isWasmInitialized) {
16627                         throw new Error("initializeWasm() must be awaited first!");
16628                 }
16629                 const nativeResponseValue = wasm.BackgroundProcessor_start(persister, event_handler, chain_monitor, channel_manager, net_graph_msg_handler, peer_manager, logger);
16630                 return nativeResponseValue;
16631         }
16632         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_join(struct LDKBackgroundProcessor this_arg);
16633         export function BackgroundProcessor_join(this_arg: number): number {
16634                 if(!isWasmInitialized) {
16635                         throw new Error("initializeWasm() must be awaited first!");
16636                 }
16637                 const nativeResponseValue = wasm.BackgroundProcessor_join(this_arg);
16638                 return nativeResponseValue;
16639         }
16640         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg);
16641         export function BackgroundProcessor_stop(this_arg: number): number {
16642                 if(!isWasmInitialized) {
16643                         throw new Error("initializeWasm() must be awaited first!");
16644                 }
16645                 const nativeResponseValue = wasm.BackgroundProcessor_stop(this_arg);
16646                 return nativeResponseValue;
16647         }
16648         // void check_platform(void);
16649         export function check_platform(): void {
16650                 if(!isWasmInitialized) {
16651                         throw new Error("initializeWasm() must be awaited first!");
16652                 }
16653                 const nativeResponseValue = wasm.check_platform();
16654                 // debug statements here
16655         }
16656         // void Invoice_free(struct LDKInvoice this_obj);
16657         export function Invoice_free(this_obj: number): void {
16658                 if(!isWasmInitialized) {
16659                         throw new Error("initializeWasm() must be awaited first!");
16660                 }
16661                 const nativeResponseValue = wasm.Invoice_free(this_obj);
16662                 // debug statements here
16663         }
16664         // bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice *NONNULL_PTR b);
16665         export function Invoice_eq(a: number, b: number): boolean {
16666                 if(!isWasmInitialized) {
16667                         throw new Error("initializeWasm() must be awaited first!");
16668                 }
16669                 const nativeResponseValue = wasm.Invoice_eq(a, b);
16670                 return nativeResponseValue;
16671         }
16672         // struct LDKInvoice Invoice_clone(const struct LDKInvoice *NONNULL_PTR orig);
16673         export function Invoice_clone(orig: number): number {
16674                 if(!isWasmInitialized) {
16675                         throw new Error("initializeWasm() must be awaited first!");
16676                 }
16677                 const nativeResponseValue = wasm.Invoice_clone(orig);
16678                 return nativeResponseValue;
16679         }
16680         // void SignedRawInvoice_free(struct LDKSignedRawInvoice this_obj);
16681         export function SignedRawInvoice_free(this_obj: number): void {
16682                 if(!isWasmInitialized) {
16683                         throw new Error("initializeWasm() must be awaited first!");
16684                 }
16685                 const nativeResponseValue = wasm.SignedRawInvoice_free(this_obj);
16686                 // debug statements here
16687         }
16688         // bool SignedRawInvoice_eq(const struct LDKSignedRawInvoice *NONNULL_PTR a, const struct LDKSignedRawInvoice *NONNULL_PTR b);
16689         export function SignedRawInvoice_eq(a: number, b: number): boolean {
16690                 if(!isWasmInitialized) {
16691                         throw new Error("initializeWasm() must be awaited first!");
16692                 }
16693                 const nativeResponseValue = wasm.SignedRawInvoice_eq(a, b);
16694                 return nativeResponseValue;
16695         }
16696         // struct LDKSignedRawInvoice SignedRawInvoice_clone(const struct LDKSignedRawInvoice *NONNULL_PTR orig);
16697         export function SignedRawInvoice_clone(orig: number): number {
16698                 if(!isWasmInitialized) {
16699                         throw new Error("initializeWasm() must be awaited first!");
16700                 }
16701                 const nativeResponseValue = wasm.SignedRawInvoice_clone(orig);
16702                 return nativeResponseValue;
16703         }
16704         // void RawInvoice_free(struct LDKRawInvoice this_obj);
16705         export function RawInvoice_free(this_obj: number): void {
16706                 if(!isWasmInitialized) {
16707                         throw new Error("initializeWasm() must be awaited first!");
16708                 }
16709                 const nativeResponseValue = wasm.RawInvoice_free(this_obj);
16710                 // debug statements here
16711         }
16712         // struct LDKRawDataPart RawInvoice_get_data(const struct LDKRawInvoice *NONNULL_PTR this_ptr);
16713         export function RawInvoice_get_data(this_ptr: number): number {
16714                 if(!isWasmInitialized) {
16715                         throw new Error("initializeWasm() must be awaited first!");
16716                 }
16717                 const nativeResponseValue = wasm.RawInvoice_get_data(this_ptr);
16718                 return nativeResponseValue;
16719         }
16720         // void RawInvoice_set_data(struct LDKRawInvoice *NONNULL_PTR this_ptr, struct LDKRawDataPart val);
16721         export function RawInvoice_set_data(this_ptr: number, val: number): void {
16722                 if(!isWasmInitialized) {
16723                         throw new Error("initializeWasm() must be awaited first!");
16724                 }
16725                 const nativeResponseValue = wasm.RawInvoice_set_data(this_ptr, val);
16726                 // debug statements here
16727         }
16728         // bool RawInvoice_eq(const struct LDKRawInvoice *NONNULL_PTR a, const struct LDKRawInvoice *NONNULL_PTR b);
16729         export function RawInvoice_eq(a: number, b: number): boolean {
16730                 if(!isWasmInitialized) {
16731                         throw new Error("initializeWasm() must be awaited first!");
16732                 }
16733                 const nativeResponseValue = wasm.RawInvoice_eq(a, b);
16734                 return nativeResponseValue;
16735         }
16736         // struct LDKRawInvoice RawInvoice_clone(const struct LDKRawInvoice *NONNULL_PTR orig);
16737         export function RawInvoice_clone(orig: number): number {
16738                 if(!isWasmInitialized) {
16739                         throw new Error("initializeWasm() must be awaited first!");
16740                 }
16741                 const nativeResponseValue = wasm.RawInvoice_clone(orig);
16742                 return nativeResponseValue;
16743         }
16744         // void RawDataPart_free(struct LDKRawDataPart this_obj);
16745         export function RawDataPart_free(this_obj: number): void {
16746                 if(!isWasmInitialized) {
16747                         throw new Error("initializeWasm() must be awaited first!");
16748                 }
16749                 const nativeResponseValue = wasm.RawDataPart_free(this_obj);
16750                 // debug statements here
16751         }
16752         // struct LDKPositiveTimestamp RawDataPart_get_timestamp(const struct LDKRawDataPart *NONNULL_PTR this_ptr);
16753         export function RawDataPart_get_timestamp(this_ptr: number): number {
16754                 if(!isWasmInitialized) {
16755                         throw new Error("initializeWasm() must be awaited first!");
16756                 }
16757                 const nativeResponseValue = wasm.RawDataPart_get_timestamp(this_ptr);
16758                 return nativeResponseValue;
16759         }
16760         // void RawDataPart_set_timestamp(struct LDKRawDataPart *NONNULL_PTR this_ptr, struct LDKPositiveTimestamp val);
16761         export function RawDataPart_set_timestamp(this_ptr: number, val: number): void {
16762                 if(!isWasmInitialized) {
16763                         throw new Error("initializeWasm() must be awaited first!");
16764                 }
16765                 const nativeResponseValue = wasm.RawDataPart_set_timestamp(this_ptr, val);
16766                 // debug statements here
16767         }
16768         // bool RawDataPart_eq(const struct LDKRawDataPart *NONNULL_PTR a, const struct LDKRawDataPart *NONNULL_PTR b);
16769         export function RawDataPart_eq(a: number, b: number): boolean {
16770                 if(!isWasmInitialized) {
16771                         throw new Error("initializeWasm() must be awaited first!");
16772                 }
16773                 const nativeResponseValue = wasm.RawDataPart_eq(a, b);
16774                 return nativeResponseValue;
16775         }
16776         // struct LDKRawDataPart RawDataPart_clone(const struct LDKRawDataPart *NONNULL_PTR orig);
16777         export function RawDataPart_clone(orig: number): number {
16778                 if(!isWasmInitialized) {
16779                         throw new Error("initializeWasm() must be awaited first!");
16780                 }
16781                 const nativeResponseValue = wasm.RawDataPart_clone(orig);
16782                 return nativeResponseValue;
16783         }
16784         // void PositiveTimestamp_free(struct LDKPositiveTimestamp this_obj);
16785         export function PositiveTimestamp_free(this_obj: number): void {
16786                 if(!isWasmInitialized) {
16787                         throw new Error("initializeWasm() must be awaited first!");
16788                 }
16789                 const nativeResponseValue = wasm.PositiveTimestamp_free(this_obj);
16790                 // debug statements here
16791         }
16792         // bool PositiveTimestamp_eq(const struct LDKPositiveTimestamp *NONNULL_PTR a, const struct LDKPositiveTimestamp *NONNULL_PTR b);
16793         export function PositiveTimestamp_eq(a: number, b: number): boolean {
16794                 if(!isWasmInitialized) {
16795                         throw new Error("initializeWasm() must be awaited first!");
16796                 }
16797                 const nativeResponseValue = wasm.PositiveTimestamp_eq(a, b);
16798                 return nativeResponseValue;
16799         }
16800         // struct LDKPositiveTimestamp PositiveTimestamp_clone(const struct LDKPositiveTimestamp *NONNULL_PTR orig);
16801         export function PositiveTimestamp_clone(orig: number): number {
16802                 if(!isWasmInitialized) {
16803                         throw new Error("initializeWasm() must be awaited first!");
16804                 }
16805                 const nativeResponseValue = wasm.PositiveTimestamp_clone(orig);
16806                 return nativeResponseValue;
16807         }
16808         // enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig);
16809         export function SiPrefix_clone(orig: number): SiPrefix {
16810                 if(!isWasmInitialized) {
16811                         throw new Error("initializeWasm() must be awaited first!");
16812                 }
16813                 const nativeResponseValue = wasm.SiPrefix_clone(orig);
16814                 return nativeResponseValue;
16815         }
16816         // enum LDKSiPrefix SiPrefix_milli(void);
16817         export function SiPrefix_milli(): SiPrefix {
16818                 if(!isWasmInitialized) {
16819                         throw new Error("initializeWasm() must be awaited first!");
16820                 }
16821                 const nativeResponseValue = wasm.SiPrefix_milli();
16822                 return nativeResponseValue;
16823         }
16824         // enum LDKSiPrefix SiPrefix_micro(void);
16825         export function SiPrefix_micro(): SiPrefix {
16826                 if(!isWasmInitialized) {
16827                         throw new Error("initializeWasm() must be awaited first!");
16828                 }
16829                 const nativeResponseValue = wasm.SiPrefix_micro();
16830                 return nativeResponseValue;
16831         }
16832         // enum LDKSiPrefix SiPrefix_nano(void);
16833         export function SiPrefix_nano(): SiPrefix {
16834                 if(!isWasmInitialized) {
16835                         throw new Error("initializeWasm() must be awaited first!");
16836                 }
16837                 const nativeResponseValue = wasm.SiPrefix_nano();
16838                 return nativeResponseValue;
16839         }
16840         // enum LDKSiPrefix SiPrefix_pico(void);
16841         export function SiPrefix_pico(): SiPrefix {
16842                 if(!isWasmInitialized) {
16843                         throw new Error("initializeWasm() must be awaited first!");
16844                 }
16845                 const nativeResponseValue = wasm.SiPrefix_pico();
16846                 return nativeResponseValue;
16847         }
16848         // bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b);
16849         export function SiPrefix_eq(a: number, b: number): boolean {
16850                 if(!isWasmInitialized) {
16851                         throw new Error("initializeWasm() must be awaited first!");
16852                 }
16853                 const nativeResponseValue = wasm.SiPrefix_eq(a, b);
16854                 return nativeResponseValue;
16855         }
16856         // MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR this_arg);
16857         export function SiPrefix_multiplier(this_arg: number): number {
16858                 if(!isWasmInitialized) {
16859                         throw new Error("initializeWasm() must be awaited first!");
16860                 }
16861                 const nativeResponseValue = wasm.SiPrefix_multiplier(this_arg);
16862                 return nativeResponseValue;
16863         }
16864         // enum LDKCurrency Currency_clone(const enum LDKCurrency *NONNULL_PTR orig);
16865         export function Currency_clone(orig: number): Currency {
16866                 if(!isWasmInitialized) {
16867                         throw new Error("initializeWasm() must be awaited first!");
16868                 }
16869                 const nativeResponseValue = wasm.Currency_clone(orig);
16870                 return nativeResponseValue;
16871         }
16872         // enum LDKCurrency Currency_bitcoin(void);
16873         export function Currency_bitcoin(): Currency {
16874                 if(!isWasmInitialized) {
16875                         throw new Error("initializeWasm() must be awaited first!");
16876                 }
16877                 const nativeResponseValue = wasm.Currency_bitcoin();
16878                 return nativeResponseValue;
16879         }
16880         // enum LDKCurrency Currency_bitcoin_testnet(void);
16881         export function Currency_bitcoin_testnet(): Currency {
16882                 if(!isWasmInitialized) {
16883                         throw new Error("initializeWasm() must be awaited first!");
16884                 }
16885                 const nativeResponseValue = wasm.Currency_bitcoin_testnet();
16886                 return nativeResponseValue;
16887         }
16888         // enum LDKCurrency Currency_regtest(void);
16889         export function Currency_regtest(): Currency {
16890                 if(!isWasmInitialized) {
16891                         throw new Error("initializeWasm() must be awaited first!");
16892                 }
16893                 const nativeResponseValue = wasm.Currency_regtest();
16894                 return nativeResponseValue;
16895         }
16896         // enum LDKCurrency Currency_simnet(void);
16897         export function Currency_simnet(): Currency {
16898                 if(!isWasmInitialized) {
16899                         throw new Error("initializeWasm() must be awaited first!");
16900                 }
16901                 const nativeResponseValue = wasm.Currency_simnet();
16902                 return nativeResponseValue;
16903         }
16904         // enum LDKCurrency Currency_signet(void);
16905         export function Currency_signet(): Currency {
16906                 if(!isWasmInitialized) {
16907                         throw new Error("initializeWasm() must be awaited first!");
16908                 }
16909                 const nativeResponseValue = wasm.Currency_signet();
16910                 return nativeResponseValue;
16911         }
16912         // uint64_t Currency_hash(const enum LDKCurrency *NONNULL_PTR o);
16913         export function Currency_hash(o: number): number {
16914                 if(!isWasmInitialized) {
16915                         throw new Error("initializeWasm() must be awaited first!");
16916                 }
16917                 const nativeResponseValue = wasm.Currency_hash(o);
16918                 return nativeResponseValue;
16919         }
16920         // bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b);
16921         export function Currency_eq(a: number, b: number): boolean {
16922                 if(!isWasmInitialized) {
16923                         throw new Error("initializeWasm() must be awaited first!");
16924                 }
16925                 const nativeResponseValue = wasm.Currency_eq(a, b);
16926                 return nativeResponseValue;
16927         }
16928         // void Sha256_free(struct LDKSha256 this_obj);
16929         export function Sha256_free(this_obj: number): void {
16930                 if(!isWasmInitialized) {
16931                         throw new Error("initializeWasm() must be awaited first!");
16932                 }
16933                 const nativeResponseValue = wasm.Sha256_free(this_obj);
16934                 // debug statements here
16935         }
16936         // struct LDKSha256 Sha256_clone(const struct LDKSha256 *NONNULL_PTR orig);
16937         export function Sha256_clone(orig: number): number {
16938                 if(!isWasmInitialized) {
16939                         throw new Error("initializeWasm() must be awaited first!");
16940                 }
16941                 const nativeResponseValue = wasm.Sha256_clone(orig);
16942                 return nativeResponseValue;
16943         }
16944         // uint64_t Sha256_hash(const struct LDKSha256 *NONNULL_PTR o);
16945         export function Sha256_hash(o: number): number {
16946                 if(!isWasmInitialized) {
16947                         throw new Error("initializeWasm() must be awaited first!");
16948                 }
16949                 const nativeResponseValue = wasm.Sha256_hash(o);
16950                 return nativeResponseValue;
16951         }
16952         // bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b);
16953         export function Sha256_eq(a: number, b: number): boolean {
16954                 if(!isWasmInitialized) {
16955                         throw new Error("initializeWasm() must be awaited first!");
16956                 }
16957                 const nativeResponseValue = wasm.Sha256_eq(a, b);
16958                 return nativeResponseValue;
16959         }
16960         // void Description_free(struct LDKDescription this_obj);
16961         export function Description_free(this_obj: number): void {
16962                 if(!isWasmInitialized) {
16963                         throw new Error("initializeWasm() must be awaited first!");
16964                 }
16965                 const nativeResponseValue = wasm.Description_free(this_obj);
16966                 // debug statements here
16967         }
16968         // struct LDKDescription Description_clone(const struct LDKDescription *NONNULL_PTR orig);
16969         export function Description_clone(orig: number): number {
16970                 if(!isWasmInitialized) {
16971                         throw new Error("initializeWasm() must be awaited first!");
16972                 }
16973                 const nativeResponseValue = wasm.Description_clone(orig);
16974                 return nativeResponseValue;
16975         }
16976         // uint64_t Description_hash(const struct LDKDescription *NONNULL_PTR o);
16977         export function Description_hash(o: number): number {
16978                 if(!isWasmInitialized) {
16979                         throw new Error("initializeWasm() must be awaited first!");
16980                 }
16981                 const nativeResponseValue = wasm.Description_hash(o);
16982                 return nativeResponseValue;
16983         }
16984         // bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b);
16985         export function Description_eq(a: number, b: number): boolean {
16986                 if(!isWasmInitialized) {
16987                         throw new Error("initializeWasm() must be awaited first!");
16988                 }
16989                 const nativeResponseValue = wasm.Description_eq(a, b);
16990                 return nativeResponseValue;
16991         }
16992         // void PayeePubKey_free(struct LDKPayeePubKey this_obj);
16993         export function PayeePubKey_free(this_obj: number): void {
16994                 if(!isWasmInitialized) {
16995                         throw new Error("initializeWasm() must be awaited first!");
16996                 }
16997                 const nativeResponseValue = wasm.PayeePubKey_free(this_obj);
16998                 // debug statements here
16999         }
17000         // struct LDKPayeePubKey PayeePubKey_clone(const struct LDKPayeePubKey *NONNULL_PTR orig);
17001         export function PayeePubKey_clone(orig: number): number {
17002                 if(!isWasmInitialized) {
17003                         throw new Error("initializeWasm() must be awaited first!");
17004                 }
17005                 const nativeResponseValue = wasm.PayeePubKey_clone(orig);
17006                 return nativeResponseValue;
17007         }
17008         // uint64_t PayeePubKey_hash(const struct LDKPayeePubKey *NONNULL_PTR o);
17009         export function PayeePubKey_hash(o: number): number {
17010                 if(!isWasmInitialized) {
17011                         throw new Error("initializeWasm() must be awaited first!");
17012                 }
17013                 const nativeResponseValue = wasm.PayeePubKey_hash(o);
17014                 return nativeResponseValue;
17015         }
17016         // bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b);
17017         export function PayeePubKey_eq(a: number, b: number): boolean {
17018                 if(!isWasmInitialized) {
17019                         throw new Error("initializeWasm() must be awaited first!");
17020                 }
17021                 const nativeResponseValue = wasm.PayeePubKey_eq(a, b);
17022                 return nativeResponseValue;
17023         }
17024         // void ExpiryTime_free(struct LDKExpiryTime this_obj);
17025         export function ExpiryTime_free(this_obj: number): void {
17026                 if(!isWasmInitialized) {
17027                         throw new Error("initializeWasm() must be awaited first!");
17028                 }
17029                 const nativeResponseValue = wasm.ExpiryTime_free(this_obj);
17030                 // debug statements here
17031         }
17032         // struct LDKExpiryTime ExpiryTime_clone(const struct LDKExpiryTime *NONNULL_PTR orig);
17033         export function ExpiryTime_clone(orig: number): number {
17034                 if(!isWasmInitialized) {
17035                         throw new Error("initializeWasm() must be awaited first!");
17036                 }
17037                 const nativeResponseValue = wasm.ExpiryTime_clone(orig);
17038                 return nativeResponseValue;
17039         }
17040         // uint64_t ExpiryTime_hash(const struct LDKExpiryTime *NONNULL_PTR o);
17041         export function ExpiryTime_hash(o: number): number {
17042                 if(!isWasmInitialized) {
17043                         throw new Error("initializeWasm() must be awaited first!");
17044                 }
17045                 const nativeResponseValue = wasm.ExpiryTime_hash(o);
17046                 return nativeResponseValue;
17047         }
17048         // bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b);
17049         export function ExpiryTime_eq(a: number, b: number): boolean {
17050                 if(!isWasmInitialized) {
17051                         throw new Error("initializeWasm() must be awaited first!");
17052                 }
17053                 const nativeResponseValue = wasm.ExpiryTime_eq(a, b);
17054                 return nativeResponseValue;
17055         }
17056         // void MinFinalCltvExpiry_free(struct LDKMinFinalCltvExpiry this_obj);
17057         export function MinFinalCltvExpiry_free(this_obj: number): void {
17058                 if(!isWasmInitialized) {
17059                         throw new Error("initializeWasm() must be awaited first!");
17060                 }
17061                 const nativeResponseValue = wasm.MinFinalCltvExpiry_free(this_obj);
17062                 // debug statements here
17063         }
17064         // struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_clone(const struct LDKMinFinalCltvExpiry *NONNULL_PTR orig);
17065         export function MinFinalCltvExpiry_clone(orig: number): number {
17066                 if(!isWasmInitialized) {
17067                         throw new Error("initializeWasm() must be awaited first!");
17068                 }
17069                 const nativeResponseValue = wasm.MinFinalCltvExpiry_clone(orig);
17070                 return nativeResponseValue;
17071         }
17072         // uint64_t MinFinalCltvExpiry_hash(const struct LDKMinFinalCltvExpiry *NONNULL_PTR o);
17073         export function MinFinalCltvExpiry_hash(o: number): number {
17074                 if(!isWasmInitialized) {
17075                         throw new Error("initializeWasm() must be awaited first!");
17076                 }
17077                 const nativeResponseValue = wasm.MinFinalCltvExpiry_hash(o);
17078                 return nativeResponseValue;
17079         }
17080         // bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b);
17081         export function MinFinalCltvExpiry_eq(a: number, b: number): boolean {
17082                 if(!isWasmInitialized) {
17083                         throw new Error("initializeWasm() must be awaited first!");
17084                 }
17085                 const nativeResponseValue = wasm.MinFinalCltvExpiry_eq(a, b);
17086                 return nativeResponseValue;
17087         }
17088         // void Fallback_free(struct LDKFallback this_ptr);
17089         export function Fallback_free(this_ptr: number): void {
17090                 if(!isWasmInitialized) {
17091                         throw new Error("initializeWasm() must be awaited first!");
17092                 }
17093                 const nativeResponseValue = wasm.Fallback_free(this_ptr);
17094                 // debug statements here
17095         }
17096         // struct LDKFallback Fallback_clone(const struct LDKFallback *NONNULL_PTR orig);
17097         export function Fallback_clone(orig: number): number {
17098                 if(!isWasmInitialized) {
17099                         throw new Error("initializeWasm() must be awaited first!");
17100                 }
17101                 const nativeResponseValue = wasm.Fallback_clone(orig);
17102                 return nativeResponseValue;
17103         }
17104         // struct LDKFallback Fallback_seg_wit_program(struct LDKu5 version, struct LDKCVec_u8Z program);
17105         export function Fallback_seg_wit_program(version: number, program: Uint8Array): number {
17106                 if(!isWasmInitialized) {
17107                         throw new Error("initializeWasm() must be awaited first!");
17108                 }
17109                 const nativeResponseValue = wasm.Fallback_seg_wit_program(version, encodeArray(program));
17110                 return nativeResponseValue;
17111         }
17112         // struct LDKFallback Fallback_pub_key_hash(struct LDKTwentyBytes a);
17113         export function Fallback_pub_key_hash(a: Uint8Array): number {
17114                 if(!isWasmInitialized) {
17115                         throw new Error("initializeWasm() must be awaited first!");
17116                 }
17117                 const nativeResponseValue = wasm.Fallback_pub_key_hash(encodeArray(a));
17118                 return nativeResponseValue;
17119         }
17120         // struct LDKFallback Fallback_script_hash(struct LDKTwentyBytes a);
17121         export function Fallback_script_hash(a: Uint8Array): number {
17122                 if(!isWasmInitialized) {
17123                         throw new Error("initializeWasm() must be awaited first!");
17124                 }
17125                 const nativeResponseValue = wasm.Fallback_script_hash(encodeArray(a));
17126                 return nativeResponseValue;
17127         }
17128         // uint64_t Fallback_hash(const struct LDKFallback *NONNULL_PTR o);
17129         export function Fallback_hash(o: number): number {
17130                 if(!isWasmInitialized) {
17131                         throw new Error("initializeWasm() must be awaited first!");
17132                 }
17133                 const nativeResponseValue = wasm.Fallback_hash(o);
17134                 return nativeResponseValue;
17135         }
17136         // bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b);
17137         export function Fallback_eq(a: number, b: number): boolean {
17138                 if(!isWasmInitialized) {
17139                         throw new Error("initializeWasm() must be awaited first!");
17140                 }
17141                 const nativeResponseValue = wasm.Fallback_eq(a, b);
17142                 return nativeResponseValue;
17143         }
17144         // void InvoiceSignature_free(struct LDKInvoiceSignature this_obj);
17145         export function InvoiceSignature_free(this_obj: number): void {
17146                 if(!isWasmInitialized) {
17147                         throw new Error("initializeWasm() must be awaited first!");
17148                 }
17149                 const nativeResponseValue = wasm.InvoiceSignature_free(this_obj);
17150                 // debug statements here
17151         }
17152         // struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignature *NONNULL_PTR orig);
17153         export function InvoiceSignature_clone(orig: number): number {
17154                 if(!isWasmInitialized) {
17155                         throw new Error("initializeWasm() must be awaited first!");
17156                 }
17157                 const nativeResponseValue = wasm.InvoiceSignature_clone(orig);
17158                 return nativeResponseValue;
17159         }
17160         // bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b);
17161         export function InvoiceSignature_eq(a: number, b: number): boolean {
17162                 if(!isWasmInitialized) {
17163                         throw new Error("initializeWasm() must be awaited first!");
17164                 }
17165                 const nativeResponseValue = wasm.InvoiceSignature_eq(a, b);
17166                 return nativeResponseValue;
17167         }
17168         // void PrivateRoute_free(struct LDKPrivateRoute this_obj);
17169         export function PrivateRoute_free(this_obj: number): void {
17170                 if(!isWasmInitialized) {
17171                         throw new Error("initializeWasm() must be awaited first!");
17172                 }
17173                 const nativeResponseValue = wasm.PrivateRoute_free(this_obj);
17174                 // debug statements here
17175         }
17176         // struct LDKPrivateRoute PrivateRoute_clone(const struct LDKPrivateRoute *NONNULL_PTR orig);
17177         export function PrivateRoute_clone(orig: number): number {
17178                 if(!isWasmInitialized) {
17179                         throw new Error("initializeWasm() must be awaited first!");
17180                 }
17181                 const nativeResponseValue = wasm.PrivateRoute_clone(orig);
17182                 return nativeResponseValue;
17183         }
17184         // uint64_t PrivateRoute_hash(const struct LDKPrivateRoute *NONNULL_PTR o);
17185         export function PrivateRoute_hash(o: number): number {
17186                 if(!isWasmInitialized) {
17187                         throw new Error("initializeWasm() must be awaited first!");
17188                 }
17189                 const nativeResponseValue = wasm.PrivateRoute_hash(o);
17190                 return nativeResponseValue;
17191         }
17192         // bool PrivateRoute_eq(const struct LDKPrivateRoute *NONNULL_PTR a, const struct LDKPrivateRoute *NONNULL_PTR b);
17193         export function PrivateRoute_eq(a: number, b: number): boolean {
17194                 if(!isWasmInitialized) {
17195                         throw new Error("initializeWasm() must be awaited first!");
17196                 }
17197                 const nativeResponseValue = wasm.PrivateRoute_eq(a, b);
17198                 return nativeResponseValue;
17199         }
17200         // MUST_USE_RES struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ SignedRawInvoice_into_parts(struct LDKSignedRawInvoice this_arg);
17201         export function SignedRawInvoice_into_parts(this_arg: number): number {
17202                 if(!isWasmInitialized) {
17203                         throw new Error("initializeWasm() must be awaited first!");
17204                 }
17205                 const nativeResponseValue = wasm.SignedRawInvoice_into_parts(this_arg);
17206                 return nativeResponseValue;
17207         }
17208         // MUST_USE_RES struct LDKRawInvoice SignedRawInvoice_raw_invoice(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
17209         export function SignedRawInvoice_raw_invoice(this_arg: number): number {
17210                 if(!isWasmInitialized) {
17211                         throw new Error("initializeWasm() must be awaited first!");
17212                 }
17213                 const nativeResponseValue = wasm.SignedRawInvoice_raw_invoice(this_arg);
17214                 return nativeResponseValue;
17215         }
17216         // MUST_USE_RES const uint8_t (*SignedRawInvoice_hash(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg))[32];
17217         export function SignedRawInvoice_hash(this_arg: number): Uint8Array {
17218                 if(!isWasmInitialized) {
17219                         throw new Error("initializeWasm() must be awaited first!");
17220                 }
17221                 const nativeResponseValue = wasm.SignedRawInvoice_hash(this_arg);
17222                 return decodeArray(nativeResponseValue);
17223         }
17224         // MUST_USE_RES struct LDKInvoiceSignature SignedRawInvoice_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
17225         export function SignedRawInvoice_signature(this_arg: number): number {
17226                 if(!isWasmInitialized) {
17227                         throw new Error("initializeWasm() must be awaited first!");
17228                 }
17229                 const nativeResponseValue = wasm.SignedRawInvoice_signature(this_arg);
17230                 return nativeResponseValue;
17231         }
17232         // MUST_USE_RES struct LDKCResult_PayeePubKeyErrorZ SignedRawInvoice_recover_payee_pub_key(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
17233         export function SignedRawInvoice_recover_payee_pub_key(this_arg: number): number {
17234                 if(!isWasmInitialized) {
17235                         throw new Error("initializeWasm() must be awaited first!");
17236                 }
17237                 const nativeResponseValue = wasm.SignedRawInvoice_recover_payee_pub_key(this_arg);
17238                 return nativeResponseValue;
17239         }
17240         // MUST_USE_RES bool SignedRawInvoice_check_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
17241         export function SignedRawInvoice_check_signature(this_arg: number): boolean {
17242                 if(!isWasmInitialized) {
17243                         throw new Error("initializeWasm() must be awaited first!");
17244                 }
17245                 const nativeResponseValue = wasm.SignedRawInvoice_check_signature(this_arg);
17246                 return nativeResponseValue;
17247         }
17248         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17249         export function RawInvoice_hash(this_arg: number): Uint8Array {
17250                 if(!isWasmInitialized) {
17251                         throw new Error("initializeWasm() must be awaited first!");
17252                 }
17253                 const nativeResponseValue = wasm.RawInvoice_hash(this_arg);
17254                 return decodeArray(nativeResponseValue);
17255         }
17256         // MUST_USE_RES struct LDKSha256 RawInvoice_payment_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17257         export function RawInvoice_payment_hash(this_arg: number): number {
17258                 if(!isWasmInitialized) {
17259                         throw new Error("initializeWasm() must be awaited first!");
17260                 }
17261                 const nativeResponseValue = wasm.RawInvoice_payment_hash(this_arg);
17262                 return nativeResponseValue;
17263         }
17264         // MUST_USE_RES struct LDKDescription RawInvoice_description(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17265         export function RawInvoice_description(this_arg: number): number {
17266                 if(!isWasmInitialized) {
17267                         throw new Error("initializeWasm() must be awaited first!");
17268                 }
17269                 const nativeResponseValue = wasm.RawInvoice_description(this_arg);
17270                 return nativeResponseValue;
17271         }
17272         // MUST_USE_RES struct LDKPayeePubKey RawInvoice_payee_pub_key(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17273         export function RawInvoice_payee_pub_key(this_arg: number): number {
17274                 if(!isWasmInitialized) {
17275                         throw new Error("initializeWasm() must be awaited first!");
17276                 }
17277                 const nativeResponseValue = wasm.RawInvoice_payee_pub_key(this_arg);
17278                 return nativeResponseValue;
17279         }
17280         // MUST_USE_RES struct LDKSha256 RawInvoice_description_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17281         export function RawInvoice_description_hash(this_arg: number): number {
17282                 if(!isWasmInitialized) {
17283                         throw new Error("initializeWasm() must be awaited first!");
17284                 }
17285                 const nativeResponseValue = wasm.RawInvoice_description_hash(this_arg);
17286                 return nativeResponseValue;
17287         }
17288         // MUST_USE_RES struct LDKExpiryTime RawInvoice_expiry_time(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17289         export function RawInvoice_expiry_time(this_arg: number): number {
17290                 if(!isWasmInitialized) {
17291                         throw new Error("initializeWasm() must be awaited first!");
17292                 }
17293                 const nativeResponseValue = wasm.RawInvoice_expiry_time(this_arg);
17294                 return nativeResponseValue;
17295         }
17296         // MUST_USE_RES struct LDKMinFinalCltvExpiry RawInvoice_min_final_cltv_expiry(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17297         export function RawInvoice_min_final_cltv_expiry(this_arg: number): number {
17298                 if(!isWasmInitialized) {
17299                         throw new Error("initializeWasm() must be awaited first!");
17300                 }
17301                 const nativeResponseValue = wasm.RawInvoice_min_final_cltv_expiry(this_arg);
17302                 return nativeResponseValue;
17303         }
17304         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_payment_secret(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17305         export function RawInvoice_payment_secret(this_arg: number): Uint8Array {
17306                 if(!isWasmInitialized) {
17307                         throw new Error("initializeWasm() must be awaited first!");
17308                 }
17309                 const nativeResponseValue = wasm.RawInvoice_payment_secret(this_arg);
17310                 return decodeArray(nativeResponseValue);
17311         }
17312         // MUST_USE_RES struct LDKInvoiceFeatures RawInvoice_features(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17313         export function RawInvoice_features(this_arg: number): number {
17314                 if(!isWasmInitialized) {
17315                         throw new Error("initializeWasm() must be awaited first!");
17316                 }
17317                 const nativeResponseValue = wasm.RawInvoice_features(this_arg);
17318                 return nativeResponseValue;
17319         }
17320         // MUST_USE_RES struct LDKCVec_PrivateRouteZ RawInvoice_private_routes(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17321         export function RawInvoice_private_routes(this_arg: number): number[] {
17322                 if(!isWasmInitialized) {
17323                         throw new Error("initializeWasm() must be awaited first!");
17324                 }
17325                 const nativeResponseValue = wasm.RawInvoice_private_routes(this_arg);
17326                 return nativeResponseValue;
17327         }
17328         // MUST_USE_RES struct LDKCOption_u64Z RawInvoice_amount_pico_btc(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17329         export function RawInvoice_amount_pico_btc(this_arg: number): number {
17330                 if(!isWasmInitialized) {
17331                         throw new Error("initializeWasm() must be awaited first!");
17332                 }
17333                 const nativeResponseValue = wasm.RawInvoice_amount_pico_btc(this_arg);
17334                 return nativeResponseValue;
17335         }
17336         // MUST_USE_RES enum LDKCurrency RawInvoice_currency(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17337         export function RawInvoice_currency(this_arg: number): Currency {
17338                 if(!isWasmInitialized) {
17339                         throw new Error("initializeWasm() must be awaited first!");
17340                 }
17341                 const nativeResponseValue = wasm.RawInvoice_currency(this_arg);
17342                 return nativeResponseValue;
17343         }
17344         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_unix_timestamp(uint64_t unix_seconds);
17345         export function PositiveTimestamp_from_unix_timestamp(unix_seconds: number): number {
17346                 if(!isWasmInitialized) {
17347                         throw new Error("initializeWasm() must be awaited first!");
17348                 }
17349                 const nativeResponseValue = wasm.PositiveTimestamp_from_unix_timestamp(unix_seconds);
17350                 return nativeResponseValue;
17351         }
17352         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_system_time(uint64_t time);
17353         export function PositiveTimestamp_from_system_time(time: number): number {
17354                 if(!isWasmInitialized) {
17355                         throw new Error("initializeWasm() must be awaited first!");
17356                 }
17357                 const nativeResponseValue = wasm.PositiveTimestamp_from_system_time(time);
17358                 return nativeResponseValue;
17359         }
17360         // MUST_USE_RES uint64_t PositiveTimestamp_as_unix_timestamp(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
17361         export function PositiveTimestamp_as_unix_timestamp(this_arg: number): number {
17362                 if(!isWasmInitialized) {
17363                         throw new Error("initializeWasm() must be awaited first!");
17364                 }
17365                 const nativeResponseValue = wasm.PositiveTimestamp_as_unix_timestamp(this_arg);
17366                 return nativeResponseValue;
17367         }
17368         // MUST_USE_RES uint64_t PositiveTimestamp_as_time(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
17369         export function PositiveTimestamp_as_time(this_arg: number): number {
17370                 if(!isWasmInitialized) {
17371                         throw new Error("initializeWasm() must be awaited first!");
17372                 }
17373                 const nativeResponseValue = wasm.PositiveTimestamp_as_time(this_arg);
17374                 return nativeResponseValue;
17375         }
17376         // MUST_USE_RES struct LDKSignedRawInvoice Invoice_into_signed_raw(struct LDKInvoice this_arg);
17377         export function Invoice_into_signed_raw(this_arg: number): number {
17378                 if(!isWasmInitialized) {
17379                         throw new Error("initializeWasm() must be awaited first!");
17380                 }
17381                 const nativeResponseValue = wasm.Invoice_into_signed_raw(this_arg);
17382                 return nativeResponseValue;
17383         }
17384         // MUST_USE_RES struct LDKCResult_NoneSemanticErrorZ Invoice_check_signature(const struct LDKInvoice *NONNULL_PTR this_arg);
17385         export function Invoice_check_signature(this_arg: number): number {
17386                 if(!isWasmInitialized) {
17387                         throw new Error("initializeWasm() must be awaited first!");
17388                 }
17389                 const nativeResponseValue = wasm.Invoice_check_signature(this_arg);
17390                 return nativeResponseValue;
17391         }
17392         // MUST_USE_RES struct LDKCResult_InvoiceSemanticErrorZ Invoice_from_signed(struct LDKSignedRawInvoice signed_invoice);
17393         export function Invoice_from_signed(signed_invoice: number): number {
17394                 if(!isWasmInitialized) {
17395                         throw new Error("initializeWasm() must be awaited first!");
17396                 }
17397                 const nativeResponseValue = wasm.Invoice_from_signed(signed_invoice);
17398                 return nativeResponseValue;
17399         }
17400         // MUST_USE_RES uint64_t Invoice_timestamp(const struct LDKInvoice *NONNULL_PTR this_arg);
17401         export function Invoice_timestamp(this_arg: number): number {
17402                 if(!isWasmInitialized) {
17403                         throw new Error("initializeWasm() must be awaited first!");
17404                 }
17405                 const nativeResponseValue = wasm.Invoice_timestamp(this_arg);
17406                 return nativeResponseValue;
17407         }
17408         // MUST_USE_RES const uint8_t (*Invoice_payment_hash(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
17409         export function Invoice_payment_hash(this_arg: number): Uint8Array {
17410                 if(!isWasmInitialized) {
17411                         throw new Error("initializeWasm() must be awaited first!");
17412                 }
17413                 const nativeResponseValue = wasm.Invoice_payment_hash(this_arg);
17414                 return decodeArray(nativeResponseValue);
17415         }
17416         // MUST_USE_RES struct LDKPublicKey Invoice_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
17417         export function Invoice_payee_pub_key(this_arg: number): Uint8Array {
17418                 if(!isWasmInitialized) {
17419                         throw new Error("initializeWasm() must be awaited first!");
17420                 }
17421                 const nativeResponseValue = wasm.Invoice_payee_pub_key(this_arg);
17422                 return decodeArray(nativeResponseValue);
17423         }
17424         // MUST_USE_RES struct LDKThirtyTwoBytes Invoice_payment_secret(const struct LDKInvoice *NONNULL_PTR this_arg);
17425         export function Invoice_payment_secret(this_arg: number): Uint8Array {
17426                 if(!isWasmInitialized) {
17427                         throw new Error("initializeWasm() must be awaited first!");
17428                 }
17429                 const nativeResponseValue = wasm.Invoice_payment_secret(this_arg);
17430                 return decodeArray(nativeResponseValue);
17431         }
17432         // MUST_USE_RES struct LDKInvoiceFeatures Invoice_features(const struct LDKInvoice *NONNULL_PTR this_arg);
17433         export function Invoice_features(this_arg: number): number {
17434                 if(!isWasmInitialized) {
17435                         throw new Error("initializeWasm() must be awaited first!");
17436                 }
17437                 const nativeResponseValue = wasm.Invoice_features(this_arg);
17438                 return nativeResponseValue;
17439         }
17440         // MUST_USE_RES struct LDKPublicKey Invoice_recover_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
17441         export function Invoice_recover_payee_pub_key(this_arg: number): Uint8Array {
17442                 if(!isWasmInitialized) {
17443                         throw new Error("initializeWasm() must be awaited first!");
17444                 }
17445                 const nativeResponseValue = wasm.Invoice_recover_payee_pub_key(this_arg);
17446                 return decodeArray(nativeResponseValue);
17447         }
17448         // MUST_USE_RES uint64_t Invoice_expiry_time(const struct LDKInvoice *NONNULL_PTR this_arg);
17449         export function Invoice_expiry_time(this_arg: number): number {
17450                 if(!isWasmInitialized) {
17451                         throw new Error("initializeWasm() must be awaited first!");
17452                 }
17453                 const nativeResponseValue = wasm.Invoice_expiry_time(this_arg);
17454                 return nativeResponseValue;
17455         }
17456         // MUST_USE_RES uint64_t Invoice_min_final_cltv_expiry(const struct LDKInvoice *NONNULL_PTR this_arg);
17457         export function Invoice_min_final_cltv_expiry(this_arg: number): number {
17458                 if(!isWasmInitialized) {
17459                         throw new Error("initializeWasm() must be awaited first!");
17460                 }
17461                 const nativeResponseValue = wasm.Invoice_min_final_cltv_expiry(this_arg);
17462                 return nativeResponseValue;
17463         }
17464         // MUST_USE_RES struct LDKCVec_PrivateRouteZ Invoice_private_routes(const struct LDKInvoice *NONNULL_PTR this_arg);
17465         export function Invoice_private_routes(this_arg: number): number[] {
17466                 if(!isWasmInitialized) {
17467                         throw new Error("initializeWasm() must be awaited first!");
17468                 }
17469                 const nativeResponseValue = wasm.Invoice_private_routes(this_arg);
17470                 return nativeResponseValue;
17471         }
17472         // MUST_USE_RES struct LDKCVec_RouteHintZ Invoice_route_hints(const struct LDKInvoice *NONNULL_PTR this_arg);
17473         export function Invoice_route_hints(this_arg: number): number[] {
17474                 if(!isWasmInitialized) {
17475                         throw new Error("initializeWasm() must be awaited first!");
17476                 }
17477                 const nativeResponseValue = wasm.Invoice_route_hints(this_arg);
17478                 return nativeResponseValue;
17479         }
17480         // MUST_USE_RES enum LDKCurrency Invoice_currency(const struct LDKInvoice *NONNULL_PTR this_arg);
17481         export function Invoice_currency(this_arg: number): Currency {
17482                 if(!isWasmInitialized) {
17483                         throw new Error("initializeWasm() must be awaited first!");
17484                 }
17485                 const nativeResponseValue = wasm.Invoice_currency(this_arg);
17486                 return nativeResponseValue;
17487         }
17488         // MUST_USE_RES struct LDKCOption_u64Z Invoice_amount_pico_btc(const struct LDKInvoice *NONNULL_PTR this_arg);
17489         export function Invoice_amount_pico_btc(this_arg: number): number {
17490                 if(!isWasmInitialized) {
17491                         throw new Error("initializeWasm() must be awaited first!");
17492                 }
17493                 const nativeResponseValue = wasm.Invoice_amount_pico_btc(this_arg);
17494                 return nativeResponseValue;
17495         }
17496         // MUST_USE_RES struct LDKCResult_DescriptionCreationErrorZ Description_new(struct LDKStr description);
17497         export function Description_new(description: String): number {
17498                 if(!isWasmInitialized) {
17499                         throw new Error("initializeWasm() must be awaited first!");
17500                 }
17501                 const nativeResponseValue = wasm.Description_new(description);
17502                 return nativeResponseValue;
17503         }
17504         // MUST_USE_RES struct LDKStr Description_into_inner(struct LDKDescription this_arg);
17505         export function Description_into_inner(this_arg: number): String {
17506                 if(!isWasmInitialized) {
17507                         throw new Error("initializeWasm() must be awaited first!");
17508                 }
17509                 const nativeResponseValue = wasm.Description_into_inner(this_arg);
17510                 return nativeResponseValue;
17511         }
17512         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_seconds(uint64_t seconds);
17513         export function ExpiryTime_from_seconds(seconds: number): number {
17514                 if(!isWasmInitialized) {
17515                         throw new Error("initializeWasm() must be awaited first!");
17516                 }
17517                 const nativeResponseValue = wasm.ExpiryTime_from_seconds(seconds);
17518                 return nativeResponseValue;
17519         }
17520         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_duration(uint64_t duration);
17521         export function ExpiryTime_from_duration(duration: number): number {
17522                 if(!isWasmInitialized) {
17523                         throw new Error("initializeWasm() must be awaited first!");
17524                 }
17525                 const nativeResponseValue = wasm.ExpiryTime_from_duration(duration);
17526                 return nativeResponseValue;
17527         }
17528         // MUST_USE_RES uint64_t ExpiryTime_as_seconds(const struct LDKExpiryTime *NONNULL_PTR this_arg);
17529         export function ExpiryTime_as_seconds(this_arg: number): number {
17530                 if(!isWasmInitialized) {
17531                         throw new Error("initializeWasm() must be awaited first!");
17532                 }
17533                 const nativeResponseValue = wasm.ExpiryTime_as_seconds(this_arg);
17534                 return nativeResponseValue;
17535         }
17536         // MUST_USE_RES uint64_t ExpiryTime_as_duration(const struct LDKExpiryTime *NONNULL_PTR this_arg);
17537         export function ExpiryTime_as_duration(this_arg: number): number {
17538                 if(!isWasmInitialized) {
17539                         throw new Error("initializeWasm() must be awaited first!");
17540                 }
17541                 const nativeResponseValue = wasm.ExpiryTime_as_duration(this_arg);
17542                 return nativeResponseValue;
17543         }
17544         // MUST_USE_RES struct LDKCResult_PrivateRouteCreationErrorZ PrivateRoute_new(struct LDKRouteHint hops);
17545         export function PrivateRoute_new(hops: number): number {
17546                 if(!isWasmInitialized) {
17547                         throw new Error("initializeWasm() must be awaited first!");
17548                 }
17549                 const nativeResponseValue = wasm.PrivateRoute_new(hops);
17550                 return nativeResponseValue;
17551         }
17552         // MUST_USE_RES struct LDKRouteHint PrivateRoute_into_inner(struct LDKPrivateRoute this_arg);
17553         export function PrivateRoute_into_inner(this_arg: number): number {
17554                 if(!isWasmInitialized) {
17555                         throw new Error("initializeWasm() must be awaited first!");
17556                 }
17557                 const nativeResponseValue = wasm.PrivateRoute_into_inner(this_arg);
17558                 return nativeResponseValue;
17559         }
17560         // enum LDKCreationError CreationError_clone(const enum LDKCreationError *NONNULL_PTR orig);
17561         export function CreationError_clone(orig: number): CreationError {
17562                 if(!isWasmInitialized) {
17563                         throw new Error("initializeWasm() must be awaited first!");
17564                 }
17565                 const nativeResponseValue = wasm.CreationError_clone(orig);
17566                 return nativeResponseValue;
17567         }
17568         // enum LDKCreationError CreationError_description_too_long(void);
17569         export function CreationError_description_too_long(): CreationError {
17570                 if(!isWasmInitialized) {
17571                         throw new Error("initializeWasm() must be awaited first!");
17572                 }
17573                 const nativeResponseValue = wasm.CreationError_description_too_long();
17574                 return nativeResponseValue;
17575         }
17576         // enum LDKCreationError CreationError_route_too_long(void);
17577         export function CreationError_route_too_long(): CreationError {
17578                 if(!isWasmInitialized) {
17579                         throw new Error("initializeWasm() must be awaited first!");
17580                 }
17581                 const nativeResponseValue = wasm.CreationError_route_too_long();
17582                 return nativeResponseValue;
17583         }
17584         // enum LDKCreationError CreationError_timestamp_out_of_bounds(void);
17585         export function CreationError_timestamp_out_of_bounds(): CreationError {
17586                 if(!isWasmInitialized) {
17587                         throw new Error("initializeWasm() must be awaited first!");
17588                 }
17589                 const nativeResponseValue = wasm.CreationError_timestamp_out_of_bounds();
17590                 return nativeResponseValue;
17591         }
17592         // enum LDKCreationError CreationError_expiry_time_out_of_bounds(void);
17593         export function CreationError_expiry_time_out_of_bounds(): CreationError {
17594                 if(!isWasmInitialized) {
17595                         throw new Error("initializeWasm() must be awaited first!");
17596                 }
17597                 const nativeResponseValue = wasm.CreationError_expiry_time_out_of_bounds();
17598                 return nativeResponseValue;
17599         }
17600         // bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b);
17601         export function CreationError_eq(a: number, b: number): boolean {
17602                 if(!isWasmInitialized) {
17603                         throw new Error("initializeWasm() must be awaited first!");
17604                 }
17605                 const nativeResponseValue = wasm.CreationError_eq(a, b);
17606                 return nativeResponseValue;
17607         }
17608         // struct LDKStr CreationError_to_str(const enum LDKCreationError *NONNULL_PTR o);
17609         export function CreationError_to_str(o: number): String {
17610                 if(!isWasmInitialized) {
17611                         throw new Error("initializeWasm() must be awaited first!");
17612                 }
17613                 const nativeResponseValue = wasm.CreationError_to_str(o);
17614                 return nativeResponseValue;
17615         }
17616         // enum LDKSemanticError SemanticError_clone(const enum LDKSemanticError *NONNULL_PTR orig);
17617         export function SemanticError_clone(orig: number): SemanticError {
17618                 if(!isWasmInitialized) {
17619                         throw new Error("initializeWasm() must be awaited first!");
17620                 }
17621                 const nativeResponseValue = wasm.SemanticError_clone(orig);
17622                 return nativeResponseValue;
17623         }
17624         // enum LDKSemanticError SemanticError_no_payment_hash(void);
17625         export function SemanticError_no_payment_hash(): SemanticError {
17626                 if(!isWasmInitialized) {
17627                         throw new Error("initializeWasm() must be awaited first!");
17628                 }
17629                 const nativeResponseValue = wasm.SemanticError_no_payment_hash();
17630                 return nativeResponseValue;
17631         }
17632         // enum LDKSemanticError SemanticError_multiple_payment_hashes(void);
17633         export function SemanticError_multiple_payment_hashes(): SemanticError {
17634                 if(!isWasmInitialized) {
17635                         throw new Error("initializeWasm() must be awaited first!");
17636                 }
17637                 const nativeResponseValue = wasm.SemanticError_multiple_payment_hashes();
17638                 return nativeResponseValue;
17639         }
17640         // enum LDKSemanticError SemanticError_no_description(void);
17641         export function SemanticError_no_description(): SemanticError {
17642                 if(!isWasmInitialized) {
17643                         throw new Error("initializeWasm() must be awaited first!");
17644                 }
17645                 const nativeResponseValue = wasm.SemanticError_no_description();
17646                 return nativeResponseValue;
17647         }
17648         // enum LDKSemanticError SemanticError_multiple_descriptions(void);
17649         export function SemanticError_multiple_descriptions(): SemanticError {
17650                 if(!isWasmInitialized) {
17651                         throw new Error("initializeWasm() must be awaited first!");
17652                 }
17653                 const nativeResponseValue = wasm.SemanticError_multiple_descriptions();
17654                 return nativeResponseValue;
17655         }
17656         // enum LDKSemanticError SemanticError_no_payment_secret(void);
17657         export function SemanticError_no_payment_secret(): SemanticError {
17658                 if(!isWasmInitialized) {
17659                         throw new Error("initializeWasm() must be awaited first!");
17660                 }
17661                 const nativeResponseValue = wasm.SemanticError_no_payment_secret();
17662                 return nativeResponseValue;
17663         }
17664         // enum LDKSemanticError SemanticError_multiple_payment_secrets(void);
17665         export function SemanticError_multiple_payment_secrets(): SemanticError {
17666                 if(!isWasmInitialized) {
17667                         throw new Error("initializeWasm() must be awaited first!");
17668                 }
17669                 const nativeResponseValue = wasm.SemanticError_multiple_payment_secrets();
17670                 return nativeResponseValue;
17671         }
17672         // enum LDKSemanticError SemanticError_invalid_features(void);
17673         export function SemanticError_invalid_features(): SemanticError {
17674                 if(!isWasmInitialized) {
17675                         throw new Error("initializeWasm() must be awaited first!");
17676                 }
17677                 const nativeResponseValue = wasm.SemanticError_invalid_features();
17678                 return nativeResponseValue;
17679         }
17680         // enum LDKSemanticError SemanticError_invalid_recovery_id(void);
17681         export function SemanticError_invalid_recovery_id(): SemanticError {
17682                 if(!isWasmInitialized) {
17683                         throw new Error("initializeWasm() must be awaited first!");
17684                 }
17685                 const nativeResponseValue = wasm.SemanticError_invalid_recovery_id();
17686                 return nativeResponseValue;
17687         }
17688         // enum LDKSemanticError SemanticError_invalid_signature(void);
17689         export function SemanticError_invalid_signature(): SemanticError {
17690                 if(!isWasmInitialized) {
17691                         throw new Error("initializeWasm() must be awaited first!");
17692                 }
17693                 const nativeResponseValue = wasm.SemanticError_invalid_signature();
17694                 return nativeResponseValue;
17695         }
17696         // enum LDKSemanticError SemanticError_imprecise_amount(void);
17697         export function SemanticError_imprecise_amount(): SemanticError {
17698                 if(!isWasmInitialized) {
17699                         throw new Error("initializeWasm() must be awaited first!");
17700                 }
17701                 const nativeResponseValue = wasm.SemanticError_imprecise_amount();
17702                 return nativeResponseValue;
17703         }
17704         // bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b);
17705         export function SemanticError_eq(a: number, b: number): boolean {
17706                 if(!isWasmInitialized) {
17707                         throw new Error("initializeWasm() must be awaited first!");
17708                 }
17709                 const nativeResponseValue = wasm.SemanticError_eq(a, b);
17710                 return nativeResponseValue;
17711         }
17712         // struct LDKStr SemanticError_to_str(const enum LDKSemanticError *NONNULL_PTR o);
17713         export function SemanticError_to_str(o: number): String {
17714                 if(!isWasmInitialized) {
17715                         throw new Error("initializeWasm() must be awaited first!");
17716                 }
17717                 const nativeResponseValue = wasm.SemanticError_to_str(o);
17718                 return nativeResponseValue;
17719         }
17720         // void SignOrCreationError_free(struct LDKSignOrCreationError this_ptr);
17721         export function SignOrCreationError_free(this_ptr: number): void {
17722                 if(!isWasmInitialized) {
17723                         throw new Error("initializeWasm() must be awaited first!");
17724                 }
17725                 const nativeResponseValue = wasm.SignOrCreationError_free(this_ptr);
17726                 // debug statements here
17727         }
17728         // struct LDKSignOrCreationError SignOrCreationError_clone(const struct LDKSignOrCreationError *NONNULL_PTR orig);
17729         export function SignOrCreationError_clone(orig: number): number {
17730                 if(!isWasmInitialized) {
17731                         throw new Error("initializeWasm() must be awaited first!");
17732                 }
17733                 const nativeResponseValue = wasm.SignOrCreationError_clone(orig);
17734                 return nativeResponseValue;
17735         }
17736         // struct LDKSignOrCreationError SignOrCreationError_sign_error(void);
17737         export function SignOrCreationError_sign_error(): number {
17738                 if(!isWasmInitialized) {
17739                         throw new Error("initializeWasm() must be awaited first!");
17740                 }
17741                 const nativeResponseValue = wasm.SignOrCreationError_sign_error();
17742                 return nativeResponseValue;
17743         }
17744         // struct LDKSignOrCreationError SignOrCreationError_creation_error(enum LDKCreationError a);
17745         export function SignOrCreationError_creation_error(a: CreationError): number {
17746                 if(!isWasmInitialized) {
17747                         throw new Error("initializeWasm() must be awaited first!");
17748                 }
17749                 const nativeResponseValue = wasm.SignOrCreationError_creation_error(a);
17750                 return nativeResponseValue;
17751         }
17752         // bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b);
17753         export function SignOrCreationError_eq(a: number, b: number): boolean {
17754                 if(!isWasmInitialized) {
17755                         throw new Error("initializeWasm() must be awaited first!");
17756                 }
17757                 const nativeResponseValue = wasm.SignOrCreationError_eq(a, b);
17758                 return nativeResponseValue;
17759         }
17760         // struct LDKStr SignOrCreationError_to_str(const struct LDKSignOrCreationError *NONNULL_PTR o);
17761         export function SignOrCreationError_to_str(o: number): String {
17762                 if(!isWasmInitialized) {
17763                         throw new Error("initializeWasm() must be awaited first!");
17764                 }
17765                 const nativeResponseValue = wasm.SignOrCreationError_to_str(o);
17766                 return nativeResponseValue;
17767         }
17768         // struct LDKCResult_InvoiceSignOrCreationErrorZ create_invoice_from_channelmanager(const struct LDKChannelManager *NONNULL_PTR channelmanager, struct LDKKeysInterface keys_manager, enum LDKCurrency network, struct LDKCOption_u64Z amt_msat, struct LDKStr description);
17769         export function create_invoice_from_channelmanager(channelmanager: number, keys_manager: number, network: Currency, amt_msat: number, description: String): number {
17770                 if(!isWasmInitialized) {
17771                         throw new Error("initializeWasm() must be awaited first!");
17772                 }
17773                 const nativeResponseValue = wasm.create_invoice_from_channelmanager(channelmanager, keys_manager, network, amt_msat, description);
17774                 return nativeResponseValue;
17775         }
17776         // struct LDKCResult_SiPrefixNoneZ SiPrefix_from_str(struct LDKStr s);
17777         export function SiPrefix_from_str(s: String): number {
17778                 if(!isWasmInitialized) {
17779                         throw new Error("initializeWasm() must be awaited first!");
17780                 }
17781                 const nativeResponseValue = wasm.SiPrefix_from_str(s);
17782                 return nativeResponseValue;
17783         }
17784         // struct LDKCResult_InvoiceNoneZ Invoice_from_str(struct LDKStr s);
17785         export function Invoice_from_str(s: String): number {
17786                 if(!isWasmInitialized) {
17787                         throw new Error("initializeWasm() must be awaited first!");
17788                 }
17789                 const nativeResponseValue = wasm.Invoice_from_str(s);
17790                 return nativeResponseValue;
17791         }
17792         // struct LDKCResult_SignedRawInvoiceNoneZ SignedRawInvoice_from_str(struct LDKStr s);
17793         export function SignedRawInvoice_from_str(s: String): number {
17794                 if(!isWasmInitialized) {
17795                         throw new Error("initializeWasm() must be awaited first!");
17796                 }
17797                 const nativeResponseValue = wasm.SignedRawInvoice_from_str(s);
17798                 return nativeResponseValue;
17799         }
17800         // struct LDKStr Invoice_to_str(const struct LDKInvoice *NONNULL_PTR o);
17801         export function Invoice_to_str(o: number): String {
17802                 if(!isWasmInitialized) {
17803                         throw new Error("initializeWasm() must be awaited first!");
17804                 }
17805                 const nativeResponseValue = wasm.Invoice_to_str(o);
17806                 return nativeResponseValue;
17807         }
17808         // struct LDKStr SignedRawInvoice_to_str(const struct LDKSignedRawInvoice *NONNULL_PTR o);
17809         export function SignedRawInvoice_to_str(o: number): String {
17810                 if(!isWasmInitialized) {
17811                         throw new Error("initializeWasm() must be awaited first!");
17812                 }
17813                 const nativeResponseValue = wasm.SignedRawInvoice_to_str(o);
17814                 return nativeResponseValue;
17815         }
17816         // struct LDKStr Currency_to_str(const enum LDKCurrency *NONNULL_PTR o);
17817         export function Currency_to_str(o: number): String {
17818                 if(!isWasmInitialized) {
17819                         throw new Error("initializeWasm() must be awaited first!");
17820                 }
17821                 const nativeResponseValue = wasm.Currency_to_str(o);
17822                 return nativeResponseValue;
17823         }
17824         // struct LDKStr SiPrefix_to_str(const enum LDKSiPrefix *NONNULL_PTR o);
17825         export function SiPrefix_to_str(o: number): String {
17826                 if(!isWasmInitialized) {
17827                         throw new Error("initializeWasm() must be awaited first!");
17828                 }
17829                 const nativeResponseValue = wasm.SiPrefix_to_str(o);
17830                 return nativeResponseValue;
17831         }
17832
17833         export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
17834             if(isWasmInitialized && !allowDoubleInitialization) {
17835                 return;
17836             }
17837             const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
17838             wasm = wasmInstance.exports;
17839             isWasmInitialized = true;
17840         }
17841