Update auto-generated bindings to 0.0.102
[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 native boolean LDKCResult_PaymentIdDecodeErrorZ_result_ok(long arg);
735         public static native number LDKCResult_PaymentIdDecodeErrorZ_get_ok(long arg);
736         public static native number LDKCResult_PaymentIdDecodeErrorZ_get_err(long arg);
737         public static class LDKCOption_u16Z {
738                 private LDKCOption_u16Z() {}
739                 export class Some extends LDKCOption_u16Z {
740                         public number some;
741                         Some(number some) { this.some = some; }
742                 }
743                 export class None extends LDKCOption_u16Z {
744                         None() { }
745                 }
746                 static native void init();
747         }
748         static { LDKCOption_u16Z.init(); }
749         public static native LDKCOption_u16Z LDKCOption_u16Z_ref_from_ptr(long ptr);
750         public static class LDKAPIError {
751                 private LDKAPIError() {}
752                 export class APIMisuseError extends LDKAPIError {
753                         public String err;
754                         APIMisuseError(String err) { this.err = err; }
755                 }
756                 export class FeeRateTooHigh extends LDKAPIError {
757                         public String err;
758                         public number feerate;
759                         FeeRateTooHigh(String err, number feerate) { this.err = err; this.feerate = feerate; }
760                 }
761                 export class RouteError extends LDKAPIError {
762                         public String err;
763                         RouteError(String err) { this.err = err; }
764                 }
765                 export class ChannelUnavailable extends LDKAPIError {
766                         public String err;
767                         ChannelUnavailable(String err) { this.err = err; }
768                 }
769                 export class MonitorUpdateFailed extends LDKAPIError {
770                         MonitorUpdateFailed() { }
771                 }
772                 export class IncompatibleShutdownScript extends LDKAPIError {
773                         public number script;
774                         IncompatibleShutdownScript(number script) { this.script = script; }
775                 }
776                 static native void init();
777         }
778         static { LDKAPIError.init(); }
779         public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
780         public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
781         public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
782         public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
783         public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
784         public static native long LDKCVec_APIErrorZ_new(number[] elems);
785         public static native boolean LDKCResult__u832APIErrorZ_result_ok(long arg);
786         public static native Uint8Array LDKCResult__u832APIErrorZ_get_ok(long arg);
787         public static native number LDKCResult__u832APIErrorZ_get_err(long arg);
788         public static class LDKPaymentSendFailure {
789                 private LDKPaymentSendFailure() {}
790                 export class ParameterError extends LDKPaymentSendFailure {
791                         public number parameter_error;
792                         ParameterError(number parameter_error) { this.parameter_error = parameter_error; }
793                 }
794                 export class PathParameterError extends LDKPaymentSendFailure {
795                         public number[] path_parameter_error;
796                         PathParameterError(number[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
797                 }
798                 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
799                         public number[] all_failed_retry_safe;
800                         AllFailedRetrySafe(number[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
801                 }
802                 export class PartialFailure extends LDKPaymentSendFailure {
803                         public number[] partial_failure;
804                         PartialFailure(number[] partial_failure) { this.partial_failure = partial_failure; }
805                 }
806                 static native void init();
807         }
808         static { LDKPaymentSendFailure.init(); }
809         public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
810         public static native boolean LDKCResult_PaymentIdPaymentSendFailureZ_result_ok(long arg);
811         public static native number LDKCResult_PaymentIdPaymentSendFailureZ_get_ok(long arg);
812         public static native number LDKCResult_PaymentIdPaymentSendFailureZ_get_err(long arg);
813         public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
814         public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
815         public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
816         public static native long LDKC2Tuple_PaymentHashPaymentIdZ_new(Uint8Array a, number b);
817         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_a(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR tuple);
818         export function C2Tuple_PaymentHashPaymentIdZ_get_a(tuple: number): Uint8Array {
819                 if(!isWasmInitialized) {
820                         throw new Error("initializeWasm() must be awaited first!");
821                 }
822                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_get_a(tuple);
823                 return decodeArray(nativeResponseValue);
824         }
825         // struct LDKPaymentId C2Tuple_PaymentHashPaymentIdZ_get_b(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR tuple);
826         export function C2Tuple_PaymentHashPaymentIdZ_get_b(tuple: number): number {
827                 if(!isWasmInitialized) {
828                         throw new Error("initializeWasm() must be awaited first!");
829                 }
830                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_get_b(tuple);
831                 return nativeResponseValue;
832         }
833         public static native boolean LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_result_ok(long arg);
834         public static native number LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(long arg);
835         public static native number LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(long arg);
836         public static class LDKNetAddress {
837                 private LDKNetAddress() {}
838                 export class IPv4 extends LDKNetAddress {
839                         public Uint8Array addr;
840                         public number port;
841                         IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
842                 }
843                 export class IPv6 extends LDKNetAddress {
844                         public Uint8Array addr;
845                         public number port;
846                         IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
847                 }
848                 export class OnionV2 extends LDKNetAddress {
849                         public Uint8Array addr;
850                         public number port;
851                         OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
852                 }
853                 export class OnionV3 extends LDKNetAddress {
854                         public Uint8Array ed25519_pubkey;
855                         public number checksum;
856                         public number version;
857                         public number port;
858                         OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
859                 }
860                 static native void init();
861         }
862         static { LDKNetAddress.init(); }
863         public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
864         public static native long LDKCVec_NetAddressZ_new(number[] elems);
865         public static native long LDKC2Tuple_PaymentHashPaymentSecretZ_new(Uint8Array a, Uint8Array b);
866         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
867         export function C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple: number): Uint8Array {
868                 if(!isWasmInitialized) {
869                         throw new Error("initializeWasm() must be awaited first!");
870                 }
871                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple);
872                 return decodeArray(nativeResponseValue);
873         }
874         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
875         export function C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple: number): Uint8Array {
876                 if(!isWasmInitialized) {
877                         throw new Error("initializeWasm() must be awaited first!");
878                 }
879                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple);
880                 return decodeArray(nativeResponseValue);
881         }
882         public static native boolean LDKCResult_PaymentSecretAPIErrorZ_result_ok(long arg);
883         public static native Uint8Array LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
884         public static native number LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
885         public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
886
887
888
889 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
890
891                 export interface LDKWatch {
892                         watch_channel (funding_txo: number, monitor: number): number;
893                         update_channel (funding_txo: number, update: number): number;
894                         release_pending_monitor_events (): number[];
895                 }
896
897                 export function LDKWatch_new(impl: LDKWatch): number {
898             throw new Error('unimplemented'); // TODO: bind to WASM
899         }
900
901 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
902
903
904         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
905         export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
906                 if(!isWasmInitialized) {
907                         throw new Error("initializeWasm() must be awaited first!");
908                 }
909                 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
910                 return nativeResponseValue;
911         }
912         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
913         export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
914                 if(!isWasmInitialized) {
915                         throw new Error("initializeWasm() must be awaited first!");
916                 }
917                 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
918                 return nativeResponseValue;
919         }
920         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
921         export function Watch_release_pending_monitor_events(this_arg: number): number[] {
922                 if(!isWasmInitialized) {
923                         throw new Error("initializeWasm() must be awaited first!");
924                 }
925                 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
926                 return nativeResponseValue;
927         }
928
929
930
931 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
932
933                 export interface LDKBroadcasterInterface {
934                         broadcast_transaction (tx: Uint8Array): void;
935                 }
936
937                 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
938             throw new Error('unimplemented'); // TODO: bind to WASM
939         }
940
941 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
942
943
944         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
945         export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
946                 if(!isWasmInitialized) {
947                         throw new Error("initializeWasm() must be awaited first!");
948                 }
949                 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
950                 // debug statements here
951         }
952
953
954
955 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
956
957                 export interface LDKKeysInterface {
958                         get_node_secret (): Uint8Array;
959                         get_destination_script (): Uint8Array;
960                         get_shutdown_scriptpubkey (): number;
961                         get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
962                         get_secure_random_bytes (): Uint8Array;
963                         read_chan_signer (reader: Uint8Array): number;
964                         sign_invoice (invoice_preimage: Uint8Array): number;
965                 }
966
967                 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
968             throw new Error('unimplemented'); // TODO: bind to WASM
969         }
970
971 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
972
973
974         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
975         export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
976                 if(!isWasmInitialized) {
977                         throw new Error("initializeWasm() must be awaited first!");
978                 }
979                 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
980                 return decodeArray(nativeResponseValue);
981         }
982         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
983         export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
984                 if(!isWasmInitialized) {
985                         throw new Error("initializeWasm() must be awaited first!");
986                 }
987                 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
988                 return decodeArray(nativeResponseValue);
989         }
990         // LDKShutdownScript KeysInterface_get_shutdown_scriptpubkey LDKKeysInterface *NONNULL_PTR this_arg
991         export function KeysInterface_get_shutdown_scriptpubkey(this_arg: number): number {
992                 if(!isWasmInitialized) {
993                         throw new Error("initializeWasm() must be awaited first!");
994                 }
995                 const nativeResponseValue = wasm.KeysInterface_get_shutdown_scriptpubkey(this_arg);
996                 return nativeResponseValue;
997         }
998         // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
999         export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
1000                 if(!isWasmInitialized) {
1001                         throw new Error("initializeWasm() must be awaited first!");
1002                 }
1003                 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
1004                 return nativeResponseValue;
1005         }
1006         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
1007         export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
1008                 if(!isWasmInitialized) {
1009                         throw new Error("initializeWasm() must be awaited first!");
1010                 }
1011                 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
1012                 return decodeArray(nativeResponseValue);
1013         }
1014         // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
1015         export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
1016                 if(!isWasmInitialized) {
1017                         throw new Error("initializeWasm() must be awaited first!");
1018                 }
1019                 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
1020                 return nativeResponseValue;
1021         }
1022         // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
1023         export function KeysInterface_sign_invoice(this_arg: number, invoice_preimage: Uint8Array): number {
1024                 if(!isWasmInitialized) {
1025                         throw new Error("initializeWasm() must be awaited first!");
1026                 }
1027                 const nativeResponseValue = wasm.KeysInterface_sign_invoice(this_arg, encodeArray(invoice_preimage));
1028                 return nativeResponseValue;
1029         }
1030
1031
1032
1033 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1034
1035                 export interface LDKFeeEstimator {
1036                         get_est_sat_per_1000_weight (confirmation_target: ConfirmationTarget): number;
1037                 }
1038
1039                 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
1040             throw new Error('unimplemented'); // TODO: bind to WASM
1041         }
1042
1043 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1044
1045
1046         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
1047         export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: ConfirmationTarget): number {
1048                 if(!isWasmInitialized) {
1049                         throw new Error("initializeWasm() must be awaited first!");
1050                 }
1051                 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
1052                 return nativeResponseValue;
1053         }
1054
1055
1056
1057 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1058
1059                 export interface LDKLogger {
1060                         log (record: String): void;
1061                 }
1062
1063                 export function LDKLogger_new(impl: LDKLogger): number {
1064             throw new Error('unimplemented'); // TODO: bind to WASM
1065         }
1066
1067 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1068
1069
1070         public static native long LDKC2Tuple_BlockHashChannelManagerZ_new(Uint8Array a, number b);
1071         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
1072         export function C2Tuple_BlockHashChannelManagerZ_get_a(tuple: number): Uint8Array {
1073                 if(!isWasmInitialized) {
1074                         throw new Error("initializeWasm() must be awaited first!");
1075                 }
1076                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_get_a(tuple);
1077                 return decodeArray(nativeResponseValue);
1078         }
1079         // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
1080         export function C2Tuple_BlockHashChannelManagerZ_get_b(tuple: number): number {
1081                 if(!isWasmInitialized) {
1082                         throw new Error("initializeWasm() must be awaited first!");
1083                 }
1084                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_get_b(tuple);
1085                 return nativeResponseValue;
1086         }
1087         public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
1088         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
1089         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
1090         public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
1091         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
1092         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
1093         public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
1094         public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
1095         public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
1096
1097
1098
1099 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1100
1101                 export interface LDKType {
1102                         type_id (): number;
1103                         debug_str (): String;
1104                         write (): Uint8Array;
1105                 }
1106
1107                 export function LDKType_new(impl: LDKType): number {
1108             throw new Error('unimplemented'); // TODO: bind to WASM
1109         }
1110
1111 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1112
1113
1114         // uint16_t Type_type_id LDKType *NONNULL_PTR this_arg
1115         export function Type_type_id(this_arg: number): number {
1116                 if(!isWasmInitialized) {
1117                         throw new Error("initializeWasm() must be awaited first!");
1118                 }
1119                 const nativeResponseValue = wasm.Type_type_id(this_arg);
1120                 return nativeResponseValue;
1121         }
1122         // LDKStr Type_debug_str LDKType *NONNULL_PTR this_arg
1123         export function Type_debug_str(this_arg: number): String {
1124                 if(!isWasmInitialized) {
1125                         throw new Error("initializeWasm() must be awaited first!");
1126                 }
1127                 const nativeResponseValue = wasm.Type_debug_str(this_arg);
1128                 return nativeResponseValue;
1129         }
1130         // LDKCVec_u8Z Type_write LDKType *NONNULL_PTR this_arg
1131         export function Type_write(this_arg: number): Uint8Array {
1132                 if(!isWasmInitialized) {
1133                         throw new Error("initializeWasm() must be awaited first!");
1134                 }
1135                 const nativeResponseValue = wasm.Type_write(this_arg);
1136                 return decodeArray(nativeResponseValue);
1137         }
1138         public static class LDKCOption_TypeZ {
1139                 private LDKCOption_TypeZ() {}
1140                 export class Some extends LDKCOption_TypeZ {
1141                         public number some;
1142                         Some(number some) { this.some = some; }
1143                 }
1144                 export class None extends LDKCOption_TypeZ {
1145                         None() { }
1146                 }
1147                 static native void init();
1148         }
1149         static { LDKCOption_TypeZ.init(); }
1150         public static native LDKCOption_TypeZ LDKCOption_TypeZ_ref_from_ptr(long ptr);
1151         public static native boolean LDKCResult_COption_TypeZDecodeErrorZ_result_ok(long arg);
1152         public static native number LDKCResult_COption_TypeZDecodeErrorZ_get_ok(long arg);
1153         public static native number LDKCResult_COption_TypeZDecodeErrorZ_get_err(long arg);
1154         public static native boolean LDKCResult_SiPrefixNoneZ_result_ok(long arg);
1155         public static native SiPrefix LDKCResult_SiPrefixNoneZ_get_ok(long arg);
1156         public static native void LDKCResult_SiPrefixNoneZ_get_err(long arg);
1157         public static native boolean LDKCResult_InvoiceNoneZ_result_ok(long arg);
1158         public static native number LDKCResult_InvoiceNoneZ_get_ok(long arg);
1159         public static native void LDKCResult_InvoiceNoneZ_get_err(long arg);
1160         public static native boolean LDKCResult_SignedRawInvoiceNoneZ_result_ok(long arg);
1161         public static native number LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
1162         public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
1163         public static native long LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ_new(number a, Uint8Array b, number c);
1164         // struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
1165         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple: number): number {
1166                 if(!isWasmInitialized) {
1167                         throw new Error("initializeWasm() must be awaited first!");
1168                 }
1169                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple);
1170                 return nativeResponseValue;
1171         }
1172         // struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
1173         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple: number): Uint8Array {
1174                 if(!isWasmInitialized) {
1175                         throw new Error("initializeWasm() must be awaited first!");
1176                 }
1177                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple);
1178                 return decodeArray(nativeResponseValue);
1179         }
1180         // struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
1181         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple: number): number {
1182                 if(!isWasmInitialized) {
1183                         throw new Error("initializeWasm() must be awaited first!");
1184                 }
1185                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple);
1186                 return nativeResponseValue;
1187         }
1188         public static native boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
1189         public static native number LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
1190         public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
1191         public static native long LDKCVec_PrivateRouteZ_new(number[] elems);
1192         public static native boolean LDKCResult_PositiveTimestampCreationErrorZ_result_ok(long arg);
1193         public static native number LDKCResult_PositiveTimestampCreationErrorZ_get_ok(long arg);
1194         public static native CreationError LDKCResult_PositiveTimestampCreationErrorZ_get_err(long arg);
1195         public static native boolean LDKCResult_NoneSemanticErrorZ_result_ok(long arg);
1196         public static native void LDKCResult_NoneSemanticErrorZ_get_ok(long arg);
1197         public static native SemanticError LDKCResult_NoneSemanticErrorZ_get_err(long arg);
1198         public static native boolean LDKCResult_InvoiceSemanticErrorZ_result_ok(long arg);
1199         public static native number LDKCResult_InvoiceSemanticErrorZ_get_ok(long arg);
1200         public static native SemanticError LDKCResult_InvoiceSemanticErrorZ_get_err(long arg);
1201         public static native boolean LDKCResult_DescriptionCreationErrorZ_result_ok(long arg);
1202         public static native number LDKCResult_DescriptionCreationErrorZ_get_ok(long arg);
1203         public static native CreationError LDKCResult_DescriptionCreationErrorZ_get_err(long arg);
1204         public static native boolean LDKCResult_ExpiryTimeCreationErrorZ_result_ok(long arg);
1205         public static native number LDKCResult_ExpiryTimeCreationErrorZ_get_ok(long arg);
1206         public static native CreationError LDKCResult_ExpiryTimeCreationErrorZ_get_err(long arg);
1207         public static native boolean LDKCResult_PrivateRouteCreationErrorZ_result_ok(long arg);
1208         public static native number LDKCResult_PrivateRouteCreationErrorZ_get_ok(long arg);
1209         public static native CreationError LDKCResult_PrivateRouteCreationErrorZ_get_err(long arg);
1210         public static native boolean LDKCResult_StringErrorZ_result_ok(long arg);
1211         public static native String LDKCResult_StringErrorZ_get_ok(long arg);
1212         public static native Secp256k1Error LDKCResult_StringErrorZ_get_err(long arg);
1213         public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
1214         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
1215         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
1216         public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
1217         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
1218         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
1219         public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
1220         public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
1221         public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
1222         public static native long LDKC2Tuple_OutPointScriptZ_new(number a, Uint8Array b);
1223         // struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
1224         export function C2Tuple_OutPointScriptZ_get_a(tuple: number): number {
1225                 if(!isWasmInitialized) {
1226                         throw new Error("initializeWasm() must be awaited first!");
1227                 }
1228                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_get_a(tuple);
1229                 return nativeResponseValue;
1230         }
1231         // struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
1232         export function C2Tuple_OutPointScriptZ_get_b(tuple: number): Uint8Array {
1233                 if(!isWasmInitialized) {
1234                         throw new Error("initializeWasm() must be awaited first!");
1235                 }
1236                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_get_b(tuple);
1237                 return decodeArray(nativeResponseValue);
1238         }
1239         public static native long LDKC2Tuple_u32ScriptZ_new(number a, Uint8Array b);
1240         // uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
1241         export function C2Tuple_u32ScriptZ_get_a(tuple: number): number {
1242                 if(!isWasmInitialized) {
1243                         throw new Error("initializeWasm() must be awaited first!");
1244                 }
1245                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_get_a(tuple);
1246                 return nativeResponseValue;
1247         }
1248         // struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
1249         export function C2Tuple_u32ScriptZ_get_b(tuple: number): Uint8Array {
1250                 if(!isWasmInitialized) {
1251                         throw new Error("initializeWasm() must be awaited first!");
1252                 }
1253                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_get_b(tuple);
1254                 return decodeArray(nativeResponseValue);
1255         }
1256         public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
1257         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Uint8Array a, number[] b);
1258         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
1259         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple: number): Uint8Array {
1260                 if(!isWasmInitialized) {
1261                         throw new Error("initializeWasm() must be awaited first!");
1262                 }
1263                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple);
1264                 return decodeArray(nativeResponseValue);
1265         }
1266         // struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
1267         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple: number): number[] {
1268                 if(!isWasmInitialized) {
1269                         throw new Error("initializeWasm() must be awaited first!");
1270                 }
1271                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple);
1272                 return nativeResponseValue;
1273         }
1274         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
1275         public static class LDKPaymentPurpose {
1276                 private LDKPaymentPurpose() {}
1277                 export class InvoicePayment extends LDKPaymentPurpose {
1278                         public Uint8Array payment_preimage;
1279                         public Uint8Array payment_secret;
1280                         public number user_payment_id;
1281                         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; }
1282                 }
1283                 export class SpontaneousPayment extends LDKPaymentPurpose {
1284                         public Uint8Array spontaneous_payment;
1285                         SpontaneousPayment(Uint8Array spontaneous_payment) { this.spontaneous_payment = spontaneous_payment; }
1286                 }
1287                 static native void init();
1288         }
1289         static { LDKPaymentPurpose.init(); }
1290         public static native LDKPaymentPurpose LDKPaymentPurpose_ref_from_ptr(long ptr);
1291         public static class LDKClosureReason {
1292                 private LDKClosureReason() {}
1293                 export class CounterpartyForceClosed extends LDKClosureReason {
1294                         public String peer_msg;
1295                         CounterpartyForceClosed(String peer_msg) { this.peer_msg = peer_msg; }
1296                 }
1297                 export class HolderForceClosed extends LDKClosureReason {
1298                         HolderForceClosed() { }
1299                 }
1300                 export class CooperativeClosure extends LDKClosureReason {
1301                         CooperativeClosure() { }
1302                 }
1303                 export class CommitmentTxConfirmed extends LDKClosureReason {
1304                         CommitmentTxConfirmed() { }
1305                 }
1306                 export class ProcessingError extends LDKClosureReason {
1307                         public String err;
1308                         ProcessingError(String err) { this.err = err; }
1309                 }
1310                 export class DisconnectedPeer extends LDKClosureReason {
1311                         DisconnectedPeer() { }
1312                 }
1313                 export class OutdatedChannelManager extends LDKClosureReason {
1314                         OutdatedChannelManager() { }
1315                 }
1316                 static native void init();
1317         }
1318         static { LDKClosureReason.init(); }
1319         public static native LDKClosureReason LDKClosureReason_ref_from_ptr(long ptr);
1320         public static class LDKEvent {
1321                 private LDKEvent() {}
1322                 export class FundingGenerationReady extends LDKEvent {
1323                         public Uint8Array temporary_channel_id;
1324                         public number channel_value_satoshis;
1325                         public Uint8Array output_script;
1326                         public number user_channel_id;
1327                         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; }
1328                 }
1329                 export class PaymentReceived extends LDKEvent {
1330                         public Uint8Array payment_hash;
1331                         public number amt;
1332                         public number purpose;
1333                         PaymentReceived(Uint8Array payment_hash, number amt, number purpose) { this.payment_hash = payment_hash; this.amt = amt; this.purpose = purpose; }
1334                 }
1335                 export class PaymentSent extends LDKEvent {
1336                         public Uint8Array payment_preimage;
1337                         public Uint8Array payment_hash;
1338                         PaymentSent(Uint8Array payment_preimage, Uint8Array payment_hash) { this.payment_preimage = payment_preimage; this.payment_hash = payment_hash; }
1339                 }
1340                 export class PaymentPathFailed extends LDKEvent {
1341                         public Uint8Array payment_hash;
1342                         public boolean rejected_by_dest;
1343                         public number network_update;
1344                         public boolean all_paths_failed;
1345                         public number[] path;
1346                         public number short_channel_id;
1347                         PaymentPathFailed(Uint8Array payment_hash, boolean rejected_by_dest, number network_update, boolean all_paths_failed, number[] path, number short_channel_id) { this.payment_hash = payment_hash; this.rejected_by_dest = rejected_by_dest; this.network_update = network_update; this.all_paths_failed = all_paths_failed; this.path = path; this.short_channel_id = short_channel_id; }
1348                 }
1349                 export class PendingHTLCsForwardable extends LDKEvent {
1350                         public number time_forwardable;
1351                         PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
1352                 }
1353                 export class SpendableOutputs extends LDKEvent {
1354                         public number[] outputs;
1355                         SpendableOutputs(number[] outputs) { this.outputs = outputs; }
1356                 }
1357                 export class PaymentForwarded extends LDKEvent {
1358                         public number fee_earned_msat;
1359                         public boolean claim_from_onchain_tx;
1360                         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; }
1361                 }
1362                 export class ChannelClosed extends LDKEvent {
1363                         public Uint8Array channel_id;
1364                         public number user_channel_id;
1365                         public number reason;
1366                         ChannelClosed(Uint8Array channel_id, number user_channel_id, number reason) { this.channel_id = channel_id; this.user_channel_id = user_channel_id; this.reason = reason; }
1367                 }
1368                 export class DiscardFunding extends LDKEvent {
1369                         public Uint8Array channel_id;
1370                         public Uint8Array transaction;
1371                         DiscardFunding(Uint8Array channel_id, Uint8Array transaction) { this.channel_id = channel_id; this.transaction = transaction; }
1372                 }
1373                 static native void init();
1374         }
1375         static { LDKEvent.init(); }
1376         public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
1377         public static native long LDKCVec_EventZ_new(number[] elems);
1378         public static native long LDKC2Tuple_u32TxOutZ_new(number a, number b);
1379         // uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
1380         export function C2Tuple_u32TxOutZ_get_a(tuple: number): number {
1381                 if(!isWasmInitialized) {
1382                         throw new Error("initializeWasm() must be awaited first!");
1383                 }
1384                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_get_a(tuple);
1385                 return nativeResponseValue;
1386         }
1387         // struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
1388         export function C2Tuple_u32TxOutZ_get_b(tuple: number): number {
1389                 if(!isWasmInitialized) {
1390                         throw new Error("initializeWasm() must be awaited first!");
1391                 }
1392                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_get_b(tuple);
1393                 return nativeResponseValue;
1394         }
1395         public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
1396         public static native long LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Uint8Array a, number[] b);
1397         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
1398         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple: number): Uint8Array {
1399                 if(!isWasmInitialized) {
1400                         throw new Error("initializeWasm() must be awaited first!");
1401                 }
1402                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple);
1403                 return decodeArray(nativeResponseValue);
1404         }
1405         // struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
1406         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple: number): number[] {
1407                 if(!isWasmInitialized) {
1408                         throw new Error("initializeWasm() must be awaited first!");
1409                 }
1410                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple);
1411                 return nativeResponseValue;
1412         }
1413         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
1414         public static class LDKBalance {
1415                 private LDKBalance() {}
1416                 export class ClaimableOnChannelClose extends LDKBalance {
1417                         public number claimable_amount_satoshis;
1418                         ClaimableOnChannelClose(number claimable_amount_satoshis) { this.claimable_amount_satoshis = claimable_amount_satoshis; }
1419                 }
1420                 export class ClaimableAwaitingConfirmations extends LDKBalance {
1421                         public number claimable_amount_satoshis;
1422                         public number confirmation_height;
1423                         ClaimableAwaitingConfirmations(number claimable_amount_satoshis, number confirmation_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.confirmation_height = confirmation_height; }
1424                 }
1425                 export class ContentiousClaimable extends LDKBalance {
1426                         public number claimable_amount_satoshis;
1427                         public number timeout_height;
1428                         ContentiousClaimable(number claimable_amount_satoshis, number timeout_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.timeout_height = timeout_height; }
1429                 }
1430                 export class MaybeClaimableHTLCAwaitingTimeout extends LDKBalance {
1431                         public number claimable_amount_satoshis;
1432                         public number claimable_height;
1433                         MaybeClaimableHTLCAwaitingTimeout(number claimable_amount_satoshis, number claimable_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.claimable_height = claimable_height; }
1434                 }
1435                 static native void init();
1436         }
1437         static { LDKBalance.init(); }
1438         public static native LDKBalance LDKBalance_ref_from_ptr(long ptr);
1439         public static native long LDKCVec_BalanceZ_new(number[] elems);
1440         public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
1441         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
1442         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
1443         public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
1444         public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
1445         public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
1446         public static native long LDKC2Tuple_PublicKeyTypeZ_new(Uint8Array a, number b);
1447         // struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
1448         export function C2Tuple_PublicKeyTypeZ_get_a(tuple: number): Uint8Array {
1449                 if(!isWasmInitialized) {
1450                         throw new Error("initializeWasm() must be awaited first!");
1451                 }
1452                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_get_a(tuple);
1453                 return decodeArray(nativeResponseValue);
1454         }
1455         // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
1456         export function C2Tuple_PublicKeyTypeZ_get_b(tuple: number): number {
1457                 if(!isWasmInitialized) {
1458                         throw new Error("initializeWasm() must be awaited first!");
1459                 }
1460                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_get_b(tuple);
1461                 return nativeResponseValue;
1462         }
1463         public static native long LDKCVec_C2Tuple_PublicKeyTypeZZ_new(number[] elems);
1464         public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
1465         public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
1466         public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
1467         public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
1468         // struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
1469         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple: number): number {
1470                 if(!isWasmInitialized) {
1471                         throw new Error("initializeWasm() must be awaited first!");
1472                 }
1473                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple);
1474                 return nativeResponseValue;
1475         }
1476         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
1477         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple: number): number {
1478                 if(!isWasmInitialized) {
1479                         throw new Error("initializeWasm() must be awaited first!");
1480                 }
1481                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple);
1482                 return nativeResponseValue;
1483         }
1484         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
1485         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple: number): number {
1486                 if(!isWasmInitialized) {
1487                         throw new Error("initializeWasm() must be awaited first!");
1488                 }
1489                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple);
1490                 return nativeResponseValue;
1491         }
1492         public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
1493         public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
1494         public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
1495         public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
1496         public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
1497         public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
1498         public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
1499         public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
1500         public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
1501         public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
1502         public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
1503         public static native boolean LDKCResult_NodeIdDecodeErrorZ_result_ok(long arg);
1504         public static native number LDKCResult_NodeIdDecodeErrorZ_get_ok(long arg);
1505         public static native number LDKCResult_NodeIdDecodeErrorZ_get_err(long arg);
1506
1507
1508
1509 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1510
1511                 export interface LDKAccess {
1512                         get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1513                 }
1514
1515                 export function LDKAccess_new(impl: LDKAccess): number {
1516             throw new Error('unimplemented'); // TODO: bind to WASM
1517         }
1518
1519 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1520
1521
1522         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1523         export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1524                 if(!isWasmInitialized) {
1525                         throw new Error("initializeWasm() must be awaited first!");
1526                 }
1527                 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1528                 return nativeResponseValue;
1529         }
1530         public static class LDKCOption_AccessZ {
1531                 private LDKCOption_AccessZ() {}
1532                 export class Some extends LDKCOption_AccessZ {
1533                         public number some;
1534                         Some(number some) { this.some = some; }
1535                 }
1536                 export class None extends LDKCOption_AccessZ {
1537                         None() { }
1538                 }
1539                 static native void init();
1540         }
1541         static { LDKCOption_AccessZ.init(); }
1542         public static native LDKCOption_AccessZ LDKCOption_AccessZ_ref_from_ptr(long ptr);
1543         public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
1544         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
1545         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
1546         public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
1547         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
1548         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
1549         public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
1550         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
1551         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
1552         public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
1553         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
1554         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
1555         public static native long LDKCVec_u64Z_new(number[] elems);
1556         public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
1557         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
1558         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
1559         public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
1560         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
1561         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
1562         public static class LDKCOption_CVec_NetAddressZZ {
1563                 private LDKCOption_CVec_NetAddressZZ() {}
1564                 export class Some extends LDKCOption_CVec_NetAddressZZ {
1565                         public number[] some;
1566                         Some(number[] some) { this.some = some; }
1567                 }
1568                 export class None extends LDKCOption_CVec_NetAddressZZ {
1569                         None() { }
1570                 }
1571                 static native void init();
1572         }
1573         static { LDKCOption_CVec_NetAddressZZ.init(); }
1574         public static native LDKCOption_CVec_NetAddressZZ LDKCOption_CVec_NetAddressZZ_ref_from_ptr(long ptr);
1575         public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
1576         public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
1577         public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
1578         public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
1579         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
1580         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
1581         public static native boolean LDKCResult_NetAddressDecodeErrorZ_result_ok(long arg);
1582         public static native number LDKCResult_NetAddressDecodeErrorZ_get_ok(long arg);
1583         public static native number LDKCResult_NetAddressDecodeErrorZ_get_err(long arg);
1584         public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
1585         public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
1586         public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
1587         public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
1588         public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
1589         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
1590         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
1591         public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
1592         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
1593         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
1594         public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
1595         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
1596         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
1597         public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
1598         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
1599         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
1600         public static native boolean LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_result_ok(long arg);
1601         public static native number LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(long arg);
1602         public static native number LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(long arg);
1603         public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
1604         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
1605         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
1606         public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
1607         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
1608         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
1609         public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
1610         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
1611         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
1612         public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
1613         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
1614         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
1615         public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
1616         public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
1617         public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
1618         public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
1619         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
1620         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
1621         public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
1622         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
1623         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
1624         public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
1625         public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
1626         public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
1627         public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
1628         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
1629         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
1630         public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
1631         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
1632         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
1633         public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
1634         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
1635         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
1636         public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
1637         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
1638         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
1639         public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
1640         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
1641         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
1642         public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
1643         public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
1644         public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
1645         public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
1646         public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
1647         public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
1648         public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1649         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1650         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
1651         public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1652         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1653         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
1654         public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
1655         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
1656         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
1657         public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
1658         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
1659         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
1660         public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
1661         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
1662         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
1663         public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
1664         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
1665         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
1666         public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
1667         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
1668         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
1669         public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
1670         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
1671         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
1672         public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
1673         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1674         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1675         public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
1676         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1677         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1678         public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
1679         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1680         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1681         public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
1682         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1683         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1684         public static class LDKSignOrCreationError {
1685                 private LDKSignOrCreationError() {}
1686                 export class SignError extends LDKSignOrCreationError {
1687                         SignError() { }
1688                 }
1689                 export class CreationError extends LDKSignOrCreationError {
1690                         public CreationError creation_error;
1691                         CreationError(CreationError creation_error) { this.creation_error = creation_error; }
1692                 }
1693                 static native void init();
1694         }
1695         static { LDKSignOrCreationError.init(); }
1696         public static native LDKSignOrCreationError LDKSignOrCreationError_ref_from_ptr(long ptr);
1697         public static native boolean LDKCResult_InvoiceSignOrCreationErrorZ_result_ok(long arg);
1698         public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_ok(long arg);
1699         public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_err(long arg);
1700
1701
1702
1703 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1704
1705                 export interface LDKFilter {
1706                         register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1707                         register_output (output: number): number;
1708                 }
1709
1710                 export function LDKFilter_new(impl: LDKFilter): number {
1711             throw new Error('unimplemented'); // TODO: bind to WASM
1712         }
1713
1714 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1715
1716
1717         // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1718         export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1719                 if(!isWasmInitialized) {
1720                         throw new Error("initializeWasm() must be awaited first!");
1721                 }
1722                 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1723                 // debug statements here
1724         }
1725         // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
1726         export function Filter_register_output(this_arg: number, output: number): number {
1727                 if(!isWasmInitialized) {
1728                         throw new Error("initializeWasm() must be awaited first!");
1729                 }
1730                 const nativeResponseValue = wasm.Filter_register_output(this_arg, output);
1731                 return nativeResponseValue;
1732         }
1733         public static class LDKCOption_FilterZ {
1734                 private LDKCOption_FilterZ() {}
1735                 export class Some extends LDKCOption_FilterZ {
1736                         public number some;
1737                         Some(number some) { this.some = some; }
1738                 }
1739                 export class None extends LDKCOption_FilterZ {
1740                         None() { }
1741                 }
1742                 static native void init();
1743         }
1744         static { LDKCOption_FilterZ.init(); }
1745         public static native LDKCOption_FilterZ LDKCOption_FilterZ_ref_from_ptr(long ptr);
1746         public static native boolean LDKCResult_LockedChannelMonitorNoneZ_result_ok(long arg);
1747         public static native number LDKCResult_LockedChannelMonitorNoneZ_get_ok(long arg);
1748         public static native void LDKCResult_LockedChannelMonitorNoneZ_get_err(long arg);
1749         public static native long LDKCVec_OutPointZ_new(number[] elems);
1750
1751
1752
1753 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1754
1755                 export interface LDKMessageSendEventsProvider {
1756                         get_and_clear_pending_msg_events (): number[];
1757                 }
1758
1759                 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1760             throw new Error('unimplemented'); // TODO: bind to WASM
1761         }
1762
1763 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1764
1765
1766         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1767         export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1768                 if(!isWasmInitialized) {
1769                         throw new Error("initializeWasm() must be awaited first!");
1770                 }
1771                 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1772                 return nativeResponseValue;
1773         }
1774
1775
1776
1777 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1778
1779                 export interface LDKEventHandler {
1780                         handle_event (event: number): void;
1781                 }
1782
1783                 export function LDKEventHandler_new(impl: LDKEventHandler): number {
1784             throw new Error('unimplemented'); // TODO: bind to WASM
1785         }
1786
1787 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1788
1789
1790         // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, const struct LDKEvent *NONNULL_PTR event
1791         export function EventHandler_handle_event(this_arg: number, event: number): void {
1792                 if(!isWasmInitialized) {
1793                         throw new Error("initializeWasm() must be awaited first!");
1794                 }
1795                 const nativeResponseValue = wasm.EventHandler_handle_event(this_arg, event);
1796                 // debug statements here
1797         }
1798
1799
1800
1801 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1802
1803                 export interface LDKEventsProvider {
1804                         process_pending_events (handler: number): void;
1805                 }
1806
1807                 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1808             throw new Error('unimplemented'); // TODO: bind to WASM
1809         }
1810
1811 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1812
1813
1814         // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
1815         export function EventsProvider_process_pending_events(this_arg: number, handler: number): void {
1816                 if(!isWasmInitialized) {
1817                         throw new Error("initializeWasm() must be awaited first!");
1818                 }
1819                 const nativeResponseValue = wasm.EventsProvider_process_pending_events(this_arg, handler);
1820                 // debug statements here
1821         }
1822
1823
1824
1825 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1826
1827                 export interface LDKListen {
1828                         block_connected (block: Uint8Array, height: number): void;
1829                         block_disconnected (header: Uint8Array, height: number): void;
1830                 }
1831
1832                 export function LDKListen_new(impl: LDKListen): number {
1833             throw new Error('unimplemented'); // TODO: bind to WASM
1834         }
1835
1836 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1837
1838
1839         // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1840         export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1841                 if(!isWasmInitialized) {
1842                         throw new Error("initializeWasm() must be awaited first!");
1843                 }
1844                 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1845                 // debug statements here
1846         }
1847         // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1848         export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1849                 if(!isWasmInitialized) {
1850                         throw new Error("initializeWasm() must be awaited first!");
1851                 }
1852                 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1853                 // debug statements here
1854         }
1855
1856
1857
1858 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1859
1860                 export interface LDKConfirm {
1861                         transactions_confirmed (header: Uint8Array, txdata: number[], height: number): void;
1862                         transaction_unconfirmed (txid: Uint8Array): void;
1863                         best_block_updated (header: Uint8Array, height: number): void;
1864                         get_relevant_txids (): Uint8Array[];
1865                 }
1866
1867                 export function LDKConfirm_new(impl: LDKConfirm): number {
1868             throw new Error('unimplemented'); // TODO: bind to WASM
1869         }
1870
1871 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1872
1873
1874         // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
1875         export function Confirm_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
1876                 if(!isWasmInitialized) {
1877                         throw new Error("initializeWasm() must be awaited first!");
1878                 }
1879                 const nativeResponseValue = wasm.Confirm_transactions_confirmed(this_arg, encodeArray(header), txdata, height);
1880                 // debug statements here
1881         }
1882         // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
1883         export function Confirm_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
1884                 if(!isWasmInitialized) {
1885                         throw new Error("initializeWasm() must be awaited first!");
1886                 }
1887                 const nativeResponseValue = wasm.Confirm_transaction_unconfirmed(this_arg, encodeArray(txid));
1888                 // debug statements here
1889         }
1890         // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1891         export function Confirm_best_block_updated(this_arg: number, header: Uint8Array, height: number): void {
1892                 if(!isWasmInitialized) {
1893                         throw new Error("initializeWasm() must be awaited first!");
1894                 }
1895                 const nativeResponseValue = wasm.Confirm_best_block_updated(this_arg, encodeArray(header), height);
1896                 // debug statements here
1897         }
1898         // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
1899         export function Confirm_get_relevant_txids(this_arg: number): Uint8Array[] {
1900                 if(!isWasmInitialized) {
1901                         throw new Error("initializeWasm() must be awaited first!");
1902                 }
1903                 const nativeResponseValue = wasm.Confirm_get_relevant_txids(this_arg);
1904                 return nativeResponseValue;
1905         }
1906
1907
1908
1909 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1910
1911                 export interface LDKPersist {
1912                         persist_new_channel (id: number, data: number): number;
1913                         update_persisted_channel (id: number, update: number, data: number): number;
1914                 }
1915
1916                 export function LDKPersist_new(impl: LDKPersist): number {
1917             throw new Error('unimplemented'); // TODO: bind to WASM
1918         }
1919
1920 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1921
1922
1923         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1924         export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1925                 if(!isWasmInitialized) {
1926                         throw new Error("initializeWasm() must be awaited first!");
1927                 }
1928                 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1929                 return nativeResponseValue;
1930         }
1931         // 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
1932         export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1933                 if(!isWasmInitialized) {
1934                         throw new Error("initializeWasm() must be awaited first!");
1935                 }
1936                 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1937                 return nativeResponseValue;
1938         }
1939
1940
1941
1942 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1943
1944                 export interface LDKChannelMessageHandler {
1945                         handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1946                         handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1947                         handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1948                         handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1949                         handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1950                         handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1951                         handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1952                         handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1953                         handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1954                         handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1955                         handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1956                         handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1957                         handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1958                         handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1959                         handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1960                         peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1961                         peer_connected (their_node_id: Uint8Array, msg: number): void;
1962                         handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1963                         handle_channel_update (their_node_id: Uint8Array, msg: number): void;
1964                         handle_error (their_node_id: Uint8Array, msg: number): void;
1965                 }
1966
1967                 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1968             throw new Error('unimplemented'); // TODO: bind to WASM
1969         }
1970
1971 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1972
1973
1974         // 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
1975         export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1976                 if(!isWasmInitialized) {
1977                         throw new Error("initializeWasm() must be awaited first!");
1978                 }
1979                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1980                 // debug statements here
1981         }
1982         // 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
1983         export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1984                 if(!isWasmInitialized) {
1985                         throw new Error("initializeWasm() must be awaited first!");
1986                 }
1987                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1988                 // debug statements here
1989         }
1990         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1991         export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1992                 if(!isWasmInitialized) {
1993                         throw new Error("initializeWasm() must be awaited first!");
1994                 }
1995                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1996                 // debug statements here
1997         }
1998         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1999         export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2000                 if(!isWasmInitialized) {
2001                         throw new Error("initializeWasm() must be awaited first!");
2002                 }
2003                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
2004                 // debug statements here
2005         }
2006         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
2007         export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2008                 if(!isWasmInitialized) {
2009                         throw new Error("initializeWasm() must be awaited first!");
2010                 }
2011                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
2012                 // debug statements here
2013         }
2014         // 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
2015         export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
2016                 if(!isWasmInitialized) {
2017                         throw new Error("initializeWasm() must be awaited first!");
2018                 }
2019                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
2020                 // debug statements here
2021         }
2022         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
2023         export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2024                 if(!isWasmInitialized) {
2025                         throw new Error("initializeWasm() must be awaited first!");
2026                 }
2027                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
2028                 // debug statements here
2029         }
2030         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
2031         export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2032                 if(!isWasmInitialized) {
2033                         throw new Error("initializeWasm() must be awaited first!");
2034                 }
2035                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
2036                 // debug statements here
2037         }
2038         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
2039         export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2040                 if(!isWasmInitialized) {
2041                         throw new Error("initializeWasm() must be awaited first!");
2042                 }
2043                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
2044                 // debug statements here
2045         }
2046         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
2047         export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2048                 if(!isWasmInitialized) {
2049                         throw new Error("initializeWasm() must be awaited first!");
2050                 }
2051                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
2052                 // debug statements here
2053         }
2054         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
2055         export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2056                 if(!isWasmInitialized) {
2057                         throw new Error("initializeWasm() must be awaited first!");
2058                 }
2059                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
2060                 // debug statements here
2061         }
2062         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
2063         export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2064                 if(!isWasmInitialized) {
2065                         throw new Error("initializeWasm() must be awaited first!");
2066                 }
2067                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
2068                 // debug statements here
2069         }
2070         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
2071         export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2072                 if(!isWasmInitialized) {
2073                         throw new Error("initializeWasm() must be awaited first!");
2074                 }
2075                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
2076                 // debug statements here
2077         }
2078         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
2079         export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2080                 if(!isWasmInitialized) {
2081                         throw new Error("initializeWasm() must be awaited first!");
2082                 }
2083                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
2084                 // debug statements here
2085         }
2086         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
2087         export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2088                 if(!isWasmInitialized) {
2089                         throw new Error("initializeWasm() must be awaited first!");
2090                 }
2091                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
2092                 // debug statements here
2093         }
2094         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
2095         export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
2096                 if(!isWasmInitialized) {
2097                         throw new Error("initializeWasm() must be awaited first!");
2098                 }
2099                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
2100                 // debug statements here
2101         }
2102         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
2103         export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2104                 if(!isWasmInitialized) {
2105                         throw new Error("initializeWasm() must be awaited first!");
2106                 }
2107                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
2108                 // debug statements here
2109         }
2110         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
2111         export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2112                 if(!isWasmInitialized) {
2113                         throw new Error("initializeWasm() must be awaited first!");
2114                 }
2115                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
2116                 // debug statements here
2117         }
2118         // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
2119         export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2120                 if(!isWasmInitialized) {
2121                         throw new Error("initializeWasm() must be awaited first!");
2122                 }
2123                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_update(this_arg, encodeArray(their_node_id), msg);
2124                 // debug statements here
2125         }
2126         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
2127         export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2128                 if(!isWasmInitialized) {
2129                         throw new Error("initializeWasm() must be awaited first!");
2130                 }
2131                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
2132                 // debug statements here
2133         }
2134
2135
2136
2137 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2138
2139                 export interface LDKRoutingMessageHandler {
2140                         handle_node_announcement (msg: number): number;
2141                         handle_channel_announcement (msg: number): number;
2142                         handle_channel_update (msg: number): number;
2143                         get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
2144                         get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
2145                         sync_routing_table (their_node_id: Uint8Array, init: number): void;
2146                         handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
2147                         handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
2148                         handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
2149                         handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
2150                 }
2151
2152                 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
2153             throw new Error('unimplemented'); // TODO: bind to WASM
2154         }
2155
2156 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2157
2158
2159         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
2160         export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
2161                 if(!isWasmInitialized) {
2162                         throw new Error("initializeWasm() must be awaited first!");
2163                 }
2164                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
2165                 return nativeResponseValue;
2166         }
2167         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
2168         export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
2169                 if(!isWasmInitialized) {
2170                         throw new Error("initializeWasm() must be awaited first!");
2171                 }
2172                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
2173                 return nativeResponseValue;
2174         }
2175         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
2176         export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
2177                 if(!isWasmInitialized) {
2178                         throw new Error("initializeWasm() must be awaited first!");
2179                 }
2180                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
2181                 return nativeResponseValue;
2182         }
2183         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
2184         export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
2185                 if(!isWasmInitialized) {
2186                         throw new Error("initializeWasm() must be awaited first!");
2187                 }
2188                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
2189                 return nativeResponseValue;
2190         }
2191         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
2192         export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
2193                 if(!isWasmInitialized) {
2194                         throw new Error("initializeWasm() must be awaited first!");
2195                 }
2196                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
2197                 return nativeResponseValue;
2198         }
2199         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
2200         export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
2201                 if(!isWasmInitialized) {
2202                         throw new Error("initializeWasm() must be awaited first!");
2203                 }
2204                 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
2205                 // debug statements here
2206         }
2207         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
2208         export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2209                 if(!isWasmInitialized) {
2210                         throw new Error("initializeWasm() must be awaited first!");
2211                 }
2212                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
2213                 return nativeResponseValue;
2214         }
2215         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
2216         export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2217                 if(!isWasmInitialized) {
2218                         throw new Error("initializeWasm() must be awaited first!");
2219                 }
2220                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
2221                 return nativeResponseValue;
2222         }
2223         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
2224         export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2225                 if(!isWasmInitialized) {
2226                         throw new Error("initializeWasm() must be awaited first!");
2227                 }
2228                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
2229                 return nativeResponseValue;
2230         }
2231         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
2232         export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2233                 if(!isWasmInitialized) {
2234                         throw new Error("initializeWasm() must be awaited first!");
2235                 }
2236                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
2237                 return nativeResponseValue;
2238         }
2239
2240
2241
2242 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2243
2244                 export interface LDKCustomMessageReader {
2245                         read (message_type: number, buffer: Uint8Array): number;
2246                 }
2247
2248                 export function LDKCustomMessageReader_new(impl: LDKCustomMessageReader): number {
2249             throw new Error('unimplemented'); // TODO: bind to WASM
2250         }
2251
2252 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2253
2254
2255         // LDKCResult_COption_TypeZDecodeErrorZ CustomMessageReader_read LDKCustomMessageReader *NONNULL_PTR this_arg, uint16_t message_type, struct LDKu8slice buffer
2256         export function CustomMessageReader_read(this_arg: number, message_type: number, buffer: Uint8Array): number {
2257                 if(!isWasmInitialized) {
2258                         throw new Error("initializeWasm() must be awaited first!");
2259                 }
2260                 const nativeResponseValue = wasm.CustomMessageReader_read(this_arg, message_type, encodeArray(buffer));
2261                 return nativeResponseValue;
2262         }
2263
2264
2265
2266 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2267
2268                 export interface LDKCustomMessageHandler {
2269                         handle_custom_message (msg: number, sender_node_id: Uint8Array): number;
2270                         get_and_clear_pending_msg (): number[];
2271                 }
2272
2273                 export function LDKCustomMessageHandler_new(impl: LDKCustomMessageHandler, CustomMessageReader: LDKCustomMessageReader): number {
2274             throw new Error('unimplemented'); // TODO: bind to WASM
2275         }
2276
2277 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2278
2279
2280         // LDKCResult_NoneLightningErrorZ CustomMessageHandler_handle_custom_message LDKCustomMessageHandler *NONNULL_PTR this_arg, struct LDKType msg, struct LDKPublicKey sender_node_id
2281         export function CustomMessageHandler_handle_custom_message(this_arg: number, msg: number, sender_node_id: Uint8Array): number {
2282                 if(!isWasmInitialized) {
2283                         throw new Error("initializeWasm() must be awaited first!");
2284                 }
2285                 const nativeResponseValue = wasm.CustomMessageHandler_handle_custom_message(this_arg, msg, encodeArray(sender_node_id));
2286                 return nativeResponseValue;
2287         }
2288         // LDKCVec_C2Tuple_PublicKeyTypeZZ CustomMessageHandler_get_and_clear_pending_msg LDKCustomMessageHandler *NONNULL_PTR this_arg
2289         export function CustomMessageHandler_get_and_clear_pending_msg(this_arg: number): number[] {
2290                 if(!isWasmInitialized) {
2291                         throw new Error("initializeWasm() must be awaited first!");
2292                 }
2293                 const nativeResponseValue = wasm.CustomMessageHandler_get_and_clear_pending_msg(this_arg);
2294                 return nativeResponseValue;
2295         }
2296
2297
2298
2299 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2300
2301                 export interface LDKSocketDescriptor {
2302                         send_data (data: Uint8Array, resume_read: boolean): number;
2303                         disconnect_socket (): void;
2304                         eq (other_arg: number): boolean;
2305                         hash (): number;
2306                 }
2307
2308                 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
2309             throw new Error('unimplemented'); // TODO: bind to WASM
2310         }
2311
2312 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2313
2314
2315         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
2316         export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
2317                 if(!isWasmInitialized) {
2318                         throw new Error("initializeWasm() must be awaited first!");
2319                 }
2320                 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
2321                 return nativeResponseValue;
2322         }
2323         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
2324         export function SocketDescriptor_disconnect_socket(this_arg: number): void {
2325                 if(!isWasmInitialized) {
2326                         throw new Error("initializeWasm() must be awaited first!");
2327                 }
2328                 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
2329                 // debug statements here
2330         }
2331         // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
2332         export function SocketDescriptor_hash(this_arg: number): number {
2333                 if(!isWasmInitialized) {
2334                         throw new Error("initializeWasm() must be awaited first!");
2335                 }
2336                 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
2337                 return nativeResponseValue;
2338         }
2339
2340
2341
2342 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2343
2344                 export interface LDKScore {
2345                         channel_penalty_msat (short_channel_id: number): number;
2346                 }
2347
2348                 export function LDKScore_new(impl: LDKScore): number {
2349             throw new Error('unimplemented'); // TODO: bind to WASM
2350         }
2351
2352 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2353
2354
2355         // uint64_t Score_channel_penalty_msat LDKScore *NONNULL_PTR this_arg, uint64_t short_channel_id
2356         export function Score_channel_penalty_msat(this_arg: number, short_channel_id: number): number {
2357                 if(!isWasmInitialized) {
2358                         throw new Error("initializeWasm() must be awaited first!");
2359                 }
2360                 const nativeResponseValue = wasm.Score_channel_penalty_msat(this_arg, short_channel_id);
2361                 return nativeResponseValue;
2362         }
2363
2364
2365
2366 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2367
2368                 export interface LDKChannelManagerPersister {
2369                         persist_manager (channel_manager: number): number;
2370                 }
2371
2372                 export function LDKChannelManagerPersister_new(impl: LDKChannelManagerPersister): number {
2373             throw new Error('unimplemented'); // TODO: bind to WASM
2374         }
2375
2376 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2377
2378
2379         // LDKCResult_NoneErrorZ ChannelManagerPersister_persist_manager LDKChannelManagerPersister *NONNULL_PTR this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager
2380         export function ChannelManagerPersister_persist_manager(this_arg: number, channel_manager: number): number {
2381                 if(!isWasmInitialized) {
2382                         throw new Error("initializeWasm() must be awaited first!");
2383                 }
2384                 const nativeResponseValue = wasm.ChannelManagerPersister_persist_manager(this_arg, channel_manager);
2385                 return nativeResponseValue;
2386         }
2387         public static class LDKFallback {
2388                 private LDKFallback() {}
2389                 export class SegWitProgram extends LDKFallback {
2390                         public number version;
2391                         public Uint8Array program;
2392                         SegWitProgram(number version, Uint8Array program) { this.version = version; this.program = program; }
2393                 }
2394                 export class PubKeyHash extends LDKFallback {
2395                         public Uint8Array pub_key_hash;
2396                         PubKeyHash(Uint8Array pub_key_hash) { this.pub_key_hash = pub_key_hash; }
2397                 }
2398                 export class ScriptHash extends LDKFallback {
2399                         public Uint8Array script_hash;
2400                         ScriptHash(Uint8Array script_hash) { this.script_hash = script_hash; }
2401                 }
2402                 static native void init();
2403         }
2404         static { LDKFallback.init(); }
2405         public static native LDKFallback LDKFallback_ref_from_ptr(long ptr);
2406         // struct LDKStr _ldk_get_compiled_version(void);
2407         export function _ldk_get_compiled_version(): String {
2408                 if(!isWasmInitialized) {
2409                         throw new Error("initializeWasm() must be awaited first!");
2410                 }
2411                 const nativeResponseValue = wasm._ldk_get_compiled_version();
2412                 return nativeResponseValue;
2413         }
2414         // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
2415         export function _ldk_c_bindings_get_compiled_version(): String {
2416                 if(!isWasmInitialized) {
2417                         throw new Error("initializeWasm() must be awaited first!");
2418                 }
2419                 const nativeResponseValue = wasm._ldk_c_bindings_get_compiled_version();
2420                 return nativeResponseValue;
2421         }
2422         // void Transaction_free(struct LDKTransaction _res);
2423         export function Transaction_free(_res: Uint8Array): void {
2424                 if(!isWasmInitialized) {
2425                         throw new Error("initializeWasm() must be awaited first!");
2426                 }
2427                 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
2428                 // debug statements here
2429         }
2430         // struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
2431         export function TxOut_new(script_pubkey: Uint8Array, value: number): number {
2432                 if(!isWasmInitialized) {
2433                         throw new Error("initializeWasm() must be awaited first!");
2434                 }
2435                 const nativeResponseValue = wasm.TxOut_new(encodeArray(script_pubkey), value);
2436                 return nativeResponseValue;
2437         }
2438         // void TxOut_free(struct LDKTxOut _res);
2439         export function TxOut_free(_res: number): void {
2440                 if(!isWasmInitialized) {
2441                         throw new Error("initializeWasm() must be awaited first!");
2442                 }
2443                 const nativeResponseValue = wasm.TxOut_free(_res);
2444                 // debug statements here
2445         }
2446         // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
2447         export function TxOut_clone(orig: number): number {
2448                 if(!isWasmInitialized) {
2449                         throw new Error("initializeWasm() must be awaited first!");
2450                 }
2451                 const nativeResponseValue = wasm.TxOut_clone(orig);
2452                 return nativeResponseValue;
2453         }
2454         // void Str_free(struct LDKStr _res);
2455         export function Str_free(_res: String): void {
2456                 if(!isWasmInitialized) {
2457                         throw new Error("initializeWasm() must be awaited first!");
2458                 }
2459                 const nativeResponseValue = wasm.Str_free(_res);
2460                 // debug statements here
2461         }
2462         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
2463         export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
2464                 if(!isWasmInitialized) {
2465                         throw new Error("initializeWasm() must be awaited first!");
2466                 }
2467                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
2468                 return nativeResponseValue;
2469         }
2470         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
2471         export function CResult_SecretKeyErrorZ_err(e: Secp256k1Error): number {
2472                 if(!isWasmInitialized) {
2473                         throw new Error("initializeWasm() must be awaited first!");
2474                 }
2475                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
2476                 return nativeResponseValue;
2477         }
2478         // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
2479         export function CResult_SecretKeyErrorZ_free(_res: number): void {
2480                 if(!isWasmInitialized) {
2481                         throw new Error("initializeWasm() must be awaited first!");
2482                 }
2483                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
2484                 // debug statements here
2485         }
2486         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
2487         export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
2488                 if(!isWasmInitialized) {
2489                         throw new Error("initializeWasm() must be awaited first!");
2490                 }
2491                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
2492                 return nativeResponseValue;
2493         }
2494         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
2495         export function CResult_PublicKeyErrorZ_err(e: Secp256k1Error): number {
2496                 if(!isWasmInitialized) {
2497                         throw new Error("initializeWasm() must be awaited first!");
2498                 }
2499                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
2500                 return nativeResponseValue;
2501         }
2502         // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
2503         export function CResult_PublicKeyErrorZ_free(_res: number): void {
2504                 if(!isWasmInitialized) {
2505                         throw new Error("initializeWasm() must be awaited first!");
2506                 }
2507                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
2508                 // debug statements here
2509         }
2510         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
2511         export function CResult_PublicKeyErrorZ_clone(orig: number): number {
2512                 if(!isWasmInitialized) {
2513                         throw new Error("initializeWasm() must be awaited first!");
2514                 }
2515                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_clone(orig);
2516                 return nativeResponseValue;
2517         }
2518         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
2519         export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
2520                 if(!isWasmInitialized) {
2521                         throw new Error("initializeWasm() must be awaited first!");
2522                 }
2523                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
2524                 return nativeResponseValue;
2525         }
2526         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
2527         export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
2528                 if(!isWasmInitialized) {
2529                         throw new Error("initializeWasm() must be awaited first!");
2530                 }
2531                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
2532                 return nativeResponseValue;
2533         }
2534         // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
2535         export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
2536                 if(!isWasmInitialized) {
2537                         throw new Error("initializeWasm() must be awaited first!");
2538                 }
2539                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
2540                 // debug statements here
2541         }
2542         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
2543         export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
2544                 if(!isWasmInitialized) {
2545                         throw new Error("initializeWasm() must be awaited first!");
2546                 }
2547                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
2548                 return nativeResponseValue;
2549         }
2550         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
2551         export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
2552                 if(!isWasmInitialized) {
2553                         throw new Error("initializeWasm() must be awaited first!");
2554                 }
2555                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
2556                 return nativeResponseValue;
2557         }
2558         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
2559         export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
2560                 if(!isWasmInitialized) {
2561                         throw new Error("initializeWasm() must be awaited first!");
2562                 }
2563                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
2564                 return nativeResponseValue;
2565         }
2566         // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
2567         export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
2568                 if(!isWasmInitialized) {
2569                         throw new Error("initializeWasm() must be awaited first!");
2570                 }
2571                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
2572                 // debug statements here
2573         }
2574         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
2575         export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
2576                 if(!isWasmInitialized) {
2577                         throw new Error("initializeWasm() must be awaited first!");
2578                 }
2579                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
2580                 return nativeResponseValue;
2581         }
2582         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
2583         export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
2584                 if(!isWasmInitialized) {
2585                         throw new Error("initializeWasm() must be awaited first!");
2586                 }
2587                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
2588                 return nativeResponseValue;
2589         }
2590         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
2591         export function CResult_TxCreationKeysErrorZ_err(e: Secp256k1Error): number {
2592                 if(!isWasmInitialized) {
2593                         throw new Error("initializeWasm() must be awaited first!");
2594                 }
2595                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
2596                 return nativeResponseValue;
2597         }
2598         // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
2599         export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
2600                 if(!isWasmInitialized) {
2601                         throw new Error("initializeWasm() must be awaited first!");
2602                 }
2603                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
2604                 // debug statements here
2605         }
2606         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
2607         export function CResult_TxCreationKeysErrorZ_clone(orig: number): number {
2608                 if(!isWasmInitialized) {
2609                         throw new Error("initializeWasm() must be awaited first!");
2610                 }
2611                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_clone(orig);
2612                 return nativeResponseValue;
2613         }
2614         // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
2615         export function COption_u32Z_some(o: number): number {
2616                 if(!isWasmInitialized) {
2617                         throw new Error("initializeWasm() must be awaited first!");
2618                 }
2619                 const nativeResponseValue = wasm.COption_u32Z_some(o);
2620                 return nativeResponseValue;
2621         }
2622         // struct LDKCOption_u32Z COption_u32Z_none(void);
2623         export function COption_u32Z_none(): number {
2624                 if(!isWasmInitialized) {
2625                         throw new Error("initializeWasm() must be awaited first!");
2626                 }
2627                 const nativeResponseValue = wasm.COption_u32Z_none();
2628                 return nativeResponseValue;
2629         }
2630         // void COption_u32Z_free(struct LDKCOption_u32Z _res);
2631         export function COption_u32Z_free(_res: number): void {
2632                 if(!isWasmInitialized) {
2633                         throw new Error("initializeWasm() must be awaited first!");
2634                 }
2635                 const nativeResponseValue = wasm.COption_u32Z_free(_res);
2636                 // debug statements here
2637         }
2638         // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
2639         export function COption_u32Z_clone(orig: number): number {
2640                 if(!isWasmInitialized) {
2641                         throw new Error("initializeWasm() must be awaited first!");
2642                 }
2643                 const nativeResponseValue = wasm.COption_u32Z_clone(orig);
2644                 return nativeResponseValue;
2645         }
2646         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
2647         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
2648                 if(!isWasmInitialized) {
2649                         throw new Error("initializeWasm() must be awaited first!");
2650                 }
2651                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
2652                 return nativeResponseValue;
2653         }
2654         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
2655         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
2656                 if(!isWasmInitialized) {
2657                         throw new Error("initializeWasm() must be awaited first!");
2658                 }
2659                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
2660                 return nativeResponseValue;
2661         }
2662         // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
2663         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
2664                 if(!isWasmInitialized) {
2665                         throw new Error("initializeWasm() must be awaited first!");
2666                 }
2667                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
2668                 // debug statements here
2669         }
2670         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
2671         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
2672                 if(!isWasmInitialized) {
2673                         throw new Error("initializeWasm() must be awaited first!");
2674                 }
2675                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
2676                 return nativeResponseValue;
2677         }
2678         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
2679         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2680                 if(!isWasmInitialized) {
2681                         throw new Error("initializeWasm() must be awaited first!");
2682                 }
2683                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
2684                 return nativeResponseValue;
2685         }
2686         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2687         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2688                 if(!isWasmInitialized) {
2689                         throw new Error("initializeWasm() must be awaited first!");
2690                 }
2691                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
2692                 return nativeResponseValue;
2693         }
2694         // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
2695         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2696                 if(!isWasmInitialized) {
2697                         throw new Error("initializeWasm() must be awaited first!");
2698                 }
2699                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
2700                 // debug statements here
2701         }
2702         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2703         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2704                 if(!isWasmInitialized) {
2705                         throw new Error("initializeWasm() must be awaited first!");
2706                 }
2707                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
2708                 return nativeResponseValue;
2709         }
2710         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
2711         export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2712                 if(!isWasmInitialized) {
2713                         throw new Error("initializeWasm() must be awaited first!");
2714                 }
2715                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
2716                 return nativeResponseValue;
2717         }
2718         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2719         export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2720                 if(!isWasmInitialized) {
2721                         throw new Error("initializeWasm() must be awaited first!");
2722                 }
2723                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
2724                 return nativeResponseValue;
2725         }
2726         // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
2727         export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2728                 if(!isWasmInitialized) {
2729                         throw new Error("initializeWasm() must be awaited first!");
2730                 }
2731                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
2732                 // debug statements here
2733         }
2734         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2735         export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2736                 if(!isWasmInitialized) {
2737                         throw new Error("initializeWasm() must be awaited first!");
2738                 }
2739                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
2740                 return nativeResponseValue;
2741         }
2742         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
2743         export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
2744                 if(!isWasmInitialized) {
2745                         throw new Error("initializeWasm() must be awaited first!");
2746                 }
2747                 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
2748                 // debug statements here
2749         }
2750         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
2751         export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2752                 if(!isWasmInitialized) {
2753                         throw new Error("initializeWasm() must be awaited first!");
2754                 }
2755                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
2756                 return nativeResponseValue;
2757         }
2758         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2759         export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
2760                 if(!isWasmInitialized) {
2761                         throw new Error("initializeWasm() must be awaited first!");
2762                 }
2763                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
2764                 return nativeResponseValue;
2765         }
2766         // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
2767         export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2768                 if(!isWasmInitialized) {
2769                         throw new Error("initializeWasm() must be awaited first!");
2770                 }
2771                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
2772                 // debug statements here
2773         }
2774         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2775         export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2776                 if(!isWasmInitialized) {
2777                         throw new Error("initializeWasm() must be awaited first!");
2778                 }
2779                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
2780                 return nativeResponseValue;
2781         }
2782         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
2783         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2784                 if(!isWasmInitialized) {
2785                         throw new Error("initializeWasm() must be awaited first!");
2786                 }
2787                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
2788                 return nativeResponseValue;
2789         }
2790         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2791         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
2792                 if(!isWasmInitialized) {
2793                         throw new Error("initializeWasm() must be awaited first!");
2794                 }
2795                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
2796                 return nativeResponseValue;
2797         }
2798         // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
2799         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2800                 if(!isWasmInitialized) {
2801                         throw new Error("initializeWasm() must be awaited first!");
2802                 }
2803                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
2804                 // debug statements here
2805         }
2806         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2807         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2808                 if(!isWasmInitialized) {
2809                         throw new Error("initializeWasm() must be awaited first!");
2810                 }
2811                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
2812                 return nativeResponseValue;
2813         }
2814         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_ok(struct LDKTrustedClosingTransaction o);
2815         export function CResult_TrustedClosingTransactionNoneZ_ok(o: number): number {
2816                 if(!isWasmInitialized) {
2817                         throw new Error("initializeWasm() must be awaited first!");
2818                 }
2819                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_ok(o);
2820                 return nativeResponseValue;
2821         }
2822         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_err(void);
2823         export function CResult_TrustedClosingTransactionNoneZ_err(): number {
2824                 if(!isWasmInitialized) {
2825                         throw new Error("initializeWasm() must be awaited first!");
2826                 }
2827                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_err();
2828                 return nativeResponseValue;
2829         }
2830         // void CResult_TrustedClosingTransactionNoneZ_free(struct LDKCResult_TrustedClosingTransactionNoneZ _res);
2831         export function CResult_TrustedClosingTransactionNoneZ_free(_res: number): void {
2832                 if(!isWasmInitialized) {
2833                         throw new Error("initializeWasm() must be awaited first!");
2834                 }
2835                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_free(_res);
2836                 // debug statements here
2837         }
2838         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
2839         export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
2840                 if(!isWasmInitialized) {
2841                         throw new Error("initializeWasm() must be awaited first!");
2842                 }
2843                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
2844                 return nativeResponseValue;
2845         }
2846         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2847         export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
2848                 if(!isWasmInitialized) {
2849                         throw new Error("initializeWasm() must be awaited first!");
2850                 }
2851                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
2852                 return nativeResponseValue;
2853         }
2854         // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
2855         export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
2856                 if(!isWasmInitialized) {
2857                         throw new Error("initializeWasm() must be awaited first!");
2858                 }
2859                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
2860                 // debug statements here
2861         }
2862         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2863         export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2864                 if(!isWasmInitialized) {
2865                         throw new Error("initializeWasm() must be awaited first!");
2866                 }
2867                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
2868                 return nativeResponseValue;
2869         }
2870         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
2871         export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
2872                 if(!isWasmInitialized) {
2873                         throw new Error("initializeWasm() must be awaited first!");
2874                 }
2875                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
2876                 return nativeResponseValue;
2877         }
2878         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
2879         export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
2880                 if(!isWasmInitialized) {
2881                         throw new Error("initializeWasm() must be awaited first!");
2882                 }
2883                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
2884                 return nativeResponseValue;
2885         }
2886         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
2887         export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
2888                 if(!isWasmInitialized) {
2889                         throw new Error("initializeWasm() must be awaited first!");
2890                 }
2891                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
2892                 // debug statements here
2893         }
2894         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
2895         export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
2896                 if(!isWasmInitialized) {
2897                         throw new Error("initializeWasm() must be awaited first!");
2898                 }
2899                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
2900                 return nativeResponseValue;
2901         }
2902         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
2903         export function CResult_CVec_SignatureZNoneZ_err(): number {
2904                 if(!isWasmInitialized) {
2905                         throw new Error("initializeWasm() must be awaited first!");
2906                 }
2907                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
2908                 return nativeResponseValue;
2909         }
2910         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
2911         export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
2912                 if(!isWasmInitialized) {
2913                         throw new Error("initializeWasm() must be awaited first!");
2914                 }
2915                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
2916                 // debug statements here
2917         }
2918         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
2919         export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
2920                 if(!isWasmInitialized) {
2921                         throw new Error("initializeWasm() must be awaited first!");
2922                 }
2923                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
2924                 return nativeResponseValue;
2925         }
2926         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_ok(struct LDKShutdownScript o);
2927         export function CResult_ShutdownScriptDecodeErrorZ_ok(o: number): number {
2928                 if(!isWasmInitialized) {
2929                         throw new Error("initializeWasm() must be awaited first!");
2930                 }
2931                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_ok(o);
2932                 return nativeResponseValue;
2933         }
2934         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_err(struct LDKDecodeError e);
2935         export function CResult_ShutdownScriptDecodeErrorZ_err(e: number): number {
2936                 if(!isWasmInitialized) {
2937                         throw new Error("initializeWasm() must be awaited first!");
2938                 }
2939                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_err(e);
2940                 return nativeResponseValue;
2941         }
2942         // void CResult_ShutdownScriptDecodeErrorZ_free(struct LDKCResult_ShutdownScriptDecodeErrorZ _res);
2943         export function CResult_ShutdownScriptDecodeErrorZ_free(_res: number): void {
2944                 if(!isWasmInitialized) {
2945                         throw new Error("initializeWasm() must be awaited first!");
2946                 }
2947                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_free(_res);
2948                 // debug statements here
2949         }
2950         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_clone(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR orig);
2951         export function CResult_ShutdownScriptDecodeErrorZ_clone(orig: number): number {
2952                 if(!isWasmInitialized) {
2953                         throw new Error("initializeWasm() must be awaited first!");
2954                 }
2955                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_clone(orig);
2956                 return nativeResponseValue;
2957         }
2958         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_ok(struct LDKShutdownScript o);
2959         export function CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o: number): number {
2960                 if(!isWasmInitialized) {
2961                         throw new Error("initializeWasm() must be awaited first!");
2962                 }
2963                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o);
2964                 return nativeResponseValue;
2965         }
2966         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_err(struct LDKInvalidShutdownScript e);
2967         export function CResult_ShutdownScriptInvalidShutdownScriptZ_err(e: number): number {
2968                 if(!isWasmInitialized) {
2969                         throw new Error("initializeWasm() must be awaited first!");
2970                 }
2971                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_err(e);
2972                 return nativeResponseValue;
2973         }
2974         // void CResult_ShutdownScriptInvalidShutdownScriptZ_free(struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ _res);
2975         export function CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res: number): void {
2976                 if(!isWasmInitialized) {
2977                         throw new Error("initializeWasm() must be awaited first!");
2978                 }
2979                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res);
2980                 // debug statements here
2981         }
2982         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
2983         export function CResult_NoneErrorZ_ok(): number {
2984                 if(!isWasmInitialized) {
2985                         throw new Error("initializeWasm() must be awaited first!");
2986                 }
2987                 const nativeResponseValue = wasm.CResult_NoneErrorZ_ok();
2988                 return nativeResponseValue;
2989         }
2990         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
2991         export function CResult_NoneErrorZ_err(e: IOError): number {
2992                 if(!isWasmInitialized) {
2993                         throw new Error("initializeWasm() must be awaited first!");
2994                 }
2995                 const nativeResponseValue = wasm.CResult_NoneErrorZ_err(e);
2996                 return nativeResponseValue;
2997         }
2998         // void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
2999         export function CResult_NoneErrorZ_free(_res: number): void {
3000                 if(!isWasmInitialized) {
3001                         throw new Error("initializeWasm() must be awaited first!");
3002                 }
3003                 const nativeResponseValue = wasm.CResult_NoneErrorZ_free(_res);
3004                 // debug statements here
3005         }
3006         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig);
3007         export function CResult_NoneErrorZ_clone(orig: number): number {
3008                 if(!isWasmInitialized) {
3009                         throw new Error("initializeWasm() must be awaited first!");
3010                 }
3011                 const nativeResponseValue = wasm.CResult_NoneErrorZ_clone(orig);
3012                 return nativeResponseValue;
3013         }
3014         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
3015         export function CResult_RouteHopDecodeErrorZ_ok(o: number): number {
3016                 if(!isWasmInitialized) {
3017                         throw new Error("initializeWasm() must be awaited first!");
3018                 }
3019                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_ok(o);
3020                 return nativeResponseValue;
3021         }
3022         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
3023         export function CResult_RouteHopDecodeErrorZ_err(e: number): number {
3024                 if(!isWasmInitialized) {
3025                         throw new Error("initializeWasm() must be awaited first!");
3026                 }
3027                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_err(e);
3028                 return nativeResponseValue;
3029         }
3030         // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
3031         export function CResult_RouteHopDecodeErrorZ_free(_res: number): void {
3032                 if(!isWasmInitialized) {
3033                         throw new Error("initializeWasm() must be awaited first!");
3034                 }
3035                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_free(_res);
3036                 // debug statements here
3037         }
3038         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
3039         export function CResult_RouteHopDecodeErrorZ_clone(orig: number): number {
3040                 if(!isWasmInitialized) {
3041                         throw new Error("initializeWasm() must be awaited first!");
3042                 }
3043                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_clone(orig);
3044                 return nativeResponseValue;
3045         }
3046         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
3047         export function CVec_RouteHopZ_free(_res: number[]): void {
3048                 if(!isWasmInitialized) {
3049                         throw new Error("initializeWasm() must be awaited first!");
3050                 }
3051                 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
3052                 // debug statements here
3053         }
3054         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
3055         export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
3056                 if(!isWasmInitialized) {
3057                         throw new Error("initializeWasm() must be awaited first!");
3058                 }
3059                 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
3060                 // debug statements here
3061         }
3062         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
3063         export function CResult_RouteDecodeErrorZ_ok(o: number): number {
3064                 if(!isWasmInitialized) {
3065                         throw new Error("initializeWasm() must be awaited first!");
3066                 }
3067                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
3068                 return nativeResponseValue;
3069         }
3070         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
3071         export function CResult_RouteDecodeErrorZ_err(e: number): number {
3072                 if(!isWasmInitialized) {
3073                         throw new Error("initializeWasm() must be awaited first!");
3074                 }
3075                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
3076                 return nativeResponseValue;
3077         }
3078         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
3079         export function CResult_RouteDecodeErrorZ_free(_res: number): void {
3080                 if(!isWasmInitialized) {
3081                         throw new Error("initializeWasm() must be awaited first!");
3082                 }
3083                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
3084                 // debug statements here
3085         }
3086         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
3087         export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
3088                 if(!isWasmInitialized) {
3089                         throw new Error("initializeWasm() must be awaited first!");
3090                 }
3091                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
3092                 return nativeResponseValue;
3093         }
3094         // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
3095         export function COption_u64Z_some(o: number): number {
3096                 if(!isWasmInitialized) {
3097                         throw new Error("initializeWasm() must be awaited first!");
3098                 }
3099                 const nativeResponseValue = wasm.COption_u64Z_some(o);
3100                 return nativeResponseValue;
3101         }
3102         // struct LDKCOption_u64Z COption_u64Z_none(void);
3103         export function COption_u64Z_none(): number {
3104                 if(!isWasmInitialized) {
3105                         throw new Error("initializeWasm() must be awaited first!");
3106                 }
3107                 const nativeResponseValue = wasm.COption_u64Z_none();
3108                 return nativeResponseValue;
3109         }
3110         // void COption_u64Z_free(struct LDKCOption_u64Z _res);
3111         export function COption_u64Z_free(_res: number): void {
3112                 if(!isWasmInitialized) {
3113                         throw new Error("initializeWasm() must be awaited first!");
3114                 }
3115                 const nativeResponseValue = wasm.COption_u64Z_free(_res);
3116                 // debug statements here
3117         }
3118         // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
3119         export function COption_u64Z_clone(orig: number): number {
3120                 if(!isWasmInitialized) {
3121                         throw new Error("initializeWasm() must be awaited first!");
3122                 }
3123                 const nativeResponseValue = wasm.COption_u64Z_clone(orig);
3124                 return nativeResponseValue;
3125         }
3126         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
3127         export function CVec_ChannelDetailsZ_free(_res: number[]): void {
3128                 if(!isWasmInitialized) {
3129                         throw new Error("initializeWasm() must be awaited first!");
3130                 }
3131                 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
3132                 // debug statements here
3133         }
3134         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
3135         export function CVec_RouteHintZ_free(_res: number[]): void {
3136                 if(!isWasmInitialized) {
3137                         throw new Error("initializeWasm() must be awaited first!");
3138                 }
3139                 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
3140                 // debug statements here
3141         }
3142         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
3143         export function CResult_RouteLightningErrorZ_ok(o: number): number {
3144                 if(!isWasmInitialized) {
3145                         throw new Error("initializeWasm() must be awaited first!");
3146                 }
3147                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
3148                 return nativeResponseValue;
3149         }
3150         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
3151         export function CResult_RouteLightningErrorZ_err(e: number): number {
3152                 if(!isWasmInitialized) {
3153                         throw new Error("initializeWasm() must be awaited first!");
3154                 }
3155                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
3156                 return nativeResponseValue;
3157         }
3158         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
3159         export function CResult_RouteLightningErrorZ_free(_res: number): void {
3160                 if(!isWasmInitialized) {
3161                         throw new Error("initializeWasm() must be awaited first!");
3162                 }
3163                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
3164                 // debug statements here
3165         }
3166         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
3167         export function CResult_RouteLightningErrorZ_clone(orig: number): number {
3168                 if(!isWasmInitialized) {
3169                         throw new Error("initializeWasm() must be awaited first!");
3170                 }
3171                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
3172                 return nativeResponseValue;
3173         }
3174         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
3175         export function CResult_TxOutAccessErrorZ_ok(o: number): number {
3176                 if(!isWasmInitialized) {
3177                         throw new Error("initializeWasm() must be awaited first!");
3178                 }
3179                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
3180                 return nativeResponseValue;
3181         }
3182         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
3183         export function CResult_TxOutAccessErrorZ_err(e: AccessError): number {
3184                 if(!isWasmInitialized) {
3185                         throw new Error("initializeWasm() must be awaited first!");
3186                 }
3187                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
3188                 return nativeResponseValue;
3189         }
3190         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
3191         export function CResult_TxOutAccessErrorZ_free(_res: number): void {
3192                 if(!isWasmInitialized) {
3193                         throw new Error("initializeWasm() must be awaited first!");
3194                 }
3195                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
3196                 // debug statements here
3197         }
3198         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
3199         export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
3200                 if(!isWasmInitialized) {
3201                         throw new Error("initializeWasm() must be awaited first!");
3202                 }
3203                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
3204                 return nativeResponseValue;
3205         }
3206         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
3207         export function C2Tuple_usizeTransactionZ_clone(orig: number): number {
3208                 if(!isWasmInitialized) {
3209                         throw new Error("initializeWasm() must be awaited first!");
3210                 }
3211                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_clone(orig);
3212                 return nativeResponseValue;
3213         }
3214         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
3215         export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
3216                 if(!isWasmInitialized) {
3217                         throw new Error("initializeWasm() must be awaited first!");
3218                 }
3219                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
3220                 return nativeResponseValue;
3221         }
3222         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
3223         export function C2Tuple_usizeTransactionZ_free(_res: number): void {
3224                 if(!isWasmInitialized) {
3225                         throw new Error("initializeWasm() must be awaited first!");
3226                 }
3227                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
3228                 // debug statements here
3229         }
3230         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
3231         export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
3232                 if(!isWasmInitialized) {
3233                         throw new Error("initializeWasm() must be awaited first!");
3234                 }
3235                 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
3236                 // debug statements here
3237         }
3238         // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
3239         export function CVec_TxidZ_free(_res: Uint8Array[]): void {
3240                 if(!isWasmInitialized) {
3241                         throw new Error("initializeWasm() must be awaited first!");
3242                 }
3243                 const nativeResponseValue = wasm.CVec_TxidZ_free(_res);
3244                 // debug statements here
3245         }
3246         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
3247         export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
3248                 if(!isWasmInitialized) {
3249                         throw new Error("initializeWasm() must be awaited first!");
3250                 }
3251                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
3252                 return nativeResponseValue;
3253         }
3254         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
3255         export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): number {
3256                 if(!isWasmInitialized) {
3257                         throw new Error("initializeWasm() must be awaited first!");
3258                 }
3259                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
3260                 return nativeResponseValue;
3261         }
3262         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
3263         export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
3264                 if(!isWasmInitialized) {
3265                         throw new Error("initializeWasm() must be awaited first!");
3266                 }
3267                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
3268                 // debug statements here
3269         }
3270         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
3271         export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
3272                 if(!isWasmInitialized) {
3273                         throw new Error("initializeWasm() must be awaited first!");
3274                 }
3275                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
3276                 return nativeResponseValue;
3277         }
3278         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
3279         export function CVec_MonitorEventZ_free(_res: number[]): void {
3280                 if(!isWasmInitialized) {
3281                         throw new Error("initializeWasm() must be awaited first!");
3282                 }
3283                 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
3284                 // debug statements here
3285         }
3286         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
3287         export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
3288                 if(!isWasmInitialized) {
3289                         throw new Error("initializeWasm() must be awaited first!");
3290                 }
3291                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
3292                 return nativeResponseValue;
3293         }
3294         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
3295         export function COption_C2Tuple_usizeTransactionZZ_none(): number {
3296                 if(!isWasmInitialized) {
3297                         throw new Error("initializeWasm() must be awaited first!");
3298                 }
3299                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
3300                 return nativeResponseValue;
3301         }
3302         // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
3303         export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
3304                 if(!isWasmInitialized) {
3305                         throw new Error("initializeWasm() must be awaited first!");
3306                 }
3307                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
3308                 // debug statements here
3309         }
3310         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
3311         export function COption_C2Tuple_usizeTransactionZZ_clone(orig: number): number {
3312                 if(!isWasmInitialized) {
3313                         throw new Error("initializeWasm() must be awaited first!");
3314                 }
3315                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_clone(orig);
3316                 return nativeResponseValue;
3317         }
3318         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o);
3319         export function COption_NetworkUpdateZ_some(o: number): number {
3320                 if(!isWasmInitialized) {
3321                         throw new Error("initializeWasm() must be awaited first!");
3322                 }
3323                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_some(o);
3324                 return nativeResponseValue;
3325         }
3326         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void);
3327         export function COption_NetworkUpdateZ_none(): number {
3328                 if(!isWasmInitialized) {
3329                         throw new Error("initializeWasm() must be awaited first!");
3330                 }
3331                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_none();
3332                 return nativeResponseValue;
3333         }
3334         // void COption_NetworkUpdateZ_free(struct LDKCOption_NetworkUpdateZ _res);
3335         export function COption_NetworkUpdateZ_free(_res: number): void {
3336                 if(!isWasmInitialized) {
3337                         throw new Error("initializeWasm() must be awaited first!");
3338                 }
3339                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_free(_res);
3340                 // debug statements here
3341         }
3342         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_clone(const struct LDKCOption_NetworkUpdateZ *NONNULL_PTR orig);
3343         export function COption_NetworkUpdateZ_clone(orig: number): number {
3344                 if(!isWasmInitialized) {
3345                         throw new Error("initializeWasm() must be awaited first!");
3346                 }
3347                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_clone(orig);
3348                 return nativeResponseValue;
3349         }
3350         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
3351         export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
3352                 if(!isWasmInitialized) {
3353                         throw new Error("initializeWasm() must be awaited first!");
3354                 }
3355                 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
3356                 // debug statements here
3357         }
3358         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
3359         export function CVec_MessageSendEventZ_free(_res: number[]): void {
3360                 if(!isWasmInitialized) {
3361                         throw new Error("initializeWasm() must be awaited first!");
3362                 }
3363                 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
3364                 // debug statements here
3365         }
3366         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
3367         export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
3368                 if(!isWasmInitialized) {
3369                         throw new Error("initializeWasm() must be awaited first!");
3370                 }
3371                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
3372                 return nativeResponseValue;
3373         }
3374         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3375         export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
3376                 if(!isWasmInitialized) {
3377                         throw new Error("initializeWasm() must be awaited first!");
3378                 }
3379                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
3380                 return nativeResponseValue;
3381         }
3382         // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
3383         export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
3384                 if(!isWasmInitialized) {
3385                         throw new Error("initializeWasm() must be awaited first!");
3386                 }
3387                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
3388                 // debug statements here
3389         }
3390         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
3391         export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
3392                 if(!isWasmInitialized) {
3393                         throw new Error("initializeWasm() must be awaited first!");
3394                 }
3395                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
3396                 return nativeResponseValue;
3397         }
3398         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3399         export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
3400                 if(!isWasmInitialized) {
3401                         throw new Error("initializeWasm() must be awaited first!");
3402                 }
3403                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
3404                 return nativeResponseValue;
3405         }
3406         // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
3407         export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
3408                 if(!isWasmInitialized) {
3409                         throw new Error("initializeWasm() must be awaited first!");
3410                 }
3411                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
3412                 // debug statements here
3413         }
3414         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
3415         export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
3416                 if(!isWasmInitialized) {
3417                         throw new Error("initializeWasm() must be awaited first!");
3418                 }
3419                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
3420                 return nativeResponseValue;
3421         }
3422         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3423         export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
3424                 if(!isWasmInitialized) {
3425                         throw new Error("initializeWasm() must be awaited first!");
3426                 }
3427                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
3428                 return nativeResponseValue;
3429         }
3430         // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
3431         export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
3432                 if(!isWasmInitialized) {
3433                         throw new Error("initializeWasm() must be awaited first!");
3434                 }
3435                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
3436                 // debug statements here
3437         }
3438         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
3439         export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
3440                 if(!isWasmInitialized) {
3441                         throw new Error("initializeWasm() must be awaited first!");
3442                 }
3443                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
3444                 return nativeResponseValue;
3445         }
3446         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3447         export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
3448                 if(!isWasmInitialized) {
3449                         throw new Error("initializeWasm() must be awaited first!");
3450                 }
3451                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
3452                 return nativeResponseValue;
3453         }
3454         // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
3455         export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
3456                 if(!isWasmInitialized) {
3457                         throw new Error("initializeWasm() must be awaited first!");
3458                 }
3459                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
3460                 // debug statements here
3461         }
3462         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
3463         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
3464                 if(!isWasmInitialized) {
3465                         throw new Error("initializeWasm() must be awaited first!");
3466                 }
3467                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
3468                 return nativeResponseValue;
3469         }
3470         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3471         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
3472                 if(!isWasmInitialized) {
3473                         throw new Error("initializeWasm() must be awaited first!");
3474                 }
3475                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
3476                 return nativeResponseValue;
3477         }
3478         // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
3479         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
3480                 if(!isWasmInitialized) {
3481                         throw new Error("initializeWasm() must be awaited first!");
3482                 }
3483                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
3484                 // debug statements here
3485         }
3486         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3487         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3488                 if(!isWasmInitialized) {
3489                         throw new Error("initializeWasm() must be awaited first!");
3490                 }
3491                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
3492                 return nativeResponseValue;
3493         }
3494         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
3495         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
3496                 if(!isWasmInitialized) {
3497                         throw new Error("initializeWasm() must be awaited first!");
3498                 }
3499                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
3500                 return nativeResponseValue;
3501         }
3502         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3503         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
3504                 if(!isWasmInitialized) {
3505                         throw new Error("initializeWasm() must be awaited first!");
3506                 }
3507                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
3508                 return nativeResponseValue;
3509         }
3510         // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
3511         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
3512                 if(!isWasmInitialized) {
3513                         throw new Error("initializeWasm() must be awaited first!");
3514                 }
3515                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
3516                 // debug statements here
3517         }
3518         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3519         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3520                 if(!isWasmInitialized) {
3521                         throw new Error("initializeWasm() must be awaited first!");
3522                 }
3523                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
3524                 return nativeResponseValue;
3525         }
3526         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
3527         export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
3528                 if(!isWasmInitialized) {
3529                         throw new Error("initializeWasm() must be awaited first!");
3530                 }
3531                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
3532                 return nativeResponseValue;
3533         }
3534         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3535         export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
3536                 if(!isWasmInitialized) {
3537                         throw new Error("initializeWasm() must be awaited first!");
3538                 }
3539                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
3540                 return nativeResponseValue;
3541         }
3542         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
3543         export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
3544                 if(!isWasmInitialized) {
3545                         throw new Error("initializeWasm() must be awaited first!");
3546                 }
3547                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
3548                 // debug statements here
3549         }
3550         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3551         export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3552                 if(!isWasmInitialized) {
3553                         throw new Error("initializeWasm() must be awaited first!");
3554                 }
3555                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
3556                 return nativeResponseValue;
3557         }
3558         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_ok(void);
3559         export function CResult_NoneNoneZ_ok(): number {
3560                 if(!isWasmInitialized) {
3561                         throw new Error("initializeWasm() must be awaited first!");
3562                 }
3563                 const nativeResponseValue = wasm.CResult_NoneNoneZ_ok();
3564                 return nativeResponseValue;
3565         }
3566         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_err(void);
3567         export function CResult_NoneNoneZ_err(): number {
3568                 if(!isWasmInitialized) {
3569                         throw new Error("initializeWasm() must be awaited first!");
3570                 }
3571                 const nativeResponseValue = wasm.CResult_NoneNoneZ_err();
3572                 return nativeResponseValue;
3573         }
3574         // void CResult_NoneNoneZ_free(struct LDKCResult_NoneNoneZ _res);
3575         export function CResult_NoneNoneZ_free(_res: number): void {
3576                 if(!isWasmInitialized) {
3577                         throw new Error("initializeWasm() must be awaited first!");
3578                 }
3579                 const nativeResponseValue = wasm.CResult_NoneNoneZ_free(_res);
3580                 // debug statements here
3581         }
3582         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_clone(const struct LDKCResult_NoneNoneZ *NONNULL_PTR orig);
3583         export function CResult_NoneNoneZ_clone(orig: number): number {
3584                 if(!isWasmInitialized) {
3585                         throw new Error("initializeWasm() must be awaited first!");
3586                 }
3587                 const nativeResponseValue = wasm.CResult_NoneNoneZ_clone(orig);
3588                 return nativeResponseValue;
3589         }
3590         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
3591         export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
3592                 if(!isWasmInitialized) {
3593                         throw new Error("initializeWasm() must be awaited first!");
3594                 }
3595                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
3596                 return nativeResponseValue;
3597         }
3598         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
3599         export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
3600                 if(!isWasmInitialized) {
3601                         throw new Error("initializeWasm() must be awaited first!");
3602                 }
3603                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
3604                 return nativeResponseValue;
3605         }
3606         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
3607         export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
3608                 if(!isWasmInitialized) {
3609                         throw new Error("initializeWasm() must be awaited first!");
3610                 }
3611                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
3612                 // debug statements here
3613         }
3614         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
3615         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
3616                 if(!isWasmInitialized) {
3617                         throw new Error("initializeWasm() must be awaited first!");
3618                 }
3619                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
3620                 return nativeResponseValue;
3621         }
3622         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
3623         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
3624                 if(!isWasmInitialized) {
3625                         throw new Error("initializeWasm() must be awaited first!");
3626                 }
3627                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
3628                 return nativeResponseValue;
3629         }
3630         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
3631         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
3632                 if(!isWasmInitialized) {
3633                         throw new Error("initializeWasm() must be awaited first!");
3634                 }
3635                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
3636                 // debug statements here
3637         }
3638         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
3639         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
3640                 if(!isWasmInitialized) {
3641                         throw new Error("initializeWasm() must be awaited first!");
3642                 }
3643                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
3644                 return nativeResponseValue;
3645         }
3646         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
3647         export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
3648                 if(!isWasmInitialized) {
3649                         throw new Error("initializeWasm() must be awaited first!");
3650                 }
3651                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
3652                 return nativeResponseValue;
3653         }
3654         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
3655         export function CResult_SignatureNoneZ_err(): number {
3656                 if(!isWasmInitialized) {
3657                         throw new Error("initializeWasm() must be awaited first!");
3658                 }
3659                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
3660                 return nativeResponseValue;
3661         }
3662         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
3663         export function CResult_SignatureNoneZ_free(_res: number): void {
3664                 if(!isWasmInitialized) {
3665                         throw new Error("initializeWasm() must be awaited first!");
3666                 }
3667                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
3668                 // debug statements here
3669         }
3670         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
3671         export function CResult_SignatureNoneZ_clone(orig: number): number {
3672                 if(!isWasmInitialized) {
3673                         throw new Error("initializeWasm() must be awaited first!");
3674                 }
3675                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
3676                 return nativeResponseValue;
3677         }
3678         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
3679         export function CResult_SignDecodeErrorZ_ok(o: number): number {
3680                 if(!isWasmInitialized) {
3681                         throw new Error("initializeWasm() must be awaited first!");
3682                 }
3683                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
3684                 return nativeResponseValue;
3685         }
3686         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
3687         export function CResult_SignDecodeErrorZ_err(e: number): number {
3688                 if(!isWasmInitialized) {
3689                         throw new Error("initializeWasm() must be awaited first!");
3690                 }
3691                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
3692                 return nativeResponseValue;
3693         }
3694         // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
3695         export function CResult_SignDecodeErrorZ_free(_res: number): void {
3696                 if(!isWasmInitialized) {
3697                         throw new Error("initializeWasm() must be awaited first!");
3698                 }
3699                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
3700                 // debug statements here
3701         }
3702         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
3703         export function CResult_SignDecodeErrorZ_clone(orig: number): number {
3704                 if(!isWasmInitialized) {
3705                         throw new Error("initializeWasm() must be awaited first!");
3706                 }
3707                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
3708                 return nativeResponseValue;
3709         }
3710         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
3711         export function CVec_u8Z_free(_res: Uint8Array): void {
3712                 if(!isWasmInitialized) {
3713                         throw new Error("initializeWasm() must be awaited first!");
3714                 }
3715                 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
3716                 // debug statements here
3717         }
3718         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
3719         export function CResult_RecoverableSignatureNoneZ_ok(arg: Uint8Array): number {
3720                 if(!isWasmInitialized) {
3721                         throw new Error("initializeWasm() must be awaited first!");
3722                 }
3723                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_ok(encodeArray(arg));
3724                 return nativeResponseValue;
3725         }
3726         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
3727         export function CResult_RecoverableSignatureNoneZ_err(): number {
3728                 if(!isWasmInitialized) {
3729                         throw new Error("initializeWasm() must be awaited first!");
3730                 }
3731                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_err();
3732                 return nativeResponseValue;
3733         }
3734         // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
3735         export function CResult_RecoverableSignatureNoneZ_free(_res: number): void {
3736                 if(!isWasmInitialized) {
3737                         throw new Error("initializeWasm() must be awaited first!");
3738                 }
3739                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_free(_res);
3740                 // debug statements here
3741         }
3742         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
3743         export function CResult_RecoverableSignatureNoneZ_clone(orig: number): number {
3744                 if(!isWasmInitialized) {
3745                         throw new Error("initializeWasm() must be awaited first!");
3746                 }
3747                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_clone(orig);
3748                 return nativeResponseValue;
3749         }
3750         // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
3751         export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
3752                 if(!isWasmInitialized) {
3753                         throw new Error("initializeWasm() must be awaited first!");
3754                 }
3755                 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
3756                 // debug statements here
3757         }
3758         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
3759         export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
3760                 if(!isWasmInitialized) {
3761                         throw new Error("initializeWasm() must be awaited first!");
3762                 }
3763                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
3764                 return nativeResponseValue;
3765         }
3766         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
3767         export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
3768                 if(!isWasmInitialized) {
3769                         throw new Error("initializeWasm() must be awaited first!");
3770                 }
3771                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
3772                 return nativeResponseValue;
3773         }
3774         // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
3775         export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
3776                 if(!isWasmInitialized) {
3777                         throw new Error("initializeWasm() must be awaited first!");
3778                 }
3779                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
3780                 // debug statements here
3781         }
3782         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
3783         export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
3784                 if(!isWasmInitialized) {
3785                         throw new Error("initializeWasm() must be awaited first!");
3786                 }
3787                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
3788                 return nativeResponseValue;
3789         }
3790         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
3791         export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
3792                 if(!isWasmInitialized) {
3793                         throw new Error("initializeWasm() must be awaited first!");
3794                 }
3795                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
3796                 return nativeResponseValue;
3797         }
3798         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
3799         export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
3800                 if(!isWasmInitialized) {
3801                         throw new Error("initializeWasm() must be awaited first!");
3802                 }
3803                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
3804                 return nativeResponseValue;
3805         }
3806         // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
3807         export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
3808                 if(!isWasmInitialized) {
3809                         throw new Error("initializeWasm() must be awaited first!");
3810                 }
3811                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
3812                 // debug statements here
3813         }
3814         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
3815         export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
3816                 if(!isWasmInitialized) {
3817                         throw new Error("initializeWasm() must be awaited first!");
3818                 }
3819                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
3820                 return nativeResponseValue;
3821         }
3822         // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
3823         export function CVec_TxOutZ_free(_res: number[]): void {
3824                 if(!isWasmInitialized) {
3825                         throw new Error("initializeWasm() must be awaited first!");
3826                 }
3827                 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
3828                 // debug statements here
3829         }
3830         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
3831         export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
3832                 if(!isWasmInitialized) {
3833                         throw new Error("initializeWasm() must be awaited first!");
3834                 }
3835                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
3836                 return nativeResponseValue;
3837         }
3838         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
3839         export function CResult_TransactionNoneZ_err(): number {
3840                 if(!isWasmInitialized) {
3841                         throw new Error("initializeWasm() must be awaited first!");
3842                 }
3843                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
3844                 return nativeResponseValue;
3845         }
3846         // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
3847         export function CResult_TransactionNoneZ_free(_res: number): void {
3848                 if(!isWasmInitialized) {
3849                         throw new Error("initializeWasm() must be awaited first!");
3850                 }
3851                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
3852                 // debug statements here
3853         }
3854         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
3855         export function CResult_TransactionNoneZ_clone(orig: number): number {
3856                 if(!isWasmInitialized) {
3857                         throw new Error("initializeWasm() must be awaited first!");
3858                 }
3859                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_clone(orig);
3860                 return nativeResponseValue;
3861         }
3862         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_clone(const struct LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR orig);
3863         export function C2Tuple_BlockHashChannelMonitorZ_clone(orig: number): number {
3864                 if(!isWasmInitialized) {
3865                         throw new Error("initializeWasm() must be awaited first!");
3866                 }
3867                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_clone(orig);
3868                 return nativeResponseValue;
3869         }
3870         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
3871         export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
3872                 if(!isWasmInitialized) {
3873                         throw new Error("initializeWasm() must be awaited first!");
3874                 }
3875                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
3876                 return nativeResponseValue;
3877         }
3878         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
3879         export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
3880                 if(!isWasmInitialized) {
3881                         throw new Error("initializeWasm() must be awaited first!");
3882                 }
3883                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
3884                 // debug statements here
3885         }
3886         // void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res);
3887         export function CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res: number[]): void {
3888                 if(!isWasmInitialized) {
3889                         throw new Error("initializeWasm() must be awaited first!");
3890                 }
3891                 const nativeResponseValue = wasm.CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res);
3892                 // debug statements here
3893         }
3894         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o);
3895         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o: number[]): number {
3896                 if(!isWasmInitialized) {
3897                         throw new Error("initializeWasm() must be awaited first!");
3898                 }
3899                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o);
3900                 return nativeResponseValue;
3901         }
3902         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e);
3903         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e: IOError): number {
3904                 if(!isWasmInitialized) {
3905                         throw new Error("initializeWasm() must be awaited first!");
3906                 }
3907                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e);
3908                 return nativeResponseValue;
3909         }
3910         // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
3911         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res: number): void {
3912                 if(!isWasmInitialized) {
3913                         throw new Error("initializeWasm() must be awaited first!");
3914                 }
3915                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res);
3916                 // debug statements here
3917         }
3918         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(const struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR orig);
3919         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig: number): number {
3920                 if(!isWasmInitialized) {
3921                         throw new Error("initializeWasm() must be awaited first!");
3922                 }
3923                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig);
3924                 return nativeResponseValue;
3925         }
3926         // struct LDKCResult_PaymentIdDecodeErrorZ CResult_PaymentIdDecodeErrorZ_ok(struct LDKPaymentId o);
3927         export function CResult_PaymentIdDecodeErrorZ_ok(o: number): number {
3928                 if(!isWasmInitialized) {
3929                         throw new Error("initializeWasm() must be awaited first!");
3930                 }
3931                 const nativeResponseValue = wasm.CResult_PaymentIdDecodeErrorZ_ok(o);
3932                 return nativeResponseValue;
3933         }
3934         // struct LDKCResult_PaymentIdDecodeErrorZ CResult_PaymentIdDecodeErrorZ_err(struct LDKDecodeError e);
3935         export function CResult_PaymentIdDecodeErrorZ_err(e: number): number {
3936                 if(!isWasmInitialized) {
3937                         throw new Error("initializeWasm() must be awaited first!");
3938                 }
3939                 const nativeResponseValue = wasm.CResult_PaymentIdDecodeErrorZ_err(e);
3940                 return nativeResponseValue;
3941         }
3942         // void CResult_PaymentIdDecodeErrorZ_free(struct LDKCResult_PaymentIdDecodeErrorZ _res);
3943         export function CResult_PaymentIdDecodeErrorZ_free(_res: number): void {
3944                 if(!isWasmInitialized) {
3945                         throw new Error("initializeWasm() must be awaited first!");
3946                 }
3947                 const nativeResponseValue = wasm.CResult_PaymentIdDecodeErrorZ_free(_res);
3948                 // debug statements here
3949         }
3950         // struct LDKCResult_PaymentIdDecodeErrorZ CResult_PaymentIdDecodeErrorZ_clone(const struct LDKCResult_PaymentIdDecodeErrorZ *NONNULL_PTR orig);
3951         export function CResult_PaymentIdDecodeErrorZ_clone(orig: number): number {
3952                 if(!isWasmInitialized) {
3953                         throw new Error("initializeWasm() must be awaited first!");
3954                 }
3955                 const nativeResponseValue = wasm.CResult_PaymentIdDecodeErrorZ_clone(orig);
3956                 return nativeResponseValue;
3957         }
3958         // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
3959         export function COption_u16Z_some(o: number): number {
3960                 if(!isWasmInitialized) {
3961                         throw new Error("initializeWasm() must be awaited first!");
3962                 }
3963                 const nativeResponseValue = wasm.COption_u16Z_some(o);
3964                 return nativeResponseValue;
3965         }
3966         // struct LDKCOption_u16Z COption_u16Z_none(void);
3967         export function COption_u16Z_none(): number {
3968                 if(!isWasmInitialized) {
3969                         throw new Error("initializeWasm() must be awaited first!");
3970                 }
3971                 const nativeResponseValue = wasm.COption_u16Z_none();
3972                 return nativeResponseValue;
3973         }
3974         // void COption_u16Z_free(struct LDKCOption_u16Z _res);
3975         export function COption_u16Z_free(_res: number): void {
3976                 if(!isWasmInitialized) {
3977                         throw new Error("initializeWasm() must be awaited first!");
3978                 }
3979                 const nativeResponseValue = wasm.COption_u16Z_free(_res);
3980                 // debug statements here
3981         }
3982         // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
3983         export function COption_u16Z_clone(orig: number): number {
3984                 if(!isWasmInitialized) {
3985                         throw new Error("initializeWasm() must be awaited first!");
3986                 }
3987                 const nativeResponseValue = wasm.COption_u16Z_clone(orig);
3988                 return nativeResponseValue;
3989         }
3990         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
3991         export function CResult_NoneAPIErrorZ_ok(): number {
3992                 if(!isWasmInitialized) {
3993                         throw new Error("initializeWasm() must be awaited first!");
3994                 }
3995                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
3996                 return nativeResponseValue;
3997         }
3998         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
3999         export function CResult_NoneAPIErrorZ_err(e: number): number {
4000                 if(!isWasmInitialized) {
4001                         throw new Error("initializeWasm() must be awaited first!");
4002                 }
4003                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
4004                 return nativeResponseValue;
4005         }
4006         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
4007         export function CResult_NoneAPIErrorZ_free(_res: number): void {
4008                 if(!isWasmInitialized) {
4009                         throw new Error("initializeWasm() must be awaited first!");
4010                 }
4011                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
4012                 // debug statements here
4013         }
4014         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
4015         export function CResult_NoneAPIErrorZ_clone(orig: number): number {
4016                 if(!isWasmInitialized) {
4017                         throw new Error("initializeWasm() must be awaited first!");
4018                 }
4019                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
4020                 return nativeResponseValue;
4021         }
4022         // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
4023         export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
4024                 if(!isWasmInitialized) {
4025                         throw new Error("initializeWasm() must be awaited first!");
4026                 }
4027                 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
4028                 // debug statements here
4029         }
4030         // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
4031         export function CVec_APIErrorZ_free(_res: number[]): void {
4032                 if(!isWasmInitialized) {
4033                         throw new Error("initializeWasm() must be awaited first!");
4034                 }
4035                 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
4036                 // debug statements here
4037         }
4038         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_ok(struct LDKThirtyTwoBytes o);
4039         export function CResult__u832APIErrorZ_ok(o: Uint8Array): number {
4040                 if(!isWasmInitialized) {
4041                         throw new Error("initializeWasm() must be awaited first!");
4042                 }
4043                 const nativeResponseValue = wasm.CResult__u832APIErrorZ_ok(encodeArray(o));
4044                 return nativeResponseValue;
4045         }
4046         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_err(struct LDKAPIError e);
4047         export function CResult__u832APIErrorZ_err(e: number): number {
4048                 if(!isWasmInitialized) {
4049                         throw new Error("initializeWasm() must be awaited first!");
4050                 }
4051                 const nativeResponseValue = wasm.CResult__u832APIErrorZ_err(e);
4052                 return nativeResponseValue;
4053         }
4054         // void CResult__u832APIErrorZ_free(struct LDKCResult__u832APIErrorZ _res);
4055         export function CResult__u832APIErrorZ_free(_res: number): void {
4056                 if(!isWasmInitialized) {
4057                         throw new Error("initializeWasm() must be awaited first!");
4058                 }
4059                 const nativeResponseValue = wasm.CResult__u832APIErrorZ_free(_res);
4060                 // debug statements here
4061         }
4062         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_clone(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR orig);
4063         export function CResult__u832APIErrorZ_clone(orig: number): number {
4064                 if(!isWasmInitialized) {
4065                         throw new Error("initializeWasm() must be awaited first!");
4066                 }
4067                 const nativeResponseValue = wasm.CResult__u832APIErrorZ_clone(orig);
4068                 return nativeResponseValue;
4069         }
4070         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_ok(struct LDKPaymentId o);
4071         export function CResult_PaymentIdPaymentSendFailureZ_ok(o: number): number {
4072                 if(!isWasmInitialized) {
4073                         throw new Error("initializeWasm() must be awaited first!");
4074                 }
4075                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_ok(o);
4076                 return nativeResponseValue;
4077         }
4078         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
4079         export function CResult_PaymentIdPaymentSendFailureZ_err(e: number): number {
4080                 if(!isWasmInitialized) {
4081                         throw new Error("initializeWasm() must be awaited first!");
4082                 }
4083                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_err(e);
4084                 return nativeResponseValue;
4085         }
4086         // void CResult_PaymentIdPaymentSendFailureZ_free(struct LDKCResult_PaymentIdPaymentSendFailureZ _res);
4087         export function CResult_PaymentIdPaymentSendFailureZ_free(_res: number): void {
4088                 if(!isWasmInitialized) {
4089                         throw new Error("initializeWasm() must be awaited first!");
4090                 }
4091                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_free(_res);
4092                 // debug statements here
4093         }
4094         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_clone(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR orig);
4095         export function CResult_PaymentIdPaymentSendFailureZ_clone(orig: number): number {
4096                 if(!isWasmInitialized) {
4097                         throw new Error("initializeWasm() must be awaited first!");
4098                 }
4099                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_clone(orig);
4100                 return nativeResponseValue;
4101         }
4102         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
4103         export function CResult_NonePaymentSendFailureZ_ok(): number {
4104                 if(!isWasmInitialized) {
4105                         throw new Error("initializeWasm() must be awaited first!");
4106                 }
4107                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
4108                 return nativeResponseValue;
4109         }
4110         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
4111         export function CResult_NonePaymentSendFailureZ_err(e: number): number {
4112                 if(!isWasmInitialized) {
4113                         throw new Error("initializeWasm() must be awaited first!");
4114                 }
4115                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
4116                 return nativeResponseValue;
4117         }
4118         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
4119         export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
4120                 if(!isWasmInitialized) {
4121                         throw new Error("initializeWasm() must be awaited first!");
4122                 }
4123                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
4124                 // debug statements here
4125         }
4126         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
4127         export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
4128                 if(!isWasmInitialized) {
4129                         throw new Error("initializeWasm() must be awaited first!");
4130                 }
4131                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
4132                 return nativeResponseValue;
4133         }
4134         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_clone(const struct LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR orig);
4135         export function C2Tuple_PaymentHashPaymentIdZ_clone(orig: number): number {
4136                 if(!isWasmInitialized) {
4137                         throw new Error("initializeWasm() must be awaited first!");
4138                 }
4139                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_clone(orig);
4140                 return nativeResponseValue;
4141         }
4142         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_new(struct LDKThirtyTwoBytes a, struct LDKPaymentId b);
4143         export function C2Tuple_PaymentHashPaymentIdZ_new(a: Uint8Array, b: number): number {
4144                 if(!isWasmInitialized) {
4145                         throw new Error("initializeWasm() must be awaited first!");
4146                 }
4147                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_new(encodeArray(a), b);
4148                 return nativeResponseValue;
4149         }
4150         // void C2Tuple_PaymentHashPaymentIdZ_free(struct LDKC2Tuple_PaymentHashPaymentIdZ _res);
4151         export function C2Tuple_PaymentHashPaymentIdZ_free(_res: number): void {
4152                 if(!isWasmInitialized) {
4153                         throw new Error("initializeWasm() must be awaited first!");
4154                 }
4155                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_free(_res);
4156                 // debug statements here
4157         }
4158         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(struct LDKC2Tuple_PaymentHashPaymentIdZ o);
4159         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(o: number): number {
4160                 if(!isWasmInitialized) {
4161                         throw new Error("initializeWasm() must be awaited first!");
4162                 }
4163                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(o);
4164                 return nativeResponseValue;
4165         }
4166         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
4167         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(e: number): number {
4168                 if(!isWasmInitialized) {
4169                         throw new Error("initializeWasm() must be awaited first!");
4170                 }
4171                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(e);
4172                 return nativeResponseValue;
4173         }
4174         // void CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ _res);
4175         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(_res: number): void {
4176                 if(!isWasmInitialized) {
4177                         throw new Error("initializeWasm() must be awaited first!");
4178                 }
4179                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(_res);
4180                 // debug statements here
4181         }
4182         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR orig);
4183         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig: number): number {
4184                 if(!isWasmInitialized) {
4185                         throw new Error("initializeWasm() must be awaited first!");
4186                 }
4187                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig);
4188                 return nativeResponseValue;
4189         }
4190         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
4191         export function CVec_NetAddressZ_free(_res: number[]): void {
4192                 if(!isWasmInitialized) {
4193                         throw new Error("initializeWasm() must be awaited first!");
4194                 }
4195                 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
4196                 // debug statements here
4197         }
4198         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
4199         export function C2Tuple_PaymentHashPaymentSecretZ_clone(orig: number): number {
4200                 if(!isWasmInitialized) {
4201                         throw new Error("initializeWasm() must be awaited first!");
4202                 }
4203                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_clone(orig);
4204                 return nativeResponseValue;
4205         }
4206         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
4207         export function C2Tuple_PaymentHashPaymentSecretZ_new(a: Uint8Array, b: Uint8Array): number {
4208                 if(!isWasmInitialized) {
4209                         throw new Error("initializeWasm() must be awaited first!");
4210                 }
4211                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_new(encodeArray(a), encodeArray(b));
4212                 return nativeResponseValue;
4213         }
4214         // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
4215         export function C2Tuple_PaymentHashPaymentSecretZ_free(_res: number): void {
4216                 if(!isWasmInitialized) {
4217                         throw new Error("initializeWasm() must be awaited first!");
4218                 }
4219                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_free(_res);
4220                 // debug statements here
4221         }
4222         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
4223         export function CResult_PaymentSecretAPIErrorZ_ok(o: Uint8Array): number {
4224                 if(!isWasmInitialized) {
4225                         throw new Error("initializeWasm() must be awaited first!");
4226                 }
4227                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_ok(encodeArray(o));
4228                 return nativeResponseValue;
4229         }
4230         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
4231         export function CResult_PaymentSecretAPIErrorZ_err(e: number): number {
4232                 if(!isWasmInitialized) {
4233                         throw new Error("initializeWasm() must be awaited first!");
4234                 }
4235                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_err(e);
4236                 return nativeResponseValue;
4237         }
4238         // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
4239         export function CResult_PaymentSecretAPIErrorZ_free(_res: number): void {
4240                 if(!isWasmInitialized) {
4241                         throw new Error("initializeWasm() must be awaited first!");
4242                 }
4243                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_free(_res);
4244                 // debug statements here
4245         }
4246         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
4247         export function CResult_PaymentSecretAPIErrorZ_clone(orig: number): number {
4248                 if(!isWasmInitialized) {
4249                         throw new Error("initializeWasm() must be awaited first!");
4250                 }
4251                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_clone(orig);
4252                 return nativeResponseValue;
4253         }
4254         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
4255         export function CVec_ChannelMonitorZ_free(_res: number[]): void {
4256                 if(!isWasmInitialized) {
4257                         throw new Error("initializeWasm() must be awaited first!");
4258                 }
4259                 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
4260                 // debug statements here
4261         }
4262         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
4263         export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
4264                 if(!isWasmInitialized) {
4265                         throw new Error("initializeWasm() must be awaited first!");
4266                 }
4267                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
4268                 return nativeResponseValue;
4269         }
4270         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
4271         export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
4272                 if(!isWasmInitialized) {
4273                         throw new Error("initializeWasm() must be awaited first!");
4274                 }
4275                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
4276                 // debug statements here
4277         }
4278         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
4279         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
4280                 if(!isWasmInitialized) {
4281                         throw new Error("initializeWasm() must be awaited first!");
4282                 }
4283                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
4284                 return nativeResponseValue;
4285         }
4286         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
4287         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
4288                 if(!isWasmInitialized) {
4289                         throw new Error("initializeWasm() must be awaited first!");
4290                 }
4291                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
4292                 return nativeResponseValue;
4293         }
4294         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
4295         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
4296                 if(!isWasmInitialized) {
4297                         throw new Error("initializeWasm() must be awaited first!");
4298                 }
4299                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
4300                 // debug statements here
4301         }
4302         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
4303         export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
4304                 if(!isWasmInitialized) {
4305                         throw new Error("initializeWasm() must be awaited first!");
4306                 }
4307                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
4308                 return nativeResponseValue;
4309         }
4310         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
4311         export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
4312                 if(!isWasmInitialized) {
4313                         throw new Error("initializeWasm() must be awaited first!");
4314                 }
4315                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
4316                 return nativeResponseValue;
4317         }
4318         // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
4319         export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
4320                 if(!isWasmInitialized) {
4321                         throw new Error("initializeWasm() must be awaited first!");
4322                 }
4323                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
4324                 // debug statements here
4325         }
4326         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
4327         export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
4328                 if(!isWasmInitialized) {
4329                         throw new Error("initializeWasm() must be awaited first!");
4330                 }
4331                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
4332                 return nativeResponseValue;
4333         }
4334         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
4335         export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
4336                 if(!isWasmInitialized) {
4337                         throw new Error("initializeWasm() must be awaited first!");
4338                 }
4339                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
4340                 return nativeResponseValue;
4341         }
4342         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
4343         export function CResult_OutPointDecodeErrorZ_err(e: number): number {
4344                 if(!isWasmInitialized) {
4345                         throw new Error("initializeWasm() must be awaited first!");
4346                 }
4347                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
4348                 return nativeResponseValue;
4349         }
4350         // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
4351         export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
4352                 if(!isWasmInitialized) {
4353                         throw new Error("initializeWasm() must be awaited first!");
4354                 }
4355                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
4356                 // debug statements here
4357         }
4358         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
4359         export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
4360                 if(!isWasmInitialized) {
4361                         throw new Error("initializeWasm() must be awaited first!");
4362                 }
4363                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
4364                 return nativeResponseValue;
4365         }
4366         // struct LDKCOption_TypeZ COption_TypeZ_some(struct LDKType o);
4367         export function COption_TypeZ_some(o: number): number {
4368                 if(!isWasmInitialized) {
4369                         throw new Error("initializeWasm() must be awaited first!");
4370                 }
4371                 const nativeResponseValue = wasm.COption_TypeZ_some(o);
4372                 return nativeResponseValue;
4373         }
4374         // struct LDKCOption_TypeZ COption_TypeZ_none(void);
4375         export function COption_TypeZ_none(): number {
4376                 if(!isWasmInitialized) {
4377                         throw new Error("initializeWasm() must be awaited first!");
4378                 }
4379                 const nativeResponseValue = wasm.COption_TypeZ_none();
4380                 return nativeResponseValue;
4381         }
4382         // void COption_TypeZ_free(struct LDKCOption_TypeZ _res);
4383         export function COption_TypeZ_free(_res: number): void {
4384                 if(!isWasmInitialized) {
4385                         throw new Error("initializeWasm() must be awaited first!");
4386                 }
4387                 const nativeResponseValue = wasm.COption_TypeZ_free(_res);
4388                 // debug statements here
4389         }
4390         // struct LDKCOption_TypeZ COption_TypeZ_clone(const struct LDKCOption_TypeZ *NONNULL_PTR orig);
4391         export function COption_TypeZ_clone(orig: number): number {
4392                 if(!isWasmInitialized) {
4393                         throw new Error("initializeWasm() must be awaited first!");
4394                 }
4395                 const nativeResponseValue = wasm.COption_TypeZ_clone(orig);
4396                 return nativeResponseValue;
4397         }
4398         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_ok(struct LDKCOption_TypeZ o);
4399         export function CResult_COption_TypeZDecodeErrorZ_ok(o: number): number {
4400                 if(!isWasmInitialized) {
4401                         throw new Error("initializeWasm() must be awaited first!");
4402                 }
4403                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_ok(o);
4404                 return nativeResponseValue;
4405         }
4406         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_err(struct LDKDecodeError e);
4407         export function CResult_COption_TypeZDecodeErrorZ_err(e: number): number {
4408                 if(!isWasmInitialized) {
4409                         throw new Error("initializeWasm() must be awaited first!");
4410                 }
4411                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_err(e);
4412                 return nativeResponseValue;
4413         }
4414         // void CResult_COption_TypeZDecodeErrorZ_free(struct LDKCResult_COption_TypeZDecodeErrorZ _res);
4415         export function CResult_COption_TypeZDecodeErrorZ_free(_res: number): void {
4416                 if(!isWasmInitialized) {
4417                         throw new Error("initializeWasm() must be awaited first!");
4418                 }
4419                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_free(_res);
4420                 // debug statements here
4421         }
4422         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_clone(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR orig);
4423         export function CResult_COption_TypeZDecodeErrorZ_clone(orig: number): number {
4424                 if(!isWasmInitialized) {
4425                         throw new Error("initializeWasm() must be awaited first!");
4426                 }
4427                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_clone(orig);
4428                 return nativeResponseValue;
4429         }
4430         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o);
4431         export function CResult_SiPrefixNoneZ_ok(o: SiPrefix): number {
4432                 if(!isWasmInitialized) {
4433                         throw new Error("initializeWasm() must be awaited first!");
4434                 }
4435                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_ok(o);
4436                 return nativeResponseValue;
4437         }
4438         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void);
4439         export function CResult_SiPrefixNoneZ_err(): number {
4440                 if(!isWasmInitialized) {
4441                         throw new Error("initializeWasm() must be awaited first!");
4442                 }
4443                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_err();
4444                 return nativeResponseValue;
4445         }
4446         // void CResult_SiPrefixNoneZ_free(struct LDKCResult_SiPrefixNoneZ _res);
4447         export function CResult_SiPrefixNoneZ_free(_res: number): void {
4448                 if(!isWasmInitialized) {
4449                         throw new Error("initializeWasm() must be awaited first!");
4450                 }
4451                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_free(_res);
4452                 // debug statements here
4453         }
4454         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_clone(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR orig);
4455         export function CResult_SiPrefixNoneZ_clone(orig: number): number {
4456                 if(!isWasmInitialized) {
4457                         throw new Error("initializeWasm() must be awaited first!");
4458                 }
4459                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_clone(orig);
4460                 return nativeResponseValue;
4461         }
4462         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_ok(struct LDKInvoice o);
4463         export function CResult_InvoiceNoneZ_ok(o: number): number {
4464                 if(!isWasmInitialized) {
4465                         throw new Error("initializeWasm() must be awaited first!");
4466                 }
4467                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_ok(o);
4468                 return nativeResponseValue;
4469         }
4470         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_err(void);
4471         export function CResult_InvoiceNoneZ_err(): number {
4472                 if(!isWasmInitialized) {
4473                         throw new Error("initializeWasm() must be awaited first!");
4474                 }
4475                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_err();
4476                 return nativeResponseValue;
4477         }
4478         // void CResult_InvoiceNoneZ_free(struct LDKCResult_InvoiceNoneZ _res);
4479         export function CResult_InvoiceNoneZ_free(_res: number): void {
4480                 if(!isWasmInitialized) {
4481                         throw new Error("initializeWasm() must be awaited first!");
4482                 }
4483                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_free(_res);
4484                 // debug statements here
4485         }
4486         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_clone(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR orig);
4487         export function CResult_InvoiceNoneZ_clone(orig: number): number {
4488                 if(!isWasmInitialized) {
4489                         throw new Error("initializeWasm() must be awaited first!");
4490                 }
4491                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_clone(orig);
4492                 return nativeResponseValue;
4493         }
4494         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_ok(struct LDKSignedRawInvoice o);
4495         export function CResult_SignedRawInvoiceNoneZ_ok(o: number): number {
4496                 if(!isWasmInitialized) {
4497                         throw new Error("initializeWasm() must be awaited first!");
4498                 }
4499                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_ok(o);
4500                 return nativeResponseValue;
4501         }
4502         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_err(void);
4503         export function CResult_SignedRawInvoiceNoneZ_err(): number {
4504                 if(!isWasmInitialized) {
4505                         throw new Error("initializeWasm() must be awaited first!");
4506                 }
4507                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_err();
4508                 return nativeResponseValue;
4509         }
4510         // void CResult_SignedRawInvoiceNoneZ_free(struct LDKCResult_SignedRawInvoiceNoneZ _res);
4511         export function CResult_SignedRawInvoiceNoneZ_free(_res: number): void {
4512                 if(!isWasmInitialized) {
4513                         throw new Error("initializeWasm() must be awaited first!");
4514                 }
4515                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_free(_res);
4516                 // debug statements here
4517         }
4518         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_clone(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR orig);
4519         export function CResult_SignedRawInvoiceNoneZ_clone(orig: number): number {
4520                 if(!isWasmInitialized) {
4521                         throw new Error("initializeWasm() must be awaited first!");
4522                 }
4523                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_clone(orig);
4524                 return nativeResponseValue;
4525         }
4526         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(const struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR orig);
4527         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig: number): number {
4528                 if(!isWasmInitialized) {
4529                         throw new Error("initializeWasm() must be awaited first!");
4530                 }
4531                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig);
4532                 return nativeResponseValue;
4533         }
4534         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(struct LDKRawInvoice a, struct LDKThirtyTwoBytes b, struct LDKInvoiceSignature c);
4535         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a: number, b: Uint8Array, c: number): number {
4536                 if(!isWasmInitialized) {
4537                         throw new Error("initializeWasm() must be awaited first!");
4538                 }
4539                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a, encodeArray(b), c);
4540                 return nativeResponseValue;
4541         }
4542         // void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ _res);
4543         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res: number): void {
4544                 if(!isWasmInitialized) {
4545                         throw new Error("initializeWasm() must be awaited first!");
4546                 }
4547                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res);
4548                 // debug statements here
4549         }
4550         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o);
4551         export function CResult_PayeePubKeyErrorZ_ok(o: number): number {
4552                 if(!isWasmInitialized) {
4553                         throw new Error("initializeWasm() must be awaited first!");
4554                 }
4555                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_ok(o);
4556                 return nativeResponseValue;
4557         }
4558         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e);
4559         export function CResult_PayeePubKeyErrorZ_err(e: Secp256k1Error): number {
4560                 if(!isWasmInitialized) {
4561                         throw new Error("initializeWasm() must be awaited first!");
4562                 }
4563                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_err(e);
4564                 return nativeResponseValue;
4565         }
4566         // void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res);
4567         export function CResult_PayeePubKeyErrorZ_free(_res: number): void {
4568                 if(!isWasmInitialized) {
4569                         throw new Error("initializeWasm() must be awaited first!");
4570                 }
4571                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_free(_res);
4572                 // debug statements here
4573         }
4574         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_clone(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR orig);
4575         export function CResult_PayeePubKeyErrorZ_clone(orig: number): number {
4576                 if(!isWasmInitialized) {
4577                         throw new Error("initializeWasm() must be awaited first!");
4578                 }
4579                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_clone(orig);
4580                 return nativeResponseValue;
4581         }
4582         // void CVec_PrivateRouteZ_free(struct LDKCVec_PrivateRouteZ _res);
4583         export function CVec_PrivateRouteZ_free(_res: number[]): void {
4584                 if(!isWasmInitialized) {
4585                         throw new Error("initializeWasm() must be awaited first!");
4586                 }
4587                 const nativeResponseValue = wasm.CVec_PrivateRouteZ_free(_res);
4588                 // debug statements here
4589         }
4590         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_ok(struct LDKPositiveTimestamp o);
4591         export function CResult_PositiveTimestampCreationErrorZ_ok(o: number): number {
4592                 if(!isWasmInitialized) {
4593                         throw new Error("initializeWasm() must be awaited first!");
4594                 }
4595                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_ok(o);
4596                 return nativeResponseValue;
4597         }
4598         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_err(enum LDKCreationError e);
4599         export function CResult_PositiveTimestampCreationErrorZ_err(e: CreationError): number {
4600                 if(!isWasmInitialized) {
4601                         throw new Error("initializeWasm() must be awaited first!");
4602                 }
4603                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_err(e);
4604                 return nativeResponseValue;
4605         }
4606         // void CResult_PositiveTimestampCreationErrorZ_free(struct LDKCResult_PositiveTimestampCreationErrorZ _res);
4607         export function CResult_PositiveTimestampCreationErrorZ_free(_res: number): void {
4608                 if(!isWasmInitialized) {
4609                         throw new Error("initializeWasm() must be awaited first!");
4610                 }
4611                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_free(_res);
4612                 // debug statements here
4613         }
4614         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_clone(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR orig);
4615         export function CResult_PositiveTimestampCreationErrorZ_clone(orig: number): number {
4616                 if(!isWasmInitialized) {
4617                         throw new Error("initializeWasm() must be awaited first!");
4618                 }
4619                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_clone(orig);
4620                 return nativeResponseValue;
4621         }
4622         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_ok(void);
4623         export function CResult_NoneSemanticErrorZ_ok(): number {
4624                 if(!isWasmInitialized) {
4625                         throw new Error("initializeWasm() must be awaited first!");
4626                 }
4627                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_ok();
4628                 return nativeResponseValue;
4629         }
4630         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_err(enum LDKSemanticError e);
4631         export function CResult_NoneSemanticErrorZ_err(e: SemanticError): number {
4632                 if(!isWasmInitialized) {
4633                         throw new Error("initializeWasm() must be awaited first!");
4634                 }
4635                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_err(e);
4636                 return nativeResponseValue;
4637         }
4638         // void CResult_NoneSemanticErrorZ_free(struct LDKCResult_NoneSemanticErrorZ _res);
4639         export function CResult_NoneSemanticErrorZ_free(_res: number): void {
4640                 if(!isWasmInitialized) {
4641                         throw new Error("initializeWasm() must be awaited first!");
4642                 }
4643                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_free(_res);
4644                 // debug statements here
4645         }
4646         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_clone(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR orig);
4647         export function CResult_NoneSemanticErrorZ_clone(orig: number): number {
4648                 if(!isWasmInitialized) {
4649                         throw new Error("initializeWasm() must be awaited first!");
4650                 }
4651                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_clone(orig);
4652                 return nativeResponseValue;
4653         }
4654         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_ok(struct LDKInvoice o);
4655         export function CResult_InvoiceSemanticErrorZ_ok(o: number): number {
4656                 if(!isWasmInitialized) {
4657                         throw new Error("initializeWasm() must be awaited first!");
4658                 }
4659                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_ok(o);
4660                 return nativeResponseValue;
4661         }
4662         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_err(enum LDKSemanticError e);
4663         export function CResult_InvoiceSemanticErrorZ_err(e: SemanticError): number {
4664                 if(!isWasmInitialized) {
4665                         throw new Error("initializeWasm() must be awaited first!");
4666                 }
4667                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_err(e);
4668                 return nativeResponseValue;
4669         }
4670         // void CResult_InvoiceSemanticErrorZ_free(struct LDKCResult_InvoiceSemanticErrorZ _res);
4671         export function CResult_InvoiceSemanticErrorZ_free(_res: number): void {
4672                 if(!isWasmInitialized) {
4673                         throw new Error("initializeWasm() must be awaited first!");
4674                 }
4675                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_free(_res);
4676                 // debug statements here
4677         }
4678         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_clone(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR orig);
4679         export function CResult_InvoiceSemanticErrorZ_clone(orig: number): number {
4680                 if(!isWasmInitialized) {
4681                         throw new Error("initializeWasm() must be awaited first!");
4682                 }
4683                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_clone(orig);
4684                 return nativeResponseValue;
4685         }
4686         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_ok(struct LDKDescription o);
4687         export function CResult_DescriptionCreationErrorZ_ok(o: number): number {
4688                 if(!isWasmInitialized) {
4689                         throw new Error("initializeWasm() must be awaited first!");
4690                 }
4691                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_ok(o);
4692                 return nativeResponseValue;
4693         }
4694         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_err(enum LDKCreationError e);
4695         export function CResult_DescriptionCreationErrorZ_err(e: CreationError): number {
4696                 if(!isWasmInitialized) {
4697                         throw new Error("initializeWasm() must be awaited first!");
4698                 }
4699                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_err(e);
4700                 return nativeResponseValue;
4701         }
4702         // void CResult_DescriptionCreationErrorZ_free(struct LDKCResult_DescriptionCreationErrorZ _res);
4703         export function CResult_DescriptionCreationErrorZ_free(_res: number): void {
4704                 if(!isWasmInitialized) {
4705                         throw new Error("initializeWasm() must be awaited first!");
4706                 }
4707                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_free(_res);
4708                 // debug statements here
4709         }
4710         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_clone(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR orig);
4711         export function CResult_DescriptionCreationErrorZ_clone(orig: number): number {
4712                 if(!isWasmInitialized) {
4713                         throw new Error("initializeWasm() must be awaited first!");
4714                 }
4715                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_clone(orig);
4716                 return nativeResponseValue;
4717         }
4718         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_ok(struct LDKExpiryTime o);
4719         export function CResult_ExpiryTimeCreationErrorZ_ok(o: number): number {
4720                 if(!isWasmInitialized) {
4721                         throw new Error("initializeWasm() must be awaited first!");
4722                 }
4723                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_ok(o);
4724                 return nativeResponseValue;
4725         }
4726         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_err(enum LDKCreationError e);
4727         export function CResult_ExpiryTimeCreationErrorZ_err(e: CreationError): number {
4728                 if(!isWasmInitialized) {
4729                         throw new Error("initializeWasm() must be awaited first!");
4730                 }
4731                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_err(e);
4732                 return nativeResponseValue;
4733         }
4734         // void CResult_ExpiryTimeCreationErrorZ_free(struct LDKCResult_ExpiryTimeCreationErrorZ _res);
4735         export function CResult_ExpiryTimeCreationErrorZ_free(_res: number): void {
4736                 if(!isWasmInitialized) {
4737                         throw new Error("initializeWasm() must be awaited first!");
4738                 }
4739                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_free(_res);
4740                 // debug statements here
4741         }
4742         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_clone(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR orig);
4743         export function CResult_ExpiryTimeCreationErrorZ_clone(orig: number): number {
4744                 if(!isWasmInitialized) {
4745                         throw new Error("initializeWasm() must be awaited first!");
4746                 }
4747                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_clone(orig);
4748                 return nativeResponseValue;
4749         }
4750         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_ok(struct LDKPrivateRoute o);
4751         export function CResult_PrivateRouteCreationErrorZ_ok(o: number): number {
4752                 if(!isWasmInitialized) {
4753                         throw new Error("initializeWasm() must be awaited first!");
4754                 }
4755                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_ok(o);
4756                 return nativeResponseValue;
4757         }
4758         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_err(enum LDKCreationError e);
4759         export function CResult_PrivateRouteCreationErrorZ_err(e: CreationError): number {
4760                 if(!isWasmInitialized) {
4761                         throw new Error("initializeWasm() must be awaited first!");
4762                 }
4763                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_err(e);
4764                 return nativeResponseValue;
4765         }
4766         // void CResult_PrivateRouteCreationErrorZ_free(struct LDKCResult_PrivateRouteCreationErrorZ _res);
4767         export function CResult_PrivateRouteCreationErrorZ_free(_res: number): void {
4768                 if(!isWasmInitialized) {
4769                         throw new Error("initializeWasm() must be awaited first!");
4770                 }
4771                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_free(_res);
4772                 // debug statements here
4773         }
4774         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_clone(const struct LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR orig);
4775         export function CResult_PrivateRouteCreationErrorZ_clone(orig: number): number {
4776                 if(!isWasmInitialized) {
4777                         throw new Error("initializeWasm() must be awaited first!");
4778                 }
4779                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_clone(orig);
4780                 return nativeResponseValue;
4781         }
4782         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
4783         export function CResult_StringErrorZ_ok(o: String): number {
4784                 if(!isWasmInitialized) {
4785                         throw new Error("initializeWasm() must be awaited first!");
4786                 }
4787                 const nativeResponseValue = wasm.CResult_StringErrorZ_ok(o);
4788                 return nativeResponseValue;
4789         }
4790         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
4791         export function CResult_StringErrorZ_err(e: Secp256k1Error): number {
4792                 if(!isWasmInitialized) {
4793                         throw new Error("initializeWasm() must be awaited first!");
4794                 }
4795                 const nativeResponseValue = wasm.CResult_StringErrorZ_err(e);
4796                 return nativeResponseValue;
4797         }
4798         // void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
4799         export function CResult_StringErrorZ_free(_res: number): void {
4800                 if(!isWasmInitialized) {
4801                         throw new Error("initializeWasm() must be awaited first!");
4802                 }
4803                 const nativeResponseValue = wasm.CResult_StringErrorZ_free(_res);
4804                 // debug statements here
4805         }
4806         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
4807         export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
4808                 if(!isWasmInitialized) {
4809                         throw new Error("initializeWasm() must be awaited first!");
4810                 }
4811                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
4812                 return nativeResponseValue;
4813         }
4814         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4815         export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
4816                 if(!isWasmInitialized) {
4817                         throw new Error("initializeWasm() must be awaited first!");
4818                 }
4819                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
4820                 return nativeResponseValue;
4821         }
4822         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
4823         export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
4824                 if(!isWasmInitialized) {
4825                         throw new Error("initializeWasm() must be awaited first!");
4826                 }
4827                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
4828                 // debug statements here
4829         }
4830         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
4831         export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
4832                 if(!isWasmInitialized) {
4833                         throw new Error("initializeWasm() must be awaited first!");
4834                 }
4835                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
4836                 return nativeResponseValue;
4837         }
4838         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
4839         export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
4840                 if(!isWasmInitialized) {
4841                         throw new Error("initializeWasm() must be awaited first!");
4842                 }
4843                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
4844                 return nativeResponseValue;
4845         }
4846         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4847         export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
4848                 if(!isWasmInitialized) {
4849                         throw new Error("initializeWasm() must be awaited first!");
4850                 }
4851                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
4852                 return nativeResponseValue;
4853         }
4854         // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
4855         export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
4856                 if(!isWasmInitialized) {
4857                         throw new Error("initializeWasm() must be awaited first!");
4858                 }
4859                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
4860                 // debug statements here
4861         }
4862         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
4863         export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
4864                 if(!isWasmInitialized) {
4865                         throw new Error("initializeWasm() must be awaited first!");
4866                 }
4867                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
4868                 return nativeResponseValue;
4869         }
4870         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
4871         export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
4872                 if(!isWasmInitialized) {
4873                         throw new Error("initializeWasm() must be awaited first!");
4874                 }
4875                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
4876                 return nativeResponseValue;
4877         }
4878         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
4879         export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
4880                 if(!isWasmInitialized) {
4881                         throw new Error("initializeWasm() must be awaited first!");
4882                 }
4883                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
4884                 return nativeResponseValue;
4885         }
4886         // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
4887         export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
4888                 if(!isWasmInitialized) {
4889                         throw new Error("initializeWasm() must be awaited first!");
4890                 }
4891                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
4892                 // debug statements here
4893         }
4894         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
4895         export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
4896                 if(!isWasmInitialized) {
4897                         throw new Error("initializeWasm() must be awaited first!");
4898                 }
4899                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
4900                 return nativeResponseValue;
4901         }
4902         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
4903         export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
4904                 if(!isWasmInitialized) {
4905                         throw new Error("initializeWasm() must be awaited first!");
4906                 }
4907                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
4908                 return nativeResponseValue;
4909         }
4910         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
4911         export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
4912                 if(!isWasmInitialized) {
4913                         throw new Error("initializeWasm() must be awaited first!");
4914                 }
4915                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
4916                 return nativeResponseValue;
4917         }
4918         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
4919         export function C2Tuple_OutPointScriptZ_free(_res: number): void {
4920                 if(!isWasmInitialized) {
4921                         throw new Error("initializeWasm() must be awaited first!");
4922                 }
4923                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
4924                 // debug statements here
4925         }
4926         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
4927         export function C2Tuple_u32ScriptZ_clone(orig: number): number {
4928                 if(!isWasmInitialized) {
4929                         throw new Error("initializeWasm() must be awaited first!");
4930                 }
4931                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone(orig);
4932                 return nativeResponseValue;
4933         }
4934         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
4935         export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
4936                 if(!isWasmInitialized) {
4937                         throw new Error("initializeWasm() must be awaited first!");
4938                 }
4939                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
4940                 return nativeResponseValue;
4941         }
4942         // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
4943         export function C2Tuple_u32ScriptZ_free(_res: number): void {
4944                 if(!isWasmInitialized) {
4945                         throw new Error("initializeWasm() must be awaited first!");
4946                 }
4947                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
4948                 // debug statements here
4949         }
4950         // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
4951         export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
4952                 if(!isWasmInitialized) {
4953                         throw new Error("initializeWasm() must be awaited first!");
4954                 }
4955                 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
4956                 // debug statements here
4957         }
4958         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR orig);
4959         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig: number): number {
4960                 if(!isWasmInitialized) {
4961                         throw new Error("initializeWasm() must be awaited first!");
4962                 }
4963                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig);
4964                 return nativeResponseValue;
4965         }
4966         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
4967         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
4968                 if(!isWasmInitialized) {
4969                         throw new Error("initializeWasm() must be awaited first!");
4970                 }
4971                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
4972                 return nativeResponseValue;
4973         }
4974         // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
4975         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
4976                 if(!isWasmInitialized) {
4977                         throw new Error("initializeWasm() must be awaited first!");
4978                 }
4979                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
4980                 // debug statements here
4981         }
4982         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
4983         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
4984                 if(!isWasmInitialized) {
4985                         throw new Error("initializeWasm() must be awaited first!");
4986                 }
4987                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
4988                 // debug statements here
4989         }
4990         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
4991         export function CVec_EventZ_free(_res: number[]): void {
4992                 if(!isWasmInitialized) {
4993                         throw new Error("initializeWasm() must be awaited first!");
4994                 }
4995                 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
4996                 // debug statements here
4997         }
4998         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
4999         export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
5000                 if(!isWasmInitialized) {
5001                         throw new Error("initializeWasm() must be awaited first!");
5002                 }
5003                 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
5004                 // debug statements here
5005         }
5006         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
5007         export function C2Tuple_u32TxOutZ_clone(orig: number): number {
5008                 if(!isWasmInitialized) {
5009                         throw new Error("initializeWasm() must be awaited first!");
5010                 }
5011                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
5012                 return nativeResponseValue;
5013         }
5014         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
5015         export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
5016                 if(!isWasmInitialized) {
5017                         throw new Error("initializeWasm() must be awaited first!");
5018                 }
5019                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
5020                 return nativeResponseValue;
5021         }
5022         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
5023         export function C2Tuple_u32TxOutZ_free(_res: number): void {
5024                 if(!isWasmInitialized) {
5025                         throw new Error("initializeWasm() must be awaited first!");
5026                 }
5027                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
5028                 // debug statements here
5029         }
5030         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
5031         export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
5032                 if(!isWasmInitialized) {
5033                         throw new Error("initializeWasm() must be awaited first!");
5034                 }
5035                 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
5036                 // debug statements here
5037         }
5038         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
5039         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig: number): number {
5040                 if(!isWasmInitialized) {
5041                         throw new Error("initializeWasm() must be awaited first!");
5042                 }
5043                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig);
5044                 return nativeResponseValue;
5045         }
5046         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
5047         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
5048                 if(!isWasmInitialized) {
5049                         throw new Error("initializeWasm() must be awaited first!");
5050                 }
5051                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
5052                 return nativeResponseValue;
5053         }
5054         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
5055         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
5056                 if(!isWasmInitialized) {
5057                         throw new Error("initializeWasm() must be awaited first!");
5058                 }
5059                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
5060                 // debug statements here
5061         }
5062         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
5063         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
5064                 if(!isWasmInitialized) {
5065                         throw new Error("initializeWasm() must be awaited first!");
5066                 }
5067                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
5068                 // debug statements here
5069         }
5070         // void CVec_BalanceZ_free(struct LDKCVec_BalanceZ _res);
5071         export function CVec_BalanceZ_free(_res: number[]): void {
5072                 if(!isWasmInitialized) {
5073                         throw new Error("initializeWasm() must be awaited first!");
5074                 }
5075                 const nativeResponseValue = wasm.CVec_BalanceZ_free(_res);
5076                 // debug statements here
5077         }
5078         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
5079         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
5080                 if(!isWasmInitialized) {
5081                         throw new Error("initializeWasm() must be awaited first!");
5082                 }
5083                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
5084                 return nativeResponseValue;
5085         }
5086         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
5087         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
5088                 if(!isWasmInitialized) {
5089                         throw new Error("initializeWasm() must be awaited first!");
5090                 }
5091                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
5092                 return nativeResponseValue;
5093         }
5094         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
5095         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
5096                 if(!isWasmInitialized) {
5097                         throw new Error("initializeWasm() must be awaited first!");
5098                 }
5099                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
5100                 // debug statements here
5101         }
5102         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR orig);
5103         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig: number): number {
5104                 if(!isWasmInitialized) {
5105                         throw new Error("initializeWasm() must be awaited first!");
5106                 }
5107                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig);
5108                 return nativeResponseValue;
5109         }
5110         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
5111         export function CResult_NoneLightningErrorZ_ok(): number {
5112                 if(!isWasmInitialized) {
5113                         throw new Error("initializeWasm() must be awaited first!");
5114                 }
5115                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
5116                 return nativeResponseValue;
5117         }
5118         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
5119         export function CResult_NoneLightningErrorZ_err(e: number): number {
5120                 if(!isWasmInitialized) {
5121                         throw new Error("initializeWasm() must be awaited first!");
5122                 }
5123                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
5124                 return nativeResponseValue;
5125         }
5126         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
5127         export function CResult_NoneLightningErrorZ_free(_res: number): void {
5128                 if(!isWasmInitialized) {
5129                         throw new Error("initializeWasm() must be awaited first!");
5130                 }
5131                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
5132                 // debug statements here
5133         }
5134         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
5135         export function CResult_NoneLightningErrorZ_clone(orig: number): number {
5136                 if(!isWasmInitialized) {
5137                         throw new Error("initializeWasm() must be awaited first!");
5138                 }
5139                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
5140                 return nativeResponseValue;
5141         }
5142         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_clone(const struct LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR orig);
5143         export function C2Tuple_PublicKeyTypeZ_clone(orig: number): number {
5144                 if(!isWasmInitialized) {
5145                         throw new Error("initializeWasm() must be awaited first!");
5146                 }
5147                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_clone(orig);
5148                 return nativeResponseValue;
5149         }
5150         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_new(struct LDKPublicKey a, struct LDKType b);
5151         export function C2Tuple_PublicKeyTypeZ_new(a: Uint8Array, b: number): number {
5152                 if(!isWasmInitialized) {
5153                         throw new Error("initializeWasm() must be awaited first!");
5154                 }
5155                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_new(encodeArray(a), b);
5156                 return nativeResponseValue;
5157         }
5158         // void C2Tuple_PublicKeyTypeZ_free(struct LDKC2Tuple_PublicKeyTypeZ _res);
5159         export function C2Tuple_PublicKeyTypeZ_free(_res: number): void {
5160                 if(!isWasmInitialized) {
5161                         throw new Error("initializeWasm() must be awaited first!");
5162                 }
5163                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_free(_res);
5164                 // debug statements here
5165         }
5166         // void CVec_C2Tuple_PublicKeyTypeZZ_free(struct LDKCVec_C2Tuple_PublicKeyTypeZZ _res);
5167         export function CVec_C2Tuple_PublicKeyTypeZZ_free(_res: number[]): void {
5168                 if(!isWasmInitialized) {
5169                         throw new Error("initializeWasm() must be awaited first!");
5170                 }
5171                 const nativeResponseValue = wasm.CVec_C2Tuple_PublicKeyTypeZZ_free(_res);
5172                 // debug statements here
5173         }
5174         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
5175         export function CResult_boolLightningErrorZ_ok(o: boolean): number {
5176                 if(!isWasmInitialized) {
5177                         throw new Error("initializeWasm() must be awaited first!");
5178                 }
5179                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
5180                 return nativeResponseValue;
5181         }
5182         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
5183         export function CResult_boolLightningErrorZ_err(e: number): number {
5184                 if(!isWasmInitialized) {
5185                         throw new Error("initializeWasm() must be awaited first!");
5186                 }
5187                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
5188                 return nativeResponseValue;
5189         }
5190         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
5191         export function CResult_boolLightningErrorZ_free(_res: number): void {
5192                 if(!isWasmInitialized) {
5193                         throw new Error("initializeWasm() must be awaited first!");
5194                 }
5195                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
5196                 // debug statements here
5197         }
5198         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
5199         export function CResult_boolLightningErrorZ_clone(orig: number): number {
5200                 if(!isWasmInitialized) {
5201                         throw new Error("initializeWasm() must be awaited first!");
5202                 }
5203                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
5204                 return nativeResponseValue;
5205         }
5206         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
5207         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
5208                 if(!isWasmInitialized) {
5209                         throw new Error("initializeWasm() must be awaited first!");
5210                 }
5211                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
5212                 return nativeResponseValue;
5213         }
5214         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
5215         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
5216                 if(!isWasmInitialized) {
5217                         throw new Error("initializeWasm() must be awaited first!");
5218                 }
5219                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
5220                 return nativeResponseValue;
5221         }
5222         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
5223         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
5224                 if(!isWasmInitialized) {
5225                         throw new Error("initializeWasm() must be awaited first!");
5226                 }
5227                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
5228                 // debug statements here
5229         }
5230         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
5231         export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
5232                 if(!isWasmInitialized) {
5233                         throw new Error("initializeWasm() must be awaited first!");
5234                 }
5235                 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
5236                 // debug statements here
5237         }
5238         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
5239         export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
5240                 if(!isWasmInitialized) {
5241                         throw new Error("initializeWasm() must be awaited first!");
5242                 }
5243                 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
5244                 // debug statements here
5245         }
5246         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
5247         export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
5248                 if(!isWasmInitialized) {
5249                         throw new Error("initializeWasm() must be awaited first!");
5250                 }
5251                 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
5252                 // debug statements here
5253         }
5254         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
5255         export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
5256                 if(!isWasmInitialized) {
5257                         throw new Error("initializeWasm() must be awaited first!");
5258                 }
5259                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
5260                 return nativeResponseValue;
5261         }
5262         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
5263         export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
5264                 if(!isWasmInitialized) {
5265                         throw new Error("initializeWasm() must be awaited first!");
5266                 }
5267                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
5268                 return nativeResponseValue;
5269         }
5270         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
5271         export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
5272                 if(!isWasmInitialized) {
5273                         throw new Error("initializeWasm() must be awaited first!");
5274                 }
5275                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
5276                 // debug statements here
5277         }
5278         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
5279         export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
5280                 if(!isWasmInitialized) {
5281                         throw new Error("initializeWasm() must be awaited first!");
5282                 }
5283                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
5284                 return nativeResponseValue;
5285         }
5286         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
5287         export function CResult_NonePeerHandleErrorZ_ok(): number {
5288                 if(!isWasmInitialized) {
5289                         throw new Error("initializeWasm() must be awaited first!");
5290                 }
5291                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
5292                 return nativeResponseValue;
5293         }
5294         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
5295         export function CResult_NonePeerHandleErrorZ_err(e: number): number {
5296                 if(!isWasmInitialized) {
5297                         throw new Error("initializeWasm() must be awaited first!");
5298                 }
5299                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
5300                 return nativeResponseValue;
5301         }
5302         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
5303         export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
5304                 if(!isWasmInitialized) {
5305                         throw new Error("initializeWasm() must be awaited first!");
5306                 }
5307                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
5308                 // debug statements here
5309         }
5310         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
5311         export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
5312                 if(!isWasmInitialized) {
5313                         throw new Error("initializeWasm() must be awaited first!");
5314                 }
5315                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
5316                 return nativeResponseValue;
5317         }
5318         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
5319         export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
5320                 if(!isWasmInitialized) {
5321                         throw new Error("initializeWasm() must be awaited first!");
5322                 }
5323                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
5324                 return nativeResponseValue;
5325         }
5326         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
5327         export function CResult_boolPeerHandleErrorZ_err(e: number): number {
5328                 if(!isWasmInitialized) {
5329                         throw new Error("initializeWasm() must be awaited first!");
5330                 }
5331                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
5332                 return nativeResponseValue;
5333         }
5334         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
5335         export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
5336                 if(!isWasmInitialized) {
5337                         throw new Error("initializeWasm() must be awaited first!");
5338                 }
5339                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
5340                 // debug statements here
5341         }
5342         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
5343         export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
5344                 if(!isWasmInitialized) {
5345                         throw new Error("initializeWasm() must be awaited first!");
5346                 }
5347                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
5348                 return nativeResponseValue;
5349         }
5350         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_ok(struct LDKNodeId o);
5351         export function CResult_NodeIdDecodeErrorZ_ok(o: number): number {
5352                 if(!isWasmInitialized) {
5353                         throw new Error("initializeWasm() must be awaited first!");
5354                 }
5355                 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_ok(o);
5356                 return nativeResponseValue;
5357         }
5358         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_err(struct LDKDecodeError e);
5359         export function CResult_NodeIdDecodeErrorZ_err(e: number): number {
5360                 if(!isWasmInitialized) {
5361                         throw new Error("initializeWasm() must be awaited first!");
5362                 }
5363                 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_err(e);
5364                 return nativeResponseValue;
5365         }
5366         // void CResult_NodeIdDecodeErrorZ_free(struct LDKCResult_NodeIdDecodeErrorZ _res);
5367         export function CResult_NodeIdDecodeErrorZ_free(_res: number): void {
5368                 if(!isWasmInitialized) {
5369                         throw new Error("initializeWasm() must be awaited first!");
5370                 }
5371                 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_free(_res);
5372                 // debug statements here
5373         }
5374         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_clone(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR orig);
5375         export function CResult_NodeIdDecodeErrorZ_clone(orig: number): number {
5376                 if(!isWasmInitialized) {
5377                         throw new Error("initializeWasm() must be awaited first!");
5378                 }
5379                 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_clone(orig);
5380                 return nativeResponseValue;
5381         }
5382         // struct LDKCOption_AccessZ COption_AccessZ_some(struct LDKAccess o);
5383         export function COption_AccessZ_some(o: number): number {
5384                 if(!isWasmInitialized) {
5385                         throw new Error("initializeWasm() must be awaited first!");
5386                 }
5387                 const nativeResponseValue = wasm.COption_AccessZ_some(o);
5388                 return nativeResponseValue;
5389         }
5390         // struct LDKCOption_AccessZ COption_AccessZ_none(void);
5391         export function COption_AccessZ_none(): number {
5392                 if(!isWasmInitialized) {
5393                         throw new Error("initializeWasm() must be awaited first!");
5394                 }
5395                 const nativeResponseValue = wasm.COption_AccessZ_none();
5396                 return nativeResponseValue;
5397         }
5398         // void COption_AccessZ_free(struct LDKCOption_AccessZ _res);
5399         export function COption_AccessZ_free(_res: number): void {
5400                 if(!isWasmInitialized) {
5401                         throw new Error("initializeWasm() must be awaited first!");
5402                 }
5403                 const nativeResponseValue = wasm.COption_AccessZ_free(_res);
5404                 // debug statements here
5405         }
5406         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
5407         export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
5408                 if(!isWasmInitialized) {
5409                         throw new Error("initializeWasm() must be awaited first!");
5410                 }
5411                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
5412                 return nativeResponseValue;
5413         }
5414         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
5415         export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
5416                 if(!isWasmInitialized) {
5417                         throw new Error("initializeWasm() must be awaited first!");
5418                 }
5419                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
5420                 return nativeResponseValue;
5421         }
5422         // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
5423         export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
5424                 if(!isWasmInitialized) {
5425                         throw new Error("initializeWasm() must be awaited first!");
5426                 }
5427                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
5428                 // debug statements here
5429         }
5430         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
5431         export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
5432                 if(!isWasmInitialized) {
5433                         throw new Error("initializeWasm() must be awaited first!");
5434                 }
5435                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
5436                 return nativeResponseValue;
5437         }
5438         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
5439         export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
5440                 if(!isWasmInitialized) {
5441                         throw new Error("initializeWasm() must be awaited first!");
5442                 }
5443                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
5444                 return nativeResponseValue;
5445         }
5446         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
5447         export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
5448                 if(!isWasmInitialized) {
5449                         throw new Error("initializeWasm() must be awaited first!");
5450                 }
5451                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
5452                 return nativeResponseValue;
5453         }
5454         // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
5455         export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
5456                 if(!isWasmInitialized) {
5457                         throw new Error("initializeWasm() must be awaited first!");
5458                 }
5459                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
5460                 // debug statements here
5461         }
5462         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
5463         export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
5464                 if(!isWasmInitialized) {
5465                         throw new Error("initializeWasm() must be awaited first!");
5466                 }
5467                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
5468                 return nativeResponseValue;
5469         }
5470         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
5471         export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
5472                 if(!isWasmInitialized) {
5473                         throw new Error("initializeWasm() must be awaited first!");
5474                 }
5475                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
5476                 return nativeResponseValue;
5477         }
5478         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
5479         export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
5480                 if(!isWasmInitialized) {
5481                         throw new Error("initializeWasm() must be awaited first!");
5482                 }
5483                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
5484                 return nativeResponseValue;
5485         }
5486         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
5487         export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
5488                 if(!isWasmInitialized) {
5489                         throw new Error("initializeWasm() must be awaited first!");
5490                 }
5491                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
5492                 // debug statements here
5493         }
5494         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
5495         export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
5496                 if(!isWasmInitialized) {
5497                         throw new Error("initializeWasm() must be awaited first!");
5498                 }
5499                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
5500                 return nativeResponseValue;
5501         }
5502         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
5503         export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
5504                 if(!isWasmInitialized) {
5505                         throw new Error("initializeWasm() must be awaited first!");
5506                 }
5507                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
5508                 return nativeResponseValue;
5509         }
5510         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
5511         export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
5512                 if(!isWasmInitialized) {
5513                         throw new Error("initializeWasm() must be awaited first!");
5514                 }
5515                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
5516                 return nativeResponseValue;
5517         }
5518         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
5519         export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
5520                 if(!isWasmInitialized) {
5521                         throw new Error("initializeWasm() must be awaited first!");
5522                 }
5523                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
5524                 // debug statements here
5525         }
5526         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
5527         export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
5528                 if(!isWasmInitialized) {
5529                         throw new Error("initializeWasm() must be awaited first!");
5530                 }
5531                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
5532                 return nativeResponseValue;
5533         }
5534         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
5535         export function CVec_u64Z_free(_res: number[]): void {
5536                 if(!isWasmInitialized) {
5537                         throw new Error("initializeWasm() must be awaited first!");
5538                 }
5539                 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
5540                 // debug statements here
5541         }
5542         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
5543         export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
5544                 if(!isWasmInitialized) {
5545                         throw new Error("initializeWasm() must be awaited first!");
5546                 }
5547                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
5548                 return nativeResponseValue;
5549         }
5550         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
5551         export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
5552                 if(!isWasmInitialized) {
5553                         throw new Error("initializeWasm() must be awaited first!");
5554                 }
5555                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
5556                 return nativeResponseValue;
5557         }
5558         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
5559         export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
5560                 if(!isWasmInitialized) {
5561                         throw new Error("initializeWasm() must be awaited first!");
5562                 }
5563                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
5564                 // debug statements here
5565         }
5566         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
5567         export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
5568                 if(!isWasmInitialized) {
5569                         throw new Error("initializeWasm() must be awaited first!");
5570                 }
5571                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
5572                 return nativeResponseValue;
5573         }
5574         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
5575         export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
5576                 if(!isWasmInitialized) {
5577                         throw new Error("initializeWasm() must be awaited first!");
5578                 }
5579                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
5580                 return nativeResponseValue;
5581         }
5582         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
5583         export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
5584                 if(!isWasmInitialized) {
5585                         throw new Error("initializeWasm() must be awaited first!");
5586                 }
5587                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
5588                 return nativeResponseValue;
5589         }
5590         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
5591         export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
5592                 if(!isWasmInitialized) {
5593                         throw new Error("initializeWasm() must be awaited first!");
5594                 }
5595                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
5596                 // debug statements here
5597         }
5598         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
5599         export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
5600                 if(!isWasmInitialized) {
5601                         throw new Error("initializeWasm() must be awaited first!");
5602                 }
5603                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
5604                 return nativeResponseValue;
5605         }
5606         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_some(struct LDKCVec_NetAddressZ o);
5607         export function COption_CVec_NetAddressZZ_some(o: number[]): number {
5608                 if(!isWasmInitialized) {
5609                         throw new Error("initializeWasm() must be awaited first!");
5610                 }
5611                 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_some(o);
5612                 return nativeResponseValue;
5613         }
5614         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_none(void);
5615         export function COption_CVec_NetAddressZZ_none(): number {
5616                 if(!isWasmInitialized) {
5617                         throw new Error("initializeWasm() must be awaited first!");
5618                 }
5619                 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_none();
5620                 return nativeResponseValue;
5621         }
5622         // void COption_CVec_NetAddressZZ_free(struct LDKCOption_CVec_NetAddressZZ _res);
5623         export function COption_CVec_NetAddressZZ_free(_res: number): void {
5624                 if(!isWasmInitialized) {
5625                         throw new Error("initializeWasm() must be awaited first!");
5626                 }
5627                 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_free(_res);
5628                 // debug statements here
5629         }
5630         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_clone(const struct LDKCOption_CVec_NetAddressZZ *NONNULL_PTR orig);
5631         export function COption_CVec_NetAddressZZ_clone(orig: number): number {
5632                 if(!isWasmInitialized) {
5633                         throw new Error("initializeWasm() must be awaited first!");
5634                 }
5635                 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_clone(orig);
5636                 return nativeResponseValue;
5637         }
5638         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
5639         export function CResult_NetAddressu8Z_ok(o: number): number {
5640                 if(!isWasmInitialized) {
5641                         throw new Error("initializeWasm() must be awaited first!");
5642                 }
5643                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
5644                 return nativeResponseValue;
5645         }
5646         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
5647         export function CResult_NetAddressu8Z_err(e: number): number {
5648                 if(!isWasmInitialized) {
5649                         throw new Error("initializeWasm() must be awaited first!");
5650                 }
5651                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
5652                 return nativeResponseValue;
5653         }
5654         // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
5655         export function CResult_NetAddressu8Z_free(_res: number): void {
5656                 if(!isWasmInitialized) {
5657                         throw new Error("initializeWasm() must be awaited first!");
5658                 }
5659                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
5660                 // debug statements here
5661         }
5662         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
5663         export function CResult_NetAddressu8Z_clone(orig: number): number {
5664                 if(!isWasmInitialized) {
5665                         throw new Error("initializeWasm() must be awaited first!");
5666                 }
5667                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
5668                 return nativeResponseValue;
5669         }
5670         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
5671         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
5672                 if(!isWasmInitialized) {
5673                         throw new Error("initializeWasm() must be awaited first!");
5674                 }
5675                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
5676                 return nativeResponseValue;
5677         }
5678         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
5679         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
5680                 if(!isWasmInitialized) {
5681                         throw new Error("initializeWasm() must be awaited first!");
5682                 }
5683                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
5684                 return nativeResponseValue;
5685         }
5686         // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
5687         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
5688                 if(!isWasmInitialized) {
5689                         throw new Error("initializeWasm() must be awaited first!");
5690                 }
5691                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
5692                 // debug statements here
5693         }
5694         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
5695         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
5696                 if(!isWasmInitialized) {
5697                         throw new Error("initializeWasm() must be awaited first!");
5698                 }
5699                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
5700                 return nativeResponseValue;
5701         }
5702         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
5703         export function CResult_NetAddressDecodeErrorZ_ok(o: number): number {
5704                 if(!isWasmInitialized) {
5705                         throw new Error("initializeWasm() must be awaited first!");
5706                 }
5707                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_ok(o);
5708                 return nativeResponseValue;
5709         }
5710         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
5711         export function CResult_NetAddressDecodeErrorZ_err(e: number): number {
5712                 if(!isWasmInitialized) {
5713                         throw new Error("initializeWasm() must be awaited first!");
5714                 }
5715                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_err(e);
5716                 return nativeResponseValue;
5717         }
5718         // void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
5719         export function CResult_NetAddressDecodeErrorZ_free(_res: number): void {
5720                 if(!isWasmInitialized) {
5721                         throw new Error("initializeWasm() must be awaited first!");
5722                 }
5723                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_free(_res);
5724                 // debug statements here
5725         }
5726         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
5727         export function CResult_NetAddressDecodeErrorZ_clone(orig: number): number {
5728                 if(!isWasmInitialized) {
5729                         throw new Error("initializeWasm() must be awaited first!");
5730                 }
5731                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_clone(orig);
5732                 return nativeResponseValue;
5733         }
5734         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
5735         export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
5736                 if(!isWasmInitialized) {
5737                         throw new Error("initializeWasm() must be awaited first!");
5738                 }
5739                 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
5740                 // debug statements here
5741         }
5742         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
5743         export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
5744                 if(!isWasmInitialized) {
5745                         throw new Error("initializeWasm() must be awaited first!");
5746                 }
5747                 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
5748                 // debug statements here
5749         }
5750         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
5751         export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
5752                 if(!isWasmInitialized) {
5753                         throw new Error("initializeWasm() must be awaited first!");
5754                 }
5755                 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
5756                 // debug statements here
5757         }
5758         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
5759         export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
5760                 if(!isWasmInitialized) {
5761                         throw new Error("initializeWasm() must be awaited first!");
5762                 }
5763                 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
5764                 // debug statements here
5765         }
5766         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
5767         export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
5768                 if(!isWasmInitialized) {
5769                         throw new Error("initializeWasm() must be awaited first!");
5770                 }
5771                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
5772                 return nativeResponseValue;
5773         }
5774         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
5775         export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
5776                 if(!isWasmInitialized) {
5777                         throw new Error("initializeWasm() must be awaited first!");
5778                 }
5779                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
5780                 return nativeResponseValue;
5781         }
5782         // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
5783         export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
5784                 if(!isWasmInitialized) {
5785                         throw new Error("initializeWasm() must be awaited first!");
5786                 }
5787                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
5788                 // debug statements here
5789         }
5790         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
5791         export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
5792                 if(!isWasmInitialized) {
5793                         throw new Error("initializeWasm() must be awaited first!");
5794                 }
5795                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
5796                 return nativeResponseValue;
5797         }
5798         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
5799         export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
5800                 if(!isWasmInitialized) {
5801                         throw new Error("initializeWasm() must be awaited first!");
5802                 }
5803                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
5804                 return nativeResponseValue;
5805         }
5806         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
5807         export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
5808                 if(!isWasmInitialized) {
5809                         throw new Error("initializeWasm() must be awaited first!");
5810                 }
5811                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
5812                 return nativeResponseValue;
5813         }
5814         // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
5815         export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
5816                 if(!isWasmInitialized) {
5817                         throw new Error("initializeWasm() must be awaited first!");
5818                 }
5819                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
5820                 // debug statements here
5821         }
5822         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
5823         export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
5824                 if(!isWasmInitialized) {
5825                         throw new Error("initializeWasm() must be awaited first!");
5826                 }
5827                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
5828                 return nativeResponseValue;
5829         }
5830         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
5831         export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
5832                 if(!isWasmInitialized) {
5833                         throw new Error("initializeWasm() must be awaited first!");
5834                 }
5835                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
5836                 return nativeResponseValue;
5837         }
5838         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
5839         export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
5840                 if(!isWasmInitialized) {
5841                         throw new Error("initializeWasm() must be awaited first!");
5842                 }
5843                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
5844                 return nativeResponseValue;
5845         }
5846         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
5847         export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
5848                 if(!isWasmInitialized) {
5849                         throw new Error("initializeWasm() must be awaited first!");
5850                 }
5851                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
5852                 // debug statements here
5853         }
5854         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
5855         export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
5856                 if(!isWasmInitialized) {
5857                         throw new Error("initializeWasm() must be awaited first!");
5858                 }
5859                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
5860                 return nativeResponseValue;
5861         }
5862         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
5863         export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
5864                 if(!isWasmInitialized) {
5865                         throw new Error("initializeWasm() must be awaited first!");
5866                 }
5867                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
5868                 return nativeResponseValue;
5869         }
5870         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
5871         export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
5872                 if(!isWasmInitialized) {
5873                         throw new Error("initializeWasm() must be awaited first!");
5874                 }
5875                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
5876                 return nativeResponseValue;
5877         }
5878         // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
5879         export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
5880                 if(!isWasmInitialized) {
5881                         throw new Error("initializeWasm() must be awaited first!");
5882                 }
5883                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
5884                 // debug statements here
5885         }
5886         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
5887         export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
5888                 if(!isWasmInitialized) {
5889                         throw new Error("initializeWasm() must be awaited first!");
5890                 }
5891                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
5892                 return nativeResponseValue;
5893         }
5894         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(struct LDKClosingSignedFeeRange o);
5895         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o: number): number {
5896                 if(!isWasmInitialized) {
5897                         throw new Error("initializeWasm() must be awaited first!");
5898                 }
5899                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o);
5900                 return nativeResponseValue;
5901         }
5902         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_err(struct LDKDecodeError e);
5903         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e: number): number {
5904                 if(!isWasmInitialized) {
5905                         throw new Error("initializeWasm() must be awaited first!");
5906                 }
5907                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e);
5908                 return nativeResponseValue;
5909         }
5910         // void CResult_ClosingSignedFeeRangeDecodeErrorZ_free(struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ _res);
5911         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res: number): void {
5912                 if(!isWasmInitialized) {
5913                         throw new Error("initializeWasm() must be awaited first!");
5914                 }
5915                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res);
5916                 // debug statements here
5917         }
5918         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR orig);
5919         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig: number): number {
5920                 if(!isWasmInitialized) {
5921                         throw new Error("initializeWasm() must be awaited first!");
5922                 }
5923                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig);
5924                 return nativeResponseValue;
5925         }
5926         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
5927         export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
5928                 if(!isWasmInitialized) {
5929                         throw new Error("initializeWasm() must be awaited first!");
5930                 }
5931                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
5932                 return nativeResponseValue;
5933         }
5934         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
5935         export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
5936                 if(!isWasmInitialized) {
5937                         throw new Error("initializeWasm() must be awaited first!");
5938                 }
5939                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
5940                 return nativeResponseValue;
5941         }
5942         // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
5943         export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
5944                 if(!isWasmInitialized) {
5945                         throw new Error("initializeWasm() must be awaited first!");
5946                 }
5947                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
5948                 // debug statements here
5949         }
5950         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
5951         export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
5952                 if(!isWasmInitialized) {
5953                         throw new Error("initializeWasm() must be awaited first!");
5954                 }
5955                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
5956                 return nativeResponseValue;
5957         }
5958         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
5959         export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
5960                 if(!isWasmInitialized) {
5961                         throw new Error("initializeWasm() must be awaited first!");
5962                 }
5963                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
5964                 return nativeResponseValue;
5965         }
5966         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
5967         export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
5968                 if(!isWasmInitialized) {
5969                         throw new Error("initializeWasm() must be awaited first!");
5970                 }
5971                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
5972                 return nativeResponseValue;
5973         }
5974         // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
5975         export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
5976                 if(!isWasmInitialized) {
5977                         throw new Error("initializeWasm() must be awaited first!");
5978                 }
5979                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
5980                 // debug statements here
5981         }
5982         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
5983         export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
5984                 if(!isWasmInitialized) {
5985                         throw new Error("initializeWasm() must be awaited first!");
5986                 }
5987                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
5988                 return nativeResponseValue;
5989         }
5990         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
5991         export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
5992                 if(!isWasmInitialized) {
5993                         throw new Error("initializeWasm() must be awaited first!");
5994                 }
5995                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
5996                 return nativeResponseValue;
5997         }
5998         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
5999         export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
6000                 if(!isWasmInitialized) {
6001                         throw new Error("initializeWasm() must be awaited first!");
6002                 }
6003                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
6004                 return nativeResponseValue;
6005         }
6006         // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
6007         export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
6008                 if(!isWasmInitialized) {
6009                         throw new Error("initializeWasm() must be awaited first!");
6010                 }
6011                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
6012                 // debug statements here
6013         }
6014         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
6015         export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
6016                 if(!isWasmInitialized) {
6017                         throw new Error("initializeWasm() must be awaited first!");
6018                 }
6019                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
6020                 return nativeResponseValue;
6021         }
6022         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
6023         export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
6024                 if(!isWasmInitialized) {
6025                         throw new Error("initializeWasm() must be awaited first!");
6026                 }
6027                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
6028                 return nativeResponseValue;
6029         }
6030         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
6031         export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
6032                 if(!isWasmInitialized) {
6033                         throw new Error("initializeWasm() must be awaited first!");
6034                 }
6035                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
6036                 return nativeResponseValue;
6037         }
6038         // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
6039         export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
6040                 if(!isWasmInitialized) {
6041                         throw new Error("initializeWasm() must be awaited first!");
6042                 }
6043                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
6044                 // debug statements here
6045         }
6046         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
6047         export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
6048                 if(!isWasmInitialized) {
6049                         throw new Error("initializeWasm() must be awaited first!");
6050                 }
6051                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
6052                 return nativeResponseValue;
6053         }
6054         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
6055         export function CResult_InitDecodeErrorZ_ok(o: number): number {
6056                 if(!isWasmInitialized) {
6057                         throw new Error("initializeWasm() must be awaited first!");
6058                 }
6059                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
6060                 return nativeResponseValue;
6061         }
6062         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
6063         export function CResult_InitDecodeErrorZ_err(e: number): number {
6064                 if(!isWasmInitialized) {
6065                         throw new Error("initializeWasm() must be awaited first!");
6066                 }
6067                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
6068                 return nativeResponseValue;
6069         }
6070         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
6071         export function CResult_InitDecodeErrorZ_free(_res: number): void {
6072                 if(!isWasmInitialized) {
6073                         throw new Error("initializeWasm() must be awaited first!");
6074                 }
6075                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
6076                 // debug statements here
6077         }
6078         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
6079         export function CResult_InitDecodeErrorZ_clone(orig: number): number {
6080                 if(!isWasmInitialized) {
6081                         throw new Error("initializeWasm() must be awaited first!");
6082                 }
6083                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
6084                 return nativeResponseValue;
6085         }
6086         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
6087         export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
6088                 if(!isWasmInitialized) {
6089                         throw new Error("initializeWasm() must be awaited first!");
6090                 }
6091                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
6092                 return nativeResponseValue;
6093         }
6094         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
6095         export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
6096                 if(!isWasmInitialized) {
6097                         throw new Error("initializeWasm() must be awaited first!");
6098                 }
6099                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
6100                 return nativeResponseValue;
6101         }
6102         // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
6103         export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
6104                 if(!isWasmInitialized) {
6105                         throw new Error("initializeWasm() must be awaited first!");
6106                 }
6107                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
6108                 // debug statements here
6109         }
6110         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
6111         export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
6112                 if(!isWasmInitialized) {
6113                         throw new Error("initializeWasm() must be awaited first!");
6114                 }
6115                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
6116                 return nativeResponseValue;
6117         }
6118         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
6119         export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
6120                 if(!isWasmInitialized) {
6121                         throw new Error("initializeWasm() must be awaited first!");
6122                 }
6123                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
6124                 return nativeResponseValue;
6125         }
6126         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
6127         export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
6128                 if(!isWasmInitialized) {
6129                         throw new Error("initializeWasm() must be awaited first!");
6130                 }
6131                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
6132                 return nativeResponseValue;
6133         }
6134         // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
6135         export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
6136                 if(!isWasmInitialized) {
6137                         throw new Error("initializeWasm() must be awaited first!");
6138                 }
6139                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
6140                 // debug statements here
6141         }
6142         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
6143         export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
6144                 if(!isWasmInitialized) {
6145                         throw new Error("initializeWasm() must be awaited first!");
6146                 }
6147                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
6148                 return nativeResponseValue;
6149         }
6150         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
6151         export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
6152                 if(!isWasmInitialized) {
6153                         throw new Error("initializeWasm() must be awaited first!");
6154                 }
6155                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
6156                 return nativeResponseValue;
6157         }
6158         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
6159         export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
6160                 if(!isWasmInitialized) {
6161                         throw new Error("initializeWasm() must be awaited first!");
6162                 }
6163                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
6164                 return nativeResponseValue;
6165         }
6166         // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
6167         export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
6168                 if(!isWasmInitialized) {
6169                         throw new Error("initializeWasm() must be awaited first!");
6170                 }
6171                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
6172                 // debug statements here
6173         }
6174         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
6175         export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
6176                 if(!isWasmInitialized) {
6177                         throw new Error("initializeWasm() must be awaited first!");
6178                 }
6179                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
6180                 return nativeResponseValue;
6181         }
6182         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
6183         export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
6184                 if(!isWasmInitialized) {
6185                         throw new Error("initializeWasm() must be awaited first!");
6186                 }
6187                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
6188                 return nativeResponseValue;
6189         }
6190         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
6191         export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
6192                 if(!isWasmInitialized) {
6193                         throw new Error("initializeWasm() must be awaited first!");
6194                 }
6195                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
6196                 return nativeResponseValue;
6197         }
6198         // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
6199         export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
6200                 if(!isWasmInitialized) {
6201                         throw new Error("initializeWasm() must be awaited first!");
6202                 }
6203                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
6204                 // debug statements here
6205         }
6206         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
6207         export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
6208                 if(!isWasmInitialized) {
6209                         throw new Error("initializeWasm() must be awaited first!");
6210                 }
6211                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
6212                 return nativeResponseValue;
6213         }
6214         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
6215         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
6216                 if(!isWasmInitialized) {
6217                         throw new Error("initializeWasm() must be awaited first!");
6218                 }
6219                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
6220                 return nativeResponseValue;
6221         }
6222         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
6223         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
6224                 if(!isWasmInitialized) {
6225                         throw new Error("initializeWasm() must be awaited first!");
6226                 }
6227                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
6228                 return nativeResponseValue;
6229         }
6230         // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
6231         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
6232                 if(!isWasmInitialized) {
6233                         throw new Error("initializeWasm() must be awaited first!");
6234                 }
6235                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
6236                 // debug statements here
6237         }
6238         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
6239         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
6240                 if(!isWasmInitialized) {
6241                         throw new Error("initializeWasm() must be awaited first!");
6242                 }
6243                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
6244                 return nativeResponseValue;
6245         }
6246         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
6247         export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
6248                 if(!isWasmInitialized) {
6249                         throw new Error("initializeWasm() must be awaited first!");
6250                 }
6251                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
6252                 return nativeResponseValue;
6253         }
6254         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
6255         export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
6256                 if(!isWasmInitialized) {
6257                         throw new Error("initializeWasm() must be awaited first!");
6258                 }
6259                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
6260                 return nativeResponseValue;
6261         }
6262         // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
6263         export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
6264                 if(!isWasmInitialized) {
6265                         throw new Error("initializeWasm() must be awaited first!");
6266                 }
6267                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
6268                 // debug statements here
6269         }
6270         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
6271         export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
6272                 if(!isWasmInitialized) {
6273                         throw new Error("initializeWasm() must be awaited first!");
6274                 }
6275                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
6276                 return nativeResponseValue;
6277         }
6278         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
6279         export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
6280                 if(!isWasmInitialized) {
6281                         throw new Error("initializeWasm() must be awaited first!");
6282                 }
6283                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
6284                 return nativeResponseValue;
6285         }
6286         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
6287         export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
6288                 if(!isWasmInitialized) {
6289                         throw new Error("initializeWasm() must be awaited first!");
6290                 }
6291                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
6292                 return nativeResponseValue;
6293         }
6294         // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
6295         export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
6296                 if(!isWasmInitialized) {
6297                         throw new Error("initializeWasm() must be awaited first!");
6298                 }
6299                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
6300                 // debug statements here
6301         }
6302         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
6303         export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
6304                 if(!isWasmInitialized) {
6305                         throw new Error("initializeWasm() must be awaited first!");
6306                 }
6307                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
6308                 return nativeResponseValue;
6309         }
6310         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
6311         export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
6312                 if(!isWasmInitialized) {
6313                         throw new Error("initializeWasm() must be awaited first!");
6314                 }
6315                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
6316                 return nativeResponseValue;
6317         }
6318         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
6319         export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
6320                 if(!isWasmInitialized) {
6321                         throw new Error("initializeWasm() must be awaited first!");
6322                 }
6323                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
6324                 return nativeResponseValue;
6325         }
6326         // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
6327         export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
6328                 if(!isWasmInitialized) {
6329                         throw new Error("initializeWasm() must be awaited first!");
6330                 }
6331                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
6332                 // debug statements here
6333         }
6334         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
6335         export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
6336                 if(!isWasmInitialized) {
6337                         throw new Error("initializeWasm() must be awaited first!");
6338                 }
6339                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
6340                 return nativeResponseValue;
6341         }
6342         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
6343         export function CResult_PingDecodeErrorZ_ok(o: number): number {
6344                 if(!isWasmInitialized) {
6345                         throw new Error("initializeWasm() must be awaited first!");
6346                 }
6347                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
6348                 return nativeResponseValue;
6349         }
6350         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
6351         export function CResult_PingDecodeErrorZ_err(e: number): number {
6352                 if(!isWasmInitialized) {
6353                         throw new Error("initializeWasm() must be awaited first!");
6354                 }
6355                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
6356                 return nativeResponseValue;
6357         }
6358         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
6359         export function CResult_PingDecodeErrorZ_free(_res: number): void {
6360                 if(!isWasmInitialized) {
6361                         throw new Error("initializeWasm() must be awaited first!");
6362                 }
6363                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
6364                 // debug statements here
6365         }
6366         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
6367         export function CResult_PingDecodeErrorZ_clone(orig: number): number {
6368                 if(!isWasmInitialized) {
6369                         throw new Error("initializeWasm() must be awaited first!");
6370                 }
6371                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
6372                 return nativeResponseValue;
6373         }
6374         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
6375         export function CResult_PongDecodeErrorZ_ok(o: number): number {
6376                 if(!isWasmInitialized) {
6377                         throw new Error("initializeWasm() must be awaited first!");
6378                 }
6379                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
6380                 return nativeResponseValue;
6381         }
6382         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
6383         export function CResult_PongDecodeErrorZ_err(e: number): number {
6384                 if(!isWasmInitialized) {
6385                         throw new Error("initializeWasm() must be awaited first!");
6386                 }
6387                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
6388                 return nativeResponseValue;
6389         }
6390         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
6391         export function CResult_PongDecodeErrorZ_free(_res: number): void {
6392                 if(!isWasmInitialized) {
6393                         throw new Error("initializeWasm() must be awaited first!");
6394                 }
6395                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
6396                 // debug statements here
6397         }
6398         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
6399         export function CResult_PongDecodeErrorZ_clone(orig: number): number {
6400                 if(!isWasmInitialized) {
6401                         throw new Error("initializeWasm() must be awaited first!");
6402                 }
6403                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
6404                 return nativeResponseValue;
6405         }
6406         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
6407         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
6408                 if(!isWasmInitialized) {
6409                         throw new Error("initializeWasm() must be awaited first!");
6410                 }
6411                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
6412                 return nativeResponseValue;
6413         }
6414         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
6415         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
6416                 if(!isWasmInitialized) {
6417                         throw new Error("initializeWasm() must be awaited first!");
6418                 }
6419                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
6420                 return nativeResponseValue;
6421         }
6422         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
6423         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
6424                 if(!isWasmInitialized) {
6425                         throw new Error("initializeWasm() must be awaited first!");
6426                 }
6427                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
6428                 // debug statements here
6429         }
6430         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
6431         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
6432                 if(!isWasmInitialized) {
6433                         throw new Error("initializeWasm() must be awaited first!");
6434                 }
6435                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
6436                 return nativeResponseValue;
6437         }
6438         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
6439         export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
6440                 if(!isWasmInitialized) {
6441                         throw new Error("initializeWasm() must be awaited first!");
6442                 }
6443                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
6444                 return nativeResponseValue;
6445         }
6446         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
6447         export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
6448                 if(!isWasmInitialized) {
6449                         throw new Error("initializeWasm() must be awaited first!");
6450                 }
6451                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
6452                 return nativeResponseValue;
6453         }
6454         // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
6455         export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
6456                 if(!isWasmInitialized) {
6457                         throw new Error("initializeWasm() must be awaited first!");
6458                 }
6459                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
6460                 // debug statements here
6461         }
6462         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
6463         export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
6464                 if(!isWasmInitialized) {
6465                         throw new Error("initializeWasm() must be awaited first!");
6466                 }
6467                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
6468                 return nativeResponseValue;
6469         }
6470         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
6471         export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
6472                 if(!isWasmInitialized) {
6473                         throw new Error("initializeWasm() must be awaited first!");
6474                 }
6475                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
6476                 return nativeResponseValue;
6477         }
6478         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
6479         export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
6480                 if(!isWasmInitialized) {
6481                         throw new Error("initializeWasm() must be awaited first!");
6482                 }
6483                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
6484                 return nativeResponseValue;
6485         }
6486         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
6487         export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
6488                 if(!isWasmInitialized) {
6489                         throw new Error("initializeWasm() must be awaited first!");
6490                 }
6491                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
6492                 // debug statements here
6493         }
6494         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
6495         export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
6496                 if(!isWasmInitialized) {
6497                         throw new Error("initializeWasm() must be awaited first!");
6498                 }
6499                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
6500                 return nativeResponseValue;
6501         }
6502         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
6503         export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
6504                 if(!isWasmInitialized) {
6505                         throw new Error("initializeWasm() must be awaited first!");
6506                 }
6507                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
6508                 return nativeResponseValue;
6509         }
6510         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
6511         export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
6512                 if(!isWasmInitialized) {
6513                         throw new Error("initializeWasm() must be awaited first!");
6514                 }
6515                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
6516                 return nativeResponseValue;
6517         }
6518         // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
6519         export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
6520                 if(!isWasmInitialized) {
6521                         throw new Error("initializeWasm() must be awaited first!");
6522                 }
6523                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
6524                 // debug statements here
6525         }
6526         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
6527         export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
6528                 if(!isWasmInitialized) {
6529                         throw new Error("initializeWasm() must be awaited first!");
6530                 }
6531                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
6532                 return nativeResponseValue;
6533         }
6534         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
6535         export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
6536                 if(!isWasmInitialized) {
6537                         throw new Error("initializeWasm() must be awaited first!");
6538                 }
6539                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
6540                 return nativeResponseValue;
6541         }
6542         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
6543         export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
6544                 if(!isWasmInitialized) {
6545                         throw new Error("initializeWasm() must be awaited first!");
6546                 }
6547                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
6548                 return nativeResponseValue;
6549         }
6550         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
6551         export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
6552                 if(!isWasmInitialized) {
6553                         throw new Error("initializeWasm() must be awaited first!");
6554                 }
6555                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
6556                 // debug statements here
6557         }
6558         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
6559         export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
6560                 if(!isWasmInitialized) {
6561                         throw new Error("initializeWasm() must be awaited first!");
6562                 }
6563                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
6564                 return nativeResponseValue;
6565         }
6566         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
6567         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
6568                 if(!isWasmInitialized) {
6569                         throw new Error("initializeWasm() must be awaited first!");
6570                 }
6571                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
6572                 return nativeResponseValue;
6573         }
6574         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
6575         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
6576                 if(!isWasmInitialized) {
6577                         throw new Error("initializeWasm() must be awaited first!");
6578                 }
6579                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
6580                 return nativeResponseValue;
6581         }
6582         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
6583         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
6584                 if(!isWasmInitialized) {
6585                         throw new Error("initializeWasm() must be awaited first!");
6586                 }
6587                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
6588                 // debug statements here
6589         }
6590         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
6591         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
6592                 if(!isWasmInitialized) {
6593                         throw new Error("initializeWasm() must be awaited first!");
6594                 }
6595                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
6596                 return nativeResponseValue;
6597         }
6598         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
6599         export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
6600                 if(!isWasmInitialized) {
6601                         throw new Error("initializeWasm() must be awaited first!");
6602                 }
6603                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
6604                 return nativeResponseValue;
6605         }
6606         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
6607         export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
6608                 if(!isWasmInitialized) {
6609                         throw new Error("initializeWasm() must be awaited first!");
6610                 }
6611                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
6612                 return nativeResponseValue;
6613         }
6614         // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
6615         export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
6616                 if(!isWasmInitialized) {
6617                         throw new Error("initializeWasm() must be awaited first!");
6618                 }
6619                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
6620                 // debug statements here
6621         }
6622         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
6623         export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
6624                 if(!isWasmInitialized) {
6625                         throw new Error("initializeWasm() must be awaited first!");
6626                 }
6627                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
6628                 return nativeResponseValue;
6629         }
6630         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
6631         export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
6632                 if(!isWasmInitialized) {
6633                         throw new Error("initializeWasm() must be awaited first!");
6634                 }
6635                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
6636                 return nativeResponseValue;
6637         }
6638         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
6639         export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
6640                 if(!isWasmInitialized) {
6641                         throw new Error("initializeWasm() must be awaited first!");
6642                 }
6643                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
6644                 return nativeResponseValue;
6645         }
6646         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
6647         export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
6648                 if(!isWasmInitialized) {
6649                         throw new Error("initializeWasm() must be awaited first!");
6650                 }
6651                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
6652                 // debug statements here
6653         }
6654         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
6655         export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
6656                 if(!isWasmInitialized) {
6657                         throw new Error("initializeWasm() must be awaited first!");
6658                 }
6659                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
6660                 return nativeResponseValue;
6661         }
6662         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
6663         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
6664                 if(!isWasmInitialized) {
6665                         throw new Error("initializeWasm() must be awaited first!");
6666                 }
6667                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
6668                 return nativeResponseValue;
6669         }
6670         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
6671         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
6672                 if(!isWasmInitialized) {
6673                         throw new Error("initializeWasm() must be awaited first!");
6674                 }
6675                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
6676                 return nativeResponseValue;
6677         }
6678         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
6679         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
6680                 if(!isWasmInitialized) {
6681                         throw new Error("initializeWasm() must be awaited first!");
6682                 }
6683                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
6684                 // debug statements here
6685         }
6686         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
6687         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
6688                 if(!isWasmInitialized) {
6689                         throw new Error("initializeWasm() must be awaited first!");
6690                 }
6691                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
6692                 return nativeResponseValue;
6693         }
6694         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
6695         export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
6696                 if(!isWasmInitialized) {
6697                         throw new Error("initializeWasm() must be awaited first!");
6698                 }
6699                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
6700                 return nativeResponseValue;
6701         }
6702         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
6703         export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
6704                 if(!isWasmInitialized) {
6705                         throw new Error("initializeWasm() must be awaited first!");
6706                 }
6707                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
6708                 return nativeResponseValue;
6709         }
6710         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
6711         export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
6712                 if(!isWasmInitialized) {
6713                         throw new Error("initializeWasm() must be awaited first!");
6714                 }
6715                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
6716                 // debug statements here
6717         }
6718         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
6719         export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
6720                 if(!isWasmInitialized) {
6721                         throw new Error("initializeWasm() must be awaited first!");
6722                 }
6723                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
6724                 return nativeResponseValue;
6725         }
6726         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
6727         export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
6728                 if(!isWasmInitialized) {
6729                         throw new Error("initializeWasm() must be awaited first!");
6730                 }
6731                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
6732                 return nativeResponseValue;
6733         }
6734         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
6735         export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
6736                 if(!isWasmInitialized) {
6737                         throw new Error("initializeWasm() must be awaited first!");
6738                 }
6739                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
6740                 return nativeResponseValue;
6741         }
6742         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
6743         export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
6744                 if(!isWasmInitialized) {
6745                         throw new Error("initializeWasm() must be awaited first!");
6746                 }
6747                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
6748                 // debug statements here
6749         }
6750         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
6751         export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
6752                 if(!isWasmInitialized) {
6753                         throw new Error("initializeWasm() must be awaited first!");
6754                 }
6755                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
6756                 return nativeResponseValue;
6757         }
6758         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
6759         export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
6760                 if(!isWasmInitialized) {
6761                         throw new Error("initializeWasm() must be awaited first!");
6762                 }
6763                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
6764                 return nativeResponseValue;
6765         }
6766         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
6767         export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
6768                 if(!isWasmInitialized) {
6769                         throw new Error("initializeWasm() must be awaited first!");
6770                 }
6771                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
6772                 return nativeResponseValue;
6773         }
6774         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
6775         export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
6776                 if(!isWasmInitialized) {
6777                         throw new Error("initializeWasm() must be awaited first!");
6778                 }
6779                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
6780                 // debug statements here
6781         }
6782         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
6783         export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
6784                 if(!isWasmInitialized) {
6785                         throw new Error("initializeWasm() must be awaited first!");
6786                 }
6787                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
6788                 return nativeResponseValue;
6789         }
6790         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_ok(struct LDKInvoice o);
6791         export function CResult_InvoiceSignOrCreationErrorZ_ok(o: number): number {
6792                 if(!isWasmInitialized) {
6793                         throw new Error("initializeWasm() must be awaited first!");
6794                 }
6795                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_ok(o);
6796                 return nativeResponseValue;
6797         }
6798         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e);
6799         export function CResult_InvoiceSignOrCreationErrorZ_err(e: number): number {
6800                 if(!isWasmInitialized) {
6801                         throw new Error("initializeWasm() must be awaited first!");
6802                 }
6803                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_err(e);
6804                 return nativeResponseValue;
6805         }
6806         // void CResult_InvoiceSignOrCreationErrorZ_free(struct LDKCResult_InvoiceSignOrCreationErrorZ _res);
6807         export function CResult_InvoiceSignOrCreationErrorZ_free(_res: number): void {
6808                 if(!isWasmInitialized) {
6809                         throw new Error("initializeWasm() must be awaited first!");
6810                 }
6811                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_free(_res);
6812                 // debug statements here
6813         }
6814         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig);
6815         export function CResult_InvoiceSignOrCreationErrorZ_clone(orig: number): number {
6816                 if(!isWasmInitialized) {
6817                         throw new Error("initializeWasm() must be awaited first!");
6818                 }
6819                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_clone(orig);
6820                 return nativeResponseValue;
6821         }
6822         // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o);
6823         export function COption_FilterZ_some(o: number): number {
6824                 if(!isWasmInitialized) {
6825                         throw new Error("initializeWasm() must be awaited first!");
6826                 }
6827                 const nativeResponseValue = wasm.COption_FilterZ_some(o);
6828                 return nativeResponseValue;
6829         }
6830         // struct LDKCOption_FilterZ COption_FilterZ_none(void);
6831         export function COption_FilterZ_none(): number {
6832                 if(!isWasmInitialized) {
6833                         throw new Error("initializeWasm() must be awaited first!");
6834                 }
6835                 const nativeResponseValue = wasm.COption_FilterZ_none();
6836                 return nativeResponseValue;
6837         }
6838         // void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
6839         export function COption_FilterZ_free(_res: number): void {
6840                 if(!isWasmInitialized) {
6841                         throw new Error("initializeWasm() must be awaited first!");
6842                 }
6843                 const nativeResponseValue = wasm.COption_FilterZ_free(_res);
6844                 // debug statements here
6845         }
6846         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_ok(struct LDKLockedChannelMonitor o);
6847         export function CResult_LockedChannelMonitorNoneZ_ok(o: number): number {
6848                 if(!isWasmInitialized) {
6849                         throw new Error("initializeWasm() must be awaited first!");
6850                 }
6851                 const nativeResponseValue = wasm.CResult_LockedChannelMonitorNoneZ_ok(o);
6852                 return nativeResponseValue;
6853         }
6854         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_err(void);
6855         export function CResult_LockedChannelMonitorNoneZ_err(): number {
6856                 if(!isWasmInitialized) {
6857                         throw new Error("initializeWasm() must be awaited first!");
6858                 }
6859                 const nativeResponseValue = wasm.CResult_LockedChannelMonitorNoneZ_err();
6860                 return nativeResponseValue;
6861         }
6862         // void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res);
6863         export function CResult_LockedChannelMonitorNoneZ_free(_res: number): void {
6864                 if(!isWasmInitialized) {
6865                         throw new Error("initializeWasm() must be awaited first!");
6866                 }
6867                 const nativeResponseValue = wasm.CResult_LockedChannelMonitorNoneZ_free(_res);
6868                 // debug statements here
6869         }
6870         // void CVec_OutPointZ_free(struct LDKCVec_OutPointZ _res);
6871         export function CVec_OutPointZ_free(_res: number[]): void {
6872                 if(!isWasmInitialized) {
6873                         throw new Error("initializeWasm() must be awaited first!");
6874                 }
6875                 const nativeResponseValue = wasm.CVec_OutPointZ_free(_res);
6876                 // debug statements here
6877         }
6878         // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
6879         export function PaymentPurpose_free(this_ptr: number): void {
6880                 if(!isWasmInitialized) {
6881                         throw new Error("initializeWasm() must be awaited first!");
6882                 }
6883                 const nativeResponseValue = wasm.PaymentPurpose_free(this_ptr);
6884                 // debug statements here
6885         }
6886         // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
6887         export function PaymentPurpose_clone(orig: number): number {
6888                 if(!isWasmInitialized) {
6889                         throw new Error("initializeWasm() must be awaited first!");
6890                 }
6891                 const nativeResponseValue = wasm.PaymentPurpose_clone(orig);
6892                 return nativeResponseValue;
6893         }
6894         // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret, uint64_t user_payment_id);
6895         export function PaymentPurpose_invoice_payment(payment_preimage: Uint8Array, payment_secret: Uint8Array, user_payment_id: number): number {
6896                 if(!isWasmInitialized) {
6897                         throw new Error("initializeWasm() must be awaited first!");
6898                 }
6899                 const nativeResponseValue = wasm.PaymentPurpose_invoice_payment(encodeArray(payment_preimage), encodeArray(payment_secret), user_payment_id);
6900                 return nativeResponseValue;
6901         }
6902         // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
6903         export function PaymentPurpose_spontaneous_payment(a: Uint8Array): number {
6904                 if(!isWasmInitialized) {
6905                         throw new Error("initializeWasm() must be awaited first!");
6906                 }
6907                 const nativeResponseValue = wasm.PaymentPurpose_spontaneous_payment(encodeArray(a));
6908                 return nativeResponseValue;
6909         }
6910         // void ClosureReason_free(struct LDKClosureReason this_ptr);
6911         export function ClosureReason_free(this_ptr: number): void {
6912                 if(!isWasmInitialized) {
6913                         throw new Error("initializeWasm() must be awaited first!");
6914                 }
6915                 const nativeResponseValue = wasm.ClosureReason_free(this_ptr);
6916                 // debug statements here
6917         }
6918         // struct LDKClosureReason ClosureReason_clone(const struct LDKClosureReason *NONNULL_PTR orig);
6919         export function ClosureReason_clone(orig: number): number {
6920                 if(!isWasmInitialized) {
6921                         throw new Error("initializeWasm() must be awaited first!");
6922                 }
6923                 const nativeResponseValue = wasm.ClosureReason_clone(orig);
6924                 return nativeResponseValue;
6925         }
6926         // struct LDKClosureReason ClosureReason_counterparty_force_closed(struct LDKStr peer_msg);
6927         export function ClosureReason_counterparty_force_closed(peer_msg: String): number {
6928                 if(!isWasmInitialized) {
6929                         throw new Error("initializeWasm() must be awaited first!");
6930                 }
6931                 const nativeResponseValue = wasm.ClosureReason_counterparty_force_closed(peer_msg);
6932                 return nativeResponseValue;
6933         }
6934         // struct LDKClosureReason ClosureReason_holder_force_closed(void);
6935         export function ClosureReason_holder_force_closed(): number {
6936                 if(!isWasmInitialized) {
6937                         throw new Error("initializeWasm() must be awaited first!");
6938                 }
6939                 const nativeResponseValue = wasm.ClosureReason_holder_force_closed();
6940                 return nativeResponseValue;
6941         }
6942         // struct LDKClosureReason ClosureReason_cooperative_closure(void);
6943         export function ClosureReason_cooperative_closure(): number {
6944                 if(!isWasmInitialized) {
6945                         throw new Error("initializeWasm() must be awaited first!");
6946                 }
6947                 const nativeResponseValue = wasm.ClosureReason_cooperative_closure();
6948                 return nativeResponseValue;
6949         }
6950         // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void);
6951         export function ClosureReason_commitment_tx_confirmed(): number {
6952                 if(!isWasmInitialized) {
6953                         throw new Error("initializeWasm() must be awaited first!");
6954                 }
6955                 const nativeResponseValue = wasm.ClosureReason_commitment_tx_confirmed();
6956                 return nativeResponseValue;
6957         }
6958         // struct LDKClosureReason ClosureReason_processing_error(struct LDKStr err);
6959         export function ClosureReason_processing_error(err: String): number {
6960                 if(!isWasmInitialized) {
6961                         throw new Error("initializeWasm() must be awaited first!");
6962                 }
6963                 const nativeResponseValue = wasm.ClosureReason_processing_error(err);
6964                 return nativeResponseValue;
6965         }
6966         // struct LDKClosureReason ClosureReason_disconnected_peer(void);
6967         export function ClosureReason_disconnected_peer(): number {
6968                 if(!isWasmInitialized) {
6969                         throw new Error("initializeWasm() must be awaited first!");
6970                 }
6971                 const nativeResponseValue = wasm.ClosureReason_disconnected_peer();
6972                 return nativeResponseValue;
6973         }
6974         // struct LDKClosureReason ClosureReason_outdated_channel_manager(void);
6975         export function ClosureReason_outdated_channel_manager(): number {
6976                 if(!isWasmInitialized) {
6977                         throw new Error("initializeWasm() must be awaited first!");
6978                 }
6979                 const nativeResponseValue = wasm.ClosureReason_outdated_channel_manager();
6980                 return nativeResponseValue;
6981         }
6982         // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
6983         export function ClosureReason_write(obj: number): Uint8Array {
6984                 if(!isWasmInitialized) {
6985                         throw new Error("initializeWasm() must be awaited first!");
6986                 }
6987                 const nativeResponseValue = wasm.ClosureReason_write(obj);
6988                 return decodeArray(nativeResponseValue);
6989         }
6990         // void Event_free(struct LDKEvent this_ptr);
6991         export function Event_free(this_ptr: number): void {
6992                 if(!isWasmInitialized) {
6993                         throw new Error("initializeWasm() must be awaited first!");
6994                 }
6995                 const nativeResponseValue = wasm.Event_free(this_ptr);
6996                 // debug statements here
6997         }
6998         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
6999         export function Event_clone(orig: number): number {
7000                 if(!isWasmInitialized) {
7001                         throw new Error("initializeWasm() must be awaited first!");
7002                 }
7003                 const nativeResponseValue = wasm.Event_clone(orig);
7004                 return nativeResponseValue;
7005         }
7006         // 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);
7007         export function Event_funding_generation_ready(temporary_channel_id: Uint8Array, channel_value_satoshis: number, output_script: Uint8Array, user_channel_id: number): number {
7008                 if(!isWasmInitialized) {
7009                         throw new Error("initializeWasm() must be awaited first!");
7010                 }
7011                 const nativeResponseValue = wasm.Event_funding_generation_ready(encodeArray(temporary_channel_id), channel_value_satoshis, encodeArray(output_script), user_channel_id);
7012                 return nativeResponseValue;
7013         }
7014         // struct LDKEvent Event_payment_received(struct LDKThirtyTwoBytes payment_hash, uint64_t amt, struct LDKPaymentPurpose purpose);
7015         export function Event_payment_received(payment_hash: Uint8Array, amt: number, purpose: number): number {
7016                 if(!isWasmInitialized) {
7017                         throw new Error("initializeWasm() must be awaited first!");
7018                 }
7019                 const nativeResponseValue = wasm.Event_payment_received(encodeArray(payment_hash), amt, purpose);
7020                 return nativeResponseValue;
7021         }
7022         // struct LDKEvent Event_payment_sent(struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_hash);
7023         export function Event_payment_sent(payment_preimage: Uint8Array, payment_hash: Uint8Array): number {
7024                 if(!isWasmInitialized) {
7025                         throw new Error("initializeWasm() must be awaited first!");
7026                 }
7027                 const nativeResponseValue = wasm.Event_payment_sent(encodeArray(payment_preimage), encodeArray(payment_hash));
7028                 return nativeResponseValue;
7029         }
7030         // struct LDKEvent Event_payment_path_failed(struct LDKThirtyTwoBytes payment_hash, bool rejected_by_dest, struct LDKCOption_NetworkUpdateZ network_update, bool all_paths_failed, struct LDKCVec_RouteHopZ path, struct LDKCOption_u64Z short_channel_id);
7031         export function Event_payment_path_failed(payment_hash: Uint8Array, rejected_by_dest: boolean, network_update: number, all_paths_failed: boolean, path: number[], short_channel_id: number): number {
7032                 if(!isWasmInitialized) {
7033                         throw new Error("initializeWasm() must be awaited first!");
7034                 }
7035                 const nativeResponseValue = wasm.Event_payment_path_failed(encodeArray(payment_hash), rejected_by_dest, network_update, all_paths_failed, path, short_channel_id);
7036                 return nativeResponseValue;
7037         }
7038         // struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
7039         export function Event_pending_htlcs_forwardable(time_forwardable: number): number {
7040                 if(!isWasmInitialized) {
7041                         throw new Error("initializeWasm() must be awaited first!");
7042                 }
7043                 const nativeResponseValue = wasm.Event_pending_htlcs_forwardable(time_forwardable);
7044                 return nativeResponseValue;
7045         }
7046         // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs);
7047         export function Event_spendable_outputs(outputs: number[]): number {
7048                 if(!isWasmInitialized) {
7049                         throw new Error("initializeWasm() must be awaited first!");
7050                 }
7051                 const nativeResponseValue = wasm.Event_spendable_outputs(outputs);
7052                 return nativeResponseValue;
7053         }
7054         // struct LDKEvent Event_payment_forwarded(struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx);
7055         export function Event_payment_forwarded(fee_earned_msat: number, claim_from_onchain_tx: boolean): number {
7056                 if(!isWasmInitialized) {
7057                         throw new Error("initializeWasm() must be awaited first!");
7058                 }
7059                 const nativeResponseValue = wasm.Event_payment_forwarded(fee_earned_msat, claim_from_onchain_tx);
7060                 return nativeResponseValue;
7061         }
7062         // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, uint64_t user_channel_id, struct LDKClosureReason reason);
7063         export function Event_channel_closed(channel_id: Uint8Array, user_channel_id: number, reason: number): number {
7064                 if(!isWasmInitialized) {
7065                         throw new Error("initializeWasm() must be awaited first!");
7066                 }
7067                 const nativeResponseValue = wasm.Event_channel_closed(encodeArray(channel_id), user_channel_id, reason);
7068                 return nativeResponseValue;
7069         }
7070         // struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction);
7071         export function Event_discard_funding(channel_id: Uint8Array, transaction: Uint8Array): number {
7072                 if(!isWasmInitialized) {
7073                         throw new Error("initializeWasm() must be awaited first!");
7074                 }
7075                 const nativeResponseValue = wasm.Event_discard_funding(encodeArray(channel_id), encodeArray(transaction));
7076                 return nativeResponseValue;
7077         }
7078         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
7079         export function Event_write(obj: number): Uint8Array {
7080                 if(!isWasmInitialized) {
7081                         throw new Error("initializeWasm() must be awaited first!");
7082                 }
7083                 const nativeResponseValue = wasm.Event_write(obj);
7084                 return decodeArray(nativeResponseValue);
7085         }
7086         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
7087         export function MessageSendEvent_free(this_ptr: number): void {
7088                 if(!isWasmInitialized) {
7089                         throw new Error("initializeWasm() must be awaited first!");
7090                 }
7091                 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
7092                 // debug statements here
7093         }
7094         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
7095         export function MessageSendEvent_clone(orig: number): number {
7096                 if(!isWasmInitialized) {
7097                         throw new Error("initializeWasm() must be awaited first!");
7098                 }
7099                 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
7100                 return nativeResponseValue;
7101         }
7102         // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel(struct LDKPublicKey node_id, struct LDKAcceptChannel msg);
7103         export function MessageSendEvent_send_accept_channel(node_id: Uint8Array, msg: number): number {
7104                 if(!isWasmInitialized) {
7105                         throw new Error("initializeWasm() must be awaited first!");
7106                 }
7107                 const nativeResponseValue = wasm.MessageSendEvent_send_accept_channel(encodeArray(node_id), msg);
7108                 return nativeResponseValue;
7109         }
7110         // struct LDKMessageSendEvent MessageSendEvent_send_open_channel(struct LDKPublicKey node_id, struct LDKOpenChannel msg);
7111         export function MessageSendEvent_send_open_channel(node_id: Uint8Array, msg: number): number {
7112                 if(!isWasmInitialized) {
7113                         throw new Error("initializeWasm() must be awaited first!");
7114                 }
7115                 const nativeResponseValue = wasm.MessageSendEvent_send_open_channel(encodeArray(node_id), msg);
7116                 return nativeResponseValue;
7117         }
7118         // struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPublicKey node_id, struct LDKFundingCreated msg);
7119         export function MessageSendEvent_send_funding_created(node_id: Uint8Array, msg: number): number {
7120                 if(!isWasmInitialized) {
7121                         throw new Error("initializeWasm() must be awaited first!");
7122                 }
7123                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_created(encodeArray(node_id), msg);
7124                 return nativeResponseValue;
7125         }
7126         // struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
7127         export function MessageSendEvent_send_funding_signed(node_id: Uint8Array, msg: number): number {
7128                 if(!isWasmInitialized) {
7129                         throw new Error("initializeWasm() must be awaited first!");
7130                 }
7131                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_signed(encodeArray(node_id), msg);
7132                 return nativeResponseValue;
7133         }
7134         // struct LDKMessageSendEvent MessageSendEvent_send_funding_locked(struct LDKPublicKey node_id, struct LDKFundingLocked msg);
7135         export function MessageSendEvent_send_funding_locked(node_id: Uint8Array, msg: number): number {
7136                 if(!isWasmInitialized) {
7137                         throw new Error("initializeWasm() must be awaited first!");
7138                 }
7139                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_locked(encodeArray(node_id), msg);
7140                 return nativeResponseValue;
7141         }
7142         // struct LDKMessageSendEvent MessageSendEvent_send_announcement_signatures(struct LDKPublicKey node_id, struct LDKAnnouncementSignatures msg);
7143         export function MessageSendEvent_send_announcement_signatures(node_id: Uint8Array, msg: number): number {
7144                 if(!isWasmInitialized) {
7145                         throw new Error("initializeWasm() must be awaited first!");
7146                 }
7147                 const nativeResponseValue = wasm.MessageSendEvent_send_announcement_signatures(encodeArray(node_id), msg);
7148                 return nativeResponseValue;
7149         }
7150         // struct LDKMessageSendEvent MessageSendEvent_update_htlcs(struct LDKPublicKey node_id, struct LDKCommitmentUpdate updates);
7151         export function MessageSendEvent_update_htlcs(node_id: Uint8Array, updates: number): number {
7152                 if(!isWasmInitialized) {
7153                         throw new Error("initializeWasm() must be awaited first!");
7154                 }
7155                 const nativeResponseValue = wasm.MessageSendEvent_update_htlcs(encodeArray(node_id), updates);
7156                 return nativeResponseValue;
7157         }
7158         // struct LDKMessageSendEvent MessageSendEvent_send_revoke_and_ack(struct LDKPublicKey node_id, struct LDKRevokeAndACK msg);
7159         export function MessageSendEvent_send_revoke_and_ack(node_id: Uint8Array, msg: number): number {
7160                 if(!isWasmInitialized) {
7161                         throw new Error("initializeWasm() must be awaited first!");
7162                 }
7163                 const nativeResponseValue = wasm.MessageSendEvent_send_revoke_and_ack(encodeArray(node_id), msg);
7164                 return nativeResponseValue;
7165         }
7166         // struct LDKMessageSendEvent MessageSendEvent_send_closing_signed(struct LDKPublicKey node_id, struct LDKClosingSigned msg);
7167         export function MessageSendEvent_send_closing_signed(node_id: Uint8Array, msg: number): number {
7168                 if(!isWasmInitialized) {
7169                         throw new Error("initializeWasm() must be awaited first!");
7170                 }
7171                 const nativeResponseValue = wasm.MessageSendEvent_send_closing_signed(encodeArray(node_id), msg);
7172                 return nativeResponseValue;
7173         }
7174         // struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey node_id, struct LDKShutdown msg);
7175         export function MessageSendEvent_send_shutdown(node_id: Uint8Array, msg: number): number {
7176                 if(!isWasmInitialized) {
7177                         throw new Error("initializeWasm() must be awaited first!");
7178                 }
7179                 const nativeResponseValue = wasm.MessageSendEvent_send_shutdown(encodeArray(node_id), msg);
7180                 return nativeResponseValue;
7181         }
7182         // struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
7183         export function MessageSendEvent_send_channel_reestablish(node_id: Uint8Array, msg: number): number {
7184                 if(!isWasmInitialized) {
7185                         throw new Error("initializeWasm() must be awaited first!");
7186                 }
7187                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_reestablish(encodeArray(node_id), msg);
7188                 return nativeResponseValue;
7189         }
7190         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
7191         export function MessageSendEvent_broadcast_channel_announcement(msg: number, update_msg: number): number {
7192                 if(!isWasmInitialized) {
7193                         throw new Error("initializeWasm() must be awaited first!");
7194                 }
7195                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_announcement(msg, update_msg);
7196                 return nativeResponseValue;
7197         }
7198         // struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
7199         export function MessageSendEvent_broadcast_node_announcement(msg: number): number {
7200                 if(!isWasmInitialized) {
7201                         throw new Error("initializeWasm() must be awaited first!");
7202                 }
7203                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_node_announcement(msg);
7204                 return nativeResponseValue;
7205         }
7206         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_update(struct LDKChannelUpdate msg);
7207         export function MessageSendEvent_broadcast_channel_update(msg: number): number {
7208                 if(!isWasmInitialized) {
7209                         throw new Error("initializeWasm() must be awaited first!");
7210                 }
7211                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_update(msg);
7212                 return nativeResponseValue;
7213         }
7214         // struct LDKMessageSendEvent MessageSendEvent_send_channel_update(struct LDKPublicKey node_id, struct LDKChannelUpdate msg);
7215         export function MessageSendEvent_send_channel_update(node_id: Uint8Array, msg: number): number {
7216                 if(!isWasmInitialized) {
7217                         throw new Error("initializeWasm() must be awaited first!");
7218                 }
7219                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_update(encodeArray(node_id), msg);
7220                 return nativeResponseValue;
7221         }
7222         // struct LDKMessageSendEvent MessageSendEvent_handle_error(struct LDKPublicKey node_id, struct LDKErrorAction action);
7223         export function MessageSendEvent_handle_error(node_id: Uint8Array, action: number): number {
7224                 if(!isWasmInitialized) {
7225                         throw new Error("initializeWasm() must be awaited first!");
7226                 }
7227                 const nativeResponseValue = wasm.MessageSendEvent_handle_error(encodeArray(node_id), action);
7228                 return nativeResponseValue;
7229         }
7230         // struct LDKMessageSendEvent MessageSendEvent_send_channel_range_query(struct LDKPublicKey node_id, struct LDKQueryChannelRange msg);
7231         export function MessageSendEvent_send_channel_range_query(node_id: Uint8Array, msg: number): number {
7232                 if(!isWasmInitialized) {
7233                         throw new Error("initializeWasm() must be awaited first!");
7234                 }
7235                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_range_query(encodeArray(node_id), msg);
7236                 return nativeResponseValue;
7237         }
7238         // struct LDKMessageSendEvent MessageSendEvent_send_short_ids_query(struct LDKPublicKey node_id, struct LDKQueryShortChannelIds msg);
7239         export function MessageSendEvent_send_short_ids_query(node_id: Uint8Array, msg: number): number {
7240                 if(!isWasmInitialized) {
7241                         throw new Error("initializeWasm() must be awaited first!");
7242                 }
7243                 const nativeResponseValue = wasm.MessageSendEvent_send_short_ids_query(encodeArray(node_id), msg);
7244                 return nativeResponseValue;
7245         }
7246         // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
7247         export function MessageSendEvent_send_reply_channel_range(node_id: Uint8Array, msg: number): number {
7248                 if(!isWasmInitialized) {
7249                         throw new Error("initializeWasm() must be awaited first!");
7250                 }
7251                 const nativeResponseValue = wasm.MessageSendEvent_send_reply_channel_range(encodeArray(node_id), msg);
7252                 return nativeResponseValue;
7253         }
7254         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
7255         export function MessageSendEventsProvider_free(this_ptr: number): void {
7256                 if(!isWasmInitialized) {
7257                         throw new Error("initializeWasm() must be awaited first!");
7258                 }
7259                 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
7260                 // debug statements here
7261         }
7262         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
7263         export function EventsProvider_free(this_ptr: number): void {
7264                 if(!isWasmInitialized) {
7265                         throw new Error("initializeWasm() must be awaited first!");
7266                 }
7267                 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
7268                 // debug statements here
7269         }
7270         // void EventHandler_free(struct LDKEventHandler this_ptr);
7271         export function EventHandler_free(this_ptr: number): void {
7272                 if(!isWasmInitialized) {
7273                         throw new Error("initializeWasm() must be awaited first!");
7274                 }
7275                 const nativeResponseValue = wasm.EventHandler_free(this_ptr);
7276                 // debug statements here
7277         }
7278         // void APIError_free(struct LDKAPIError this_ptr);
7279         export function APIError_free(this_ptr: number): void {
7280                 if(!isWasmInitialized) {
7281                         throw new Error("initializeWasm() must be awaited first!");
7282                 }
7283                 const nativeResponseValue = wasm.APIError_free(this_ptr);
7284                 // debug statements here
7285         }
7286         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
7287         export function APIError_clone(orig: number): number {
7288                 if(!isWasmInitialized) {
7289                         throw new Error("initializeWasm() must be awaited first!");
7290                 }
7291                 const nativeResponseValue = wasm.APIError_clone(orig);
7292                 return nativeResponseValue;
7293         }
7294         // struct LDKAPIError APIError_apimisuse_error(struct LDKStr err);
7295         export function APIError_apimisuse_error(err: String): number {
7296                 if(!isWasmInitialized) {
7297                         throw new Error("initializeWasm() must be awaited first!");
7298                 }
7299                 const nativeResponseValue = wasm.APIError_apimisuse_error(err);
7300                 return nativeResponseValue;
7301         }
7302         // struct LDKAPIError APIError_fee_rate_too_high(struct LDKStr err, uint32_t feerate);
7303         export function APIError_fee_rate_too_high(err: String, feerate: number): number {
7304                 if(!isWasmInitialized) {
7305                         throw new Error("initializeWasm() must be awaited first!");
7306                 }
7307                 const nativeResponseValue = wasm.APIError_fee_rate_too_high(err, feerate);
7308                 return nativeResponseValue;
7309         }
7310         // struct LDKAPIError APIError_route_error(struct LDKStr err);
7311         export function APIError_route_error(err: String): number {
7312                 if(!isWasmInitialized) {
7313                         throw new Error("initializeWasm() must be awaited first!");
7314                 }
7315                 const nativeResponseValue = wasm.APIError_route_error(err);
7316                 return nativeResponseValue;
7317         }
7318         // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
7319         export function APIError_channel_unavailable(err: String): number {
7320                 if(!isWasmInitialized) {
7321                         throw new Error("initializeWasm() must be awaited first!");
7322                 }
7323                 const nativeResponseValue = wasm.APIError_channel_unavailable(err);
7324                 return nativeResponseValue;
7325         }
7326         // struct LDKAPIError APIError_monitor_update_failed(void);
7327         export function APIError_monitor_update_failed(): number {
7328                 if(!isWasmInitialized) {
7329                         throw new Error("initializeWasm() must be awaited first!");
7330                 }
7331                 const nativeResponseValue = wasm.APIError_monitor_update_failed();
7332                 return nativeResponseValue;
7333         }
7334         // struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
7335         export function APIError_incompatible_shutdown_script(script: number): number {
7336                 if(!isWasmInitialized) {
7337                         throw new Error("initializeWasm() must be awaited first!");
7338                 }
7339                 const nativeResponseValue = wasm.APIError_incompatible_shutdown_script(script);
7340                 return nativeResponseValue;
7341         }
7342         // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
7343         export function sign(msg: Uint8Array, sk: Uint8Array): number {
7344                 if(!isWasmInitialized) {
7345                         throw new Error("initializeWasm() must be awaited first!");
7346                 }
7347                 const nativeResponseValue = wasm.sign(encodeArray(msg), encodeArray(sk));
7348                 return nativeResponseValue;
7349         }
7350         // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
7351         export function recover_pk(msg: Uint8Array, sig: String): number {
7352                 if(!isWasmInitialized) {
7353                         throw new Error("initializeWasm() must be awaited first!");
7354                 }
7355                 const nativeResponseValue = wasm.recover_pk(encodeArray(msg), sig);
7356                 return nativeResponseValue;
7357         }
7358         // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
7359         export function verify(msg: Uint8Array, sig: String, pk: Uint8Array): boolean {
7360                 if(!isWasmInitialized) {
7361                         throw new Error("initializeWasm() must be awaited first!");
7362                 }
7363                 const nativeResponseValue = wasm.verify(encodeArray(msg), sig, encodeArray(pk));
7364                 return nativeResponseValue;
7365         }
7366         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
7367         export function Level_clone(orig: number): Level {
7368                 if(!isWasmInitialized) {
7369                         throw new Error("initializeWasm() must be awaited first!");
7370                 }
7371                 const nativeResponseValue = wasm.Level_clone(orig);
7372                 return nativeResponseValue;
7373         }
7374         // enum LDKLevel Level_trace(void);
7375         export function Level_trace(): Level {
7376                 if(!isWasmInitialized) {
7377                         throw new Error("initializeWasm() must be awaited first!");
7378                 }
7379                 const nativeResponseValue = wasm.Level_trace();
7380                 return nativeResponseValue;
7381         }
7382         // enum LDKLevel Level_debug(void);
7383         export function Level_debug(): Level {
7384                 if(!isWasmInitialized) {
7385                         throw new Error("initializeWasm() must be awaited first!");
7386                 }
7387                 const nativeResponseValue = wasm.Level_debug();
7388                 return nativeResponseValue;
7389         }
7390         // enum LDKLevel Level_info(void);
7391         export function Level_info(): Level {
7392                 if(!isWasmInitialized) {
7393                         throw new Error("initializeWasm() must be awaited first!");
7394                 }
7395                 const nativeResponseValue = wasm.Level_info();
7396                 return nativeResponseValue;
7397         }
7398         // enum LDKLevel Level_warn(void);
7399         export function Level_warn(): Level {
7400                 if(!isWasmInitialized) {
7401                         throw new Error("initializeWasm() must be awaited first!");
7402                 }
7403                 const nativeResponseValue = wasm.Level_warn();
7404                 return nativeResponseValue;
7405         }
7406         // enum LDKLevel Level_error(void);
7407         export function Level_error(): Level {
7408                 if(!isWasmInitialized) {
7409                         throw new Error("initializeWasm() must be awaited first!");
7410                 }
7411                 const nativeResponseValue = wasm.Level_error();
7412                 return nativeResponseValue;
7413         }
7414         // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
7415         export function Level_eq(a: number, b: number): boolean {
7416                 if(!isWasmInitialized) {
7417                         throw new Error("initializeWasm() must be awaited first!");
7418                 }
7419                 const nativeResponseValue = wasm.Level_eq(a, b);
7420                 return nativeResponseValue;
7421         }
7422         // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
7423         export function Level_hash(o: number): number {
7424                 if(!isWasmInitialized) {
7425                         throw new Error("initializeWasm() must be awaited first!");
7426                 }
7427                 const nativeResponseValue = wasm.Level_hash(o);
7428                 return nativeResponseValue;
7429         }
7430         // MUST_USE_RES enum LDKLevel Level_max(void);
7431         export function Level_max(): Level {
7432                 if(!isWasmInitialized) {
7433                         throw new Error("initializeWasm() must be awaited first!");
7434                 }
7435                 const nativeResponseValue = wasm.Level_max();
7436                 return nativeResponseValue;
7437         }
7438         // void Logger_free(struct LDKLogger this_ptr);
7439         export function Logger_free(this_ptr: number): void {
7440                 if(!isWasmInitialized) {
7441                         throw new Error("initializeWasm() must be awaited first!");
7442                 }
7443                 const nativeResponseValue = wasm.Logger_free(this_ptr);
7444                 // debug statements here
7445         }
7446         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
7447         export function ChannelHandshakeConfig_free(this_obj: number): void {
7448                 if(!isWasmInitialized) {
7449                         throw new Error("initializeWasm() must be awaited first!");
7450                 }
7451                 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
7452                 // debug statements here
7453         }
7454         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
7455         export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
7456                 if(!isWasmInitialized) {
7457                         throw new Error("initializeWasm() must be awaited first!");
7458                 }
7459                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
7460                 return nativeResponseValue;
7461         }
7462         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
7463         export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
7464                 if(!isWasmInitialized) {
7465                         throw new Error("initializeWasm() must be awaited first!");
7466                 }
7467                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
7468                 // debug statements here
7469         }
7470         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
7471         export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
7472                 if(!isWasmInitialized) {
7473                         throw new Error("initializeWasm() must be awaited first!");
7474                 }
7475                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
7476                 return nativeResponseValue;
7477         }
7478         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
7479         export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
7480                 if(!isWasmInitialized) {
7481                         throw new Error("initializeWasm() must be awaited first!");
7482                 }
7483                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
7484                 // debug statements here
7485         }
7486         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
7487         export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
7488                 if(!isWasmInitialized) {
7489                         throw new Error("initializeWasm() must be awaited first!");
7490                 }
7491                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
7492                 return nativeResponseValue;
7493         }
7494         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
7495         export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
7496                 if(!isWasmInitialized) {
7497                         throw new Error("initializeWasm() must be awaited first!");
7498                 }
7499                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
7500                 // debug statements here
7501         }
7502         // 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);
7503         export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
7504                 if(!isWasmInitialized) {
7505                         throw new Error("initializeWasm() must be awaited first!");
7506                 }
7507                 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
7508                 return nativeResponseValue;
7509         }
7510         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
7511         export function ChannelHandshakeConfig_clone(orig: number): number {
7512                 if(!isWasmInitialized) {
7513                         throw new Error("initializeWasm() must be awaited first!");
7514                 }
7515                 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
7516                 return nativeResponseValue;
7517         }
7518         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
7519         export function ChannelHandshakeConfig_default(): number {
7520                 if(!isWasmInitialized) {
7521                         throw new Error("initializeWasm() must be awaited first!");
7522                 }
7523                 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
7524                 return nativeResponseValue;
7525         }
7526         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
7527         export function ChannelHandshakeLimits_free(this_obj: number): void {
7528                 if(!isWasmInitialized) {
7529                         throw new Error("initializeWasm() must be awaited first!");
7530                 }
7531                 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
7532                 // debug statements here
7533         }
7534         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7535         export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
7536                 if(!isWasmInitialized) {
7537                         throw new Error("initializeWasm() must be awaited first!");
7538                 }
7539                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
7540                 return nativeResponseValue;
7541         }
7542         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7543         export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
7544                 if(!isWasmInitialized) {
7545                         throw new Error("initializeWasm() must be awaited first!");
7546                 }
7547                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
7548                 // debug statements here
7549         }
7550         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7551         export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
7552                 if(!isWasmInitialized) {
7553                         throw new Error("initializeWasm() must be awaited first!");
7554                 }
7555                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
7556                 return nativeResponseValue;
7557         }
7558         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7559         export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
7560                 if(!isWasmInitialized) {
7561                         throw new Error("initializeWasm() must be awaited first!");
7562                 }
7563                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
7564                 // debug statements here
7565         }
7566         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7567         export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
7568                 if(!isWasmInitialized) {
7569                         throw new Error("initializeWasm() must be awaited first!");
7570                 }
7571                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
7572                 return nativeResponseValue;
7573         }
7574         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7575         export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
7576                 if(!isWasmInitialized) {
7577                         throw new Error("initializeWasm() must be awaited first!");
7578                 }
7579                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
7580                 // debug statements here
7581         }
7582         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7583         export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
7584                 if(!isWasmInitialized) {
7585                         throw new Error("initializeWasm() must be awaited first!");
7586                 }
7587                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
7588                 return nativeResponseValue;
7589         }
7590         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7591         export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
7592                 if(!isWasmInitialized) {
7593                         throw new Error("initializeWasm() must be awaited first!");
7594                 }
7595                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
7596                 // debug statements here
7597         }
7598         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7599         export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
7600                 if(!isWasmInitialized) {
7601                         throw new Error("initializeWasm() must be awaited first!");
7602                 }
7603                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
7604                 return nativeResponseValue;
7605         }
7606         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
7607         export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
7608                 if(!isWasmInitialized) {
7609                         throw new Error("initializeWasm() must be awaited first!");
7610                 }
7611                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
7612                 // debug statements here
7613         }
7614         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7615         export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
7616                 if(!isWasmInitialized) {
7617                         throw new Error("initializeWasm() must be awaited first!");
7618                 }
7619                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
7620                 return nativeResponseValue;
7621         }
7622         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
7623         export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
7624                 if(!isWasmInitialized) {
7625                         throw new Error("initializeWasm() must be awaited first!");
7626                 }
7627                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
7628                 // debug statements here
7629         }
7630         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7631         export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
7632                 if(!isWasmInitialized) {
7633                         throw new Error("initializeWasm() must be awaited first!");
7634                 }
7635                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
7636                 return nativeResponseValue;
7637         }
7638         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
7639         export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
7640                 if(!isWasmInitialized) {
7641                         throw new Error("initializeWasm() must be awaited first!");
7642                 }
7643                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
7644                 // debug statements here
7645         }
7646         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7647         export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
7648                 if(!isWasmInitialized) {
7649                         throw new Error("initializeWasm() must be awaited first!");
7650                 }
7651                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
7652                 return nativeResponseValue;
7653         }
7654         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
7655         export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
7656                 if(!isWasmInitialized) {
7657                         throw new Error("initializeWasm() must be awaited first!");
7658                 }
7659                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
7660                 // debug statements here
7661         }
7662         // 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);
7663         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 {
7664                 if(!isWasmInitialized) {
7665                         throw new Error("initializeWasm() must be awaited first!");
7666                 }
7667                 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);
7668                 return nativeResponseValue;
7669         }
7670         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
7671         export function ChannelHandshakeLimits_clone(orig: number): number {
7672                 if(!isWasmInitialized) {
7673                         throw new Error("initializeWasm() must be awaited first!");
7674                 }
7675                 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
7676                 return nativeResponseValue;
7677         }
7678         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
7679         export function ChannelHandshakeLimits_default(): number {
7680                 if(!isWasmInitialized) {
7681                         throw new Error("initializeWasm() must be awaited first!");
7682                 }
7683                 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
7684                 return nativeResponseValue;
7685         }
7686         // void ChannelConfig_free(struct LDKChannelConfig this_obj);
7687         export function ChannelConfig_free(this_obj: number): void {
7688                 if(!isWasmInitialized) {
7689                         throw new Error("initializeWasm() must be awaited first!");
7690                 }
7691                 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
7692                 // debug statements here
7693         }
7694         // uint32_t ChannelConfig_get_forwarding_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7695         export function ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr: number): number {
7696                 if(!isWasmInitialized) {
7697                         throw new Error("initializeWasm() must be awaited first!");
7698                 }
7699                 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr);
7700                 return nativeResponseValue;
7701         }
7702         // void ChannelConfig_set_forwarding_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
7703         export function ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr: number, val: number): void {
7704                 if(!isWasmInitialized) {
7705                         throw new Error("initializeWasm() must be awaited first!");
7706                 }
7707                 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr, val);
7708                 // debug statements here
7709         }
7710         // uint32_t ChannelConfig_get_forwarding_fee_base_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7711         export function ChannelConfig_get_forwarding_fee_base_msat(this_ptr: number): number {
7712                 if(!isWasmInitialized) {
7713                         throw new Error("initializeWasm() must be awaited first!");
7714                 }
7715                 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_base_msat(this_ptr);
7716                 return nativeResponseValue;
7717         }
7718         // void ChannelConfig_set_forwarding_fee_base_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
7719         export function ChannelConfig_set_forwarding_fee_base_msat(this_ptr: number, val: number): void {
7720                 if(!isWasmInitialized) {
7721                         throw new Error("initializeWasm() must be awaited first!");
7722                 }
7723                 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_base_msat(this_ptr, val);
7724                 // debug statements here
7725         }
7726         // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7727         export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
7728                 if(!isWasmInitialized) {
7729                         throw new Error("initializeWasm() must be awaited first!");
7730                 }
7731                 const nativeResponseValue = wasm.ChannelConfig_get_cltv_expiry_delta(this_ptr);
7732                 return nativeResponseValue;
7733         }
7734         // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
7735         export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
7736                 if(!isWasmInitialized) {
7737                         throw new Error("initializeWasm() must be awaited first!");
7738                 }
7739                 const nativeResponseValue = wasm.ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
7740                 // debug statements here
7741         }
7742         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7743         export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
7744                 if(!isWasmInitialized) {
7745                         throw new Error("initializeWasm() must be awaited first!");
7746                 }
7747                 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
7748                 return nativeResponseValue;
7749         }
7750         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
7751         export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
7752                 if(!isWasmInitialized) {
7753                         throw new Error("initializeWasm() must be awaited first!");
7754                 }
7755                 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
7756                 // debug statements here
7757         }
7758         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7759         export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
7760                 if(!isWasmInitialized) {
7761                         throw new Error("initializeWasm() must be awaited first!");
7762                 }
7763                 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
7764                 return nativeResponseValue;
7765         }
7766         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
7767         export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
7768                 if(!isWasmInitialized) {
7769                         throw new Error("initializeWasm() must be awaited first!");
7770                 }
7771                 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
7772                 // debug statements here
7773         }
7774         // uint64_t ChannelConfig_get_max_dust_htlc_exposure_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7775         export function ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr: number): number {
7776                 if(!isWasmInitialized) {
7777                         throw new Error("initializeWasm() must be awaited first!");
7778                 }
7779                 const nativeResponseValue = wasm.ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr);
7780                 return nativeResponseValue;
7781         }
7782         // void ChannelConfig_set_max_dust_htlc_exposure_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
7783         export function ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr: number, val: number): void {
7784                 if(!isWasmInitialized) {
7785                         throw new Error("initializeWasm() must be awaited first!");
7786                 }
7787                 const nativeResponseValue = wasm.ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr, val);
7788                 // debug statements here
7789         }
7790         // uint64_t ChannelConfig_get_force_close_avoidance_max_fee_satoshis(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7791         export function ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr: number): number {
7792                 if(!isWasmInitialized) {
7793                         throw new Error("initializeWasm() must be awaited first!");
7794                 }
7795                 const nativeResponseValue = wasm.ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr);
7796                 return nativeResponseValue;
7797         }
7798         // void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
7799         export function ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr: number, val: number): void {
7800                 if(!isWasmInitialized) {
7801                         throw new Error("initializeWasm() must be awaited first!");
7802                 }
7803                 const nativeResponseValue = wasm.ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr, val);
7804                 // debug statements here
7805         }
7806         // 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);
7807         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 {
7808                 if(!isWasmInitialized) {
7809                         throw new Error("initializeWasm() must be awaited first!");
7810                 }
7811                 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);
7812                 return nativeResponseValue;
7813         }
7814         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
7815         export function ChannelConfig_clone(orig: number): number {
7816                 if(!isWasmInitialized) {
7817                         throw new Error("initializeWasm() must be awaited first!");
7818                 }
7819                 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
7820                 return nativeResponseValue;
7821         }
7822         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
7823         export function ChannelConfig_default(): number {
7824                 if(!isWasmInitialized) {
7825                         throw new Error("initializeWasm() must be awaited first!");
7826                 }
7827                 const nativeResponseValue = wasm.ChannelConfig_default();
7828                 return nativeResponseValue;
7829         }
7830         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
7831         export function ChannelConfig_write(obj: number): Uint8Array {
7832                 if(!isWasmInitialized) {
7833                         throw new Error("initializeWasm() must be awaited first!");
7834                 }
7835                 const nativeResponseValue = wasm.ChannelConfig_write(obj);
7836                 return decodeArray(nativeResponseValue);
7837         }
7838         // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
7839         export function ChannelConfig_read(ser: Uint8Array): number {
7840                 if(!isWasmInitialized) {
7841                         throw new Error("initializeWasm() must be awaited first!");
7842                 }
7843                 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
7844                 return nativeResponseValue;
7845         }
7846         // void UserConfig_free(struct LDKUserConfig this_obj);
7847         export function UserConfig_free(this_obj: number): void {
7848                 if(!isWasmInitialized) {
7849                         throw new Error("initializeWasm() must be awaited first!");
7850                 }
7851                 const nativeResponseValue = wasm.UserConfig_free(this_obj);
7852                 // debug statements here
7853         }
7854         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
7855         export function UserConfig_get_own_channel_config(this_ptr: number): number {
7856                 if(!isWasmInitialized) {
7857                         throw new Error("initializeWasm() must be awaited first!");
7858                 }
7859                 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
7860                 return nativeResponseValue;
7861         }
7862         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
7863         export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
7864                 if(!isWasmInitialized) {
7865                         throw new Error("initializeWasm() must be awaited first!");
7866                 }
7867                 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
7868                 // debug statements here
7869         }
7870         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
7871         export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
7872                 if(!isWasmInitialized) {
7873                         throw new Error("initializeWasm() must be awaited first!");
7874                 }
7875                 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
7876                 return nativeResponseValue;
7877         }
7878         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
7879         export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
7880                 if(!isWasmInitialized) {
7881                         throw new Error("initializeWasm() must be awaited first!");
7882                 }
7883                 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
7884                 // debug statements here
7885         }
7886         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
7887         export function UserConfig_get_channel_options(this_ptr: number): number {
7888                 if(!isWasmInitialized) {
7889                         throw new Error("initializeWasm() must be awaited first!");
7890                 }
7891                 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
7892                 return nativeResponseValue;
7893         }
7894         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
7895         export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
7896                 if(!isWasmInitialized) {
7897                         throw new Error("initializeWasm() must be awaited first!");
7898                 }
7899                 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
7900                 // debug statements here
7901         }
7902         // bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
7903         export function UserConfig_get_accept_forwards_to_priv_channels(this_ptr: number): boolean {
7904                 if(!isWasmInitialized) {
7905                         throw new Error("initializeWasm() must be awaited first!");
7906                 }
7907                 const nativeResponseValue = wasm.UserConfig_get_accept_forwards_to_priv_channels(this_ptr);
7908                 return nativeResponseValue;
7909         }
7910         // void UserConfig_set_accept_forwards_to_priv_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
7911         export function UserConfig_set_accept_forwards_to_priv_channels(this_ptr: number, val: boolean): void {
7912                 if(!isWasmInitialized) {
7913                         throw new Error("initializeWasm() must be awaited first!");
7914                 }
7915                 const nativeResponseValue = wasm.UserConfig_set_accept_forwards_to_priv_channels(this_ptr, val);
7916                 // debug statements here
7917         }
7918         // 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);
7919         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 {
7920                 if(!isWasmInitialized) {
7921                         throw new Error("initializeWasm() must be awaited first!");
7922                 }
7923                 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg, accept_forwards_to_priv_channels_arg);
7924                 return nativeResponseValue;
7925         }
7926         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
7927         export function UserConfig_clone(orig: number): number {
7928                 if(!isWasmInitialized) {
7929                         throw new Error("initializeWasm() must be awaited first!");
7930                 }
7931                 const nativeResponseValue = wasm.UserConfig_clone(orig);
7932                 return nativeResponseValue;
7933         }
7934         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
7935         export function UserConfig_default(): number {
7936                 if(!isWasmInitialized) {
7937                         throw new Error("initializeWasm() must be awaited first!");
7938                 }
7939                 const nativeResponseValue = wasm.UserConfig_default();
7940                 return nativeResponseValue;
7941         }
7942         // void BestBlock_free(struct LDKBestBlock this_obj);
7943         export function BestBlock_free(this_obj: number): void {
7944                 if(!isWasmInitialized) {
7945                         throw new Error("initializeWasm() must be awaited first!");
7946                 }
7947                 const nativeResponseValue = wasm.BestBlock_free(this_obj);
7948                 // debug statements here
7949         }
7950         // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
7951         export function BestBlock_clone(orig: number): number {
7952                 if(!isWasmInitialized) {
7953                         throw new Error("initializeWasm() must be awaited first!");
7954                 }
7955                 const nativeResponseValue = wasm.BestBlock_clone(orig);
7956                 return nativeResponseValue;
7957         }
7958         // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
7959         export function BestBlock_from_genesis(network: Network): number {
7960                 if(!isWasmInitialized) {
7961                         throw new Error("initializeWasm() must be awaited first!");
7962                 }
7963                 const nativeResponseValue = wasm.BestBlock_from_genesis(network);
7964                 return nativeResponseValue;
7965         }
7966         // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
7967         export function BestBlock_new(block_hash: Uint8Array, height: number): number {
7968                 if(!isWasmInitialized) {
7969                         throw new Error("initializeWasm() must be awaited first!");
7970                 }
7971                 const nativeResponseValue = wasm.BestBlock_new(encodeArray(block_hash), height);
7972                 return nativeResponseValue;
7973         }
7974         // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
7975         export function BestBlock_block_hash(this_arg: number): Uint8Array {
7976                 if(!isWasmInitialized) {
7977                         throw new Error("initializeWasm() must be awaited first!");
7978                 }
7979                 const nativeResponseValue = wasm.BestBlock_block_hash(this_arg);
7980                 return decodeArray(nativeResponseValue);
7981         }
7982         // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
7983         export function BestBlock_height(this_arg: number): number {
7984                 if(!isWasmInitialized) {
7985                         throw new Error("initializeWasm() must be awaited first!");
7986                 }
7987                 const nativeResponseValue = wasm.BestBlock_height(this_arg);
7988                 return nativeResponseValue;
7989         }
7990         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
7991         export function AccessError_clone(orig: number): AccessError {
7992                 if(!isWasmInitialized) {
7993                         throw new Error("initializeWasm() must be awaited first!");
7994                 }
7995                 const nativeResponseValue = wasm.AccessError_clone(orig);
7996                 return nativeResponseValue;
7997         }
7998         // enum LDKAccessError AccessError_unknown_chain(void);
7999         export function AccessError_unknown_chain(): AccessError {
8000                 if(!isWasmInitialized) {
8001                         throw new Error("initializeWasm() must be awaited first!");
8002                 }
8003                 const nativeResponseValue = wasm.AccessError_unknown_chain();
8004                 return nativeResponseValue;
8005         }
8006         // enum LDKAccessError AccessError_unknown_tx(void);
8007         export function AccessError_unknown_tx(): AccessError {
8008                 if(!isWasmInitialized) {
8009                         throw new Error("initializeWasm() must be awaited first!");
8010                 }
8011                 const nativeResponseValue = wasm.AccessError_unknown_tx();
8012                 return nativeResponseValue;
8013         }
8014         // void Access_free(struct LDKAccess this_ptr);
8015         export function Access_free(this_ptr: number): void {
8016                 if(!isWasmInitialized) {
8017                         throw new Error("initializeWasm() must be awaited first!");
8018                 }
8019                 const nativeResponseValue = wasm.Access_free(this_ptr);
8020                 // debug statements here
8021         }
8022         // void Listen_free(struct LDKListen this_ptr);
8023         export function Listen_free(this_ptr: number): void {
8024                 if(!isWasmInitialized) {
8025                         throw new Error("initializeWasm() must be awaited first!");
8026                 }
8027                 const nativeResponseValue = wasm.Listen_free(this_ptr);
8028                 // debug statements here
8029         }
8030         // void Confirm_free(struct LDKConfirm this_ptr);
8031         export function Confirm_free(this_ptr: number): void {
8032                 if(!isWasmInitialized) {
8033                         throw new Error("initializeWasm() must be awaited first!");
8034                 }
8035                 const nativeResponseValue = wasm.Confirm_free(this_ptr);
8036                 // debug statements here
8037         }
8038         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
8039         export function ChannelMonitorUpdateErr_clone(orig: number): ChannelMonitorUpdateErr {
8040                 if(!isWasmInitialized) {
8041                         throw new Error("initializeWasm() must be awaited first!");
8042                 }
8043                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
8044                 return nativeResponseValue;
8045         }
8046         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
8047         export function ChannelMonitorUpdateErr_temporary_failure(): ChannelMonitorUpdateErr {
8048                 if(!isWasmInitialized) {
8049                         throw new Error("initializeWasm() must be awaited first!");
8050                 }
8051                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_temporary_failure();
8052                 return nativeResponseValue;
8053         }
8054         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
8055         export function ChannelMonitorUpdateErr_permanent_failure(): ChannelMonitorUpdateErr {
8056                 if(!isWasmInitialized) {
8057                         throw new Error("initializeWasm() must be awaited first!");
8058                 }
8059                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_permanent_failure();
8060                 return nativeResponseValue;
8061         }
8062         // void Watch_free(struct LDKWatch this_ptr);
8063         export function Watch_free(this_ptr: number): void {
8064                 if(!isWasmInitialized) {
8065                         throw new Error("initializeWasm() must be awaited first!");
8066                 }
8067                 const nativeResponseValue = wasm.Watch_free(this_ptr);
8068                 // debug statements here
8069         }
8070         // void Filter_free(struct LDKFilter this_ptr);
8071         export function Filter_free(this_ptr: number): void {
8072                 if(!isWasmInitialized) {
8073                         throw new Error("initializeWasm() must be awaited first!");
8074                 }
8075                 const nativeResponseValue = wasm.Filter_free(this_ptr);
8076                 // debug statements here
8077         }
8078         // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
8079         export function WatchedOutput_free(this_obj: number): void {
8080                 if(!isWasmInitialized) {
8081                         throw new Error("initializeWasm() must be awaited first!");
8082                 }
8083                 const nativeResponseValue = wasm.WatchedOutput_free(this_obj);
8084                 // debug statements here
8085         }
8086         // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
8087         export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
8088                 if(!isWasmInitialized) {
8089                         throw new Error("initializeWasm() must be awaited first!");
8090                 }
8091                 const nativeResponseValue = wasm.WatchedOutput_get_block_hash(this_ptr);
8092                 return decodeArray(nativeResponseValue);
8093         }
8094         // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8095         export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
8096                 if(!isWasmInitialized) {
8097                         throw new Error("initializeWasm() must be awaited first!");
8098                 }
8099                 const nativeResponseValue = wasm.WatchedOutput_set_block_hash(this_ptr, encodeArray(val));
8100                 // debug statements here
8101         }
8102         // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
8103         export function WatchedOutput_get_outpoint(this_ptr: number): number {
8104                 if(!isWasmInitialized) {
8105                         throw new Error("initializeWasm() must be awaited first!");
8106                 }
8107                 const nativeResponseValue = wasm.WatchedOutput_get_outpoint(this_ptr);
8108                 return nativeResponseValue;
8109         }
8110         // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
8111         export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
8112                 if(!isWasmInitialized) {
8113                         throw new Error("initializeWasm() must be awaited first!");
8114                 }
8115                 const nativeResponseValue = wasm.WatchedOutput_set_outpoint(this_ptr, val);
8116                 // debug statements here
8117         }
8118         // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
8119         export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
8120                 if(!isWasmInitialized) {
8121                         throw new Error("initializeWasm() must be awaited first!");
8122                 }
8123                 const nativeResponseValue = wasm.WatchedOutput_get_script_pubkey(this_ptr);
8124                 return decodeArray(nativeResponseValue);
8125         }
8126         // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
8127         export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
8128                 if(!isWasmInitialized) {
8129                         throw new Error("initializeWasm() must be awaited first!");
8130                 }
8131                 const nativeResponseValue = wasm.WatchedOutput_set_script_pubkey(this_ptr, encodeArray(val));
8132                 // debug statements here
8133         }
8134         // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
8135         export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
8136                 if(!isWasmInitialized) {
8137                         throw new Error("initializeWasm() must be awaited first!");
8138                 }
8139                 const nativeResponseValue = wasm.WatchedOutput_new(encodeArray(block_hash_arg), outpoint_arg, encodeArray(script_pubkey_arg));
8140                 return nativeResponseValue;
8141         }
8142         // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
8143         export function WatchedOutput_clone(orig: number): number {
8144                 if(!isWasmInitialized) {
8145                         throw new Error("initializeWasm() must be awaited first!");
8146                 }
8147                 const nativeResponseValue = wasm.WatchedOutput_clone(orig);
8148                 return nativeResponseValue;
8149         }
8150         // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
8151         export function WatchedOutput_hash(o: number): number {
8152                 if(!isWasmInitialized) {
8153                         throw new Error("initializeWasm() must be awaited first!");
8154                 }
8155                 const nativeResponseValue = wasm.WatchedOutput_hash(o);
8156                 return nativeResponseValue;
8157         }
8158         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
8159         export function BroadcasterInterface_free(this_ptr: number): void {
8160                 if(!isWasmInitialized) {
8161                         throw new Error("initializeWasm() must be awaited first!");
8162                 }
8163                 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
8164                 // debug statements here
8165         }
8166         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
8167         export function ConfirmationTarget_clone(orig: number): ConfirmationTarget {
8168                 if(!isWasmInitialized) {
8169                         throw new Error("initializeWasm() must be awaited first!");
8170                 }
8171                 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
8172                 return nativeResponseValue;
8173         }
8174         // enum LDKConfirmationTarget ConfirmationTarget_background(void);
8175         export function ConfirmationTarget_background(): ConfirmationTarget {
8176                 if(!isWasmInitialized) {
8177                         throw new Error("initializeWasm() must be awaited first!");
8178                 }
8179                 const nativeResponseValue = wasm.ConfirmationTarget_background();
8180                 return nativeResponseValue;
8181         }
8182         // enum LDKConfirmationTarget ConfirmationTarget_normal(void);
8183         export function ConfirmationTarget_normal(): ConfirmationTarget {
8184                 if(!isWasmInitialized) {
8185                         throw new Error("initializeWasm() must be awaited first!");
8186                 }
8187                 const nativeResponseValue = wasm.ConfirmationTarget_normal();
8188                 return nativeResponseValue;
8189         }
8190         // enum LDKConfirmationTarget ConfirmationTarget_high_priority(void);
8191         export function ConfirmationTarget_high_priority(): ConfirmationTarget {
8192                 if(!isWasmInitialized) {
8193                         throw new Error("initializeWasm() must be awaited first!");
8194                 }
8195                 const nativeResponseValue = wasm.ConfirmationTarget_high_priority();
8196                 return nativeResponseValue;
8197         }
8198         // bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b);
8199         export function ConfirmationTarget_eq(a: number, b: number): boolean {
8200                 if(!isWasmInitialized) {
8201                         throw new Error("initializeWasm() must be awaited first!");
8202                 }
8203                 const nativeResponseValue = wasm.ConfirmationTarget_eq(a, b);
8204                 return nativeResponseValue;
8205         }
8206         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
8207         export function FeeEstimator_free(this_ptr: number): void {
8208                 if(!isWasmInitialized) {
8209                         throw new Error("initializeWasm() must be awaited first!");
8210                 }
8211                 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
8212                 // debug statements here
8213         }
8214         // void Persist_free(struct LDKPersist this_ptr);
8215         export function Persist_free(this_ptr: number): void {
8216                 if(!isWasmInitialized) {
8217                         throw new Error("initializeWasm() must be awaited first!");
8218                 }
8219                 const nativeResponseValue = wasm.Persist_free(this_ptr);
8220                 // debug statements here
8221         }
8222         // void LockedChannelMonitor_free(struct LDKLockedChannelMonitor this_obj);
8223         export function LockedChannelMonitor_free(this_obj: number): void {
8224                 if(!isWasmInitialized) {
8225                         throw new Error("initializeWasm() must be awaited first!");
8226                 }
8227                 const nativeResponseValue = wasm.LockedChannelMonitor_free(this_obj);
8228                 // debug statements here
8229         }
8230         // void ChainMonitor_free(struct LDKChainMonitor this_obj);
8231         export function ChainMonitor_free(this_obj: number): void {
8232                 if(!isWasmInitialized) {
8233                         throw new Error("initializeWasm() must be awaited first!");
8234                 }
8235                 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
8236                 // debug statements here
8237         }
8238         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKCOption_FilterZ chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
8239         export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
8240                 if(!isWasmInitialized) {
8241                         throw new Error("initializeWasm() must be awaited first!");
8242                 }
8243                 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
8244                 return nativeResponseValue;
8245         }
8246         // MUST_USE_RES struct LDKCVec_BalanceZ ChainMonitor_get_claimable_balances(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKCVec_ChannelDetailsZ ignored_channels);
8247         export function ChainMonitor_get_claimable_balances(this_arg: number, ignored_channels: number[]): number[] {
8248                 if(!isWasmInitialized) {
8249                         throw new Error("initializeWasm() must be awaited first!");
8250                 }
8251                 const nativeResponseValue = wasm.ChainMonitor_get_claimable_balances(this_arg, ignored_channels);
8252                 return nativeResponseValue;
8253         }
8254         // MUST_USE_RES struct LDKCResult_LockedChannelMonitorNoneZ ChainMonitor_get_monitor(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo);
8255         export function ChainMonitor_get_monitor(this_arg: number, funding_txo: number): number {
8256                 if(!isWasmInitialized) {
8257                         throw new Error("initializeWasm() must be awaited first!");
8258                 }
8259                 const nativeResponseValue = wasm.ChainMonitor_get_monitor(this_arg, funding_txo);
8260                 return nativeResponseValue;
8261         }
8262         // MUST_USE_RES struct LDKCVec_OutPointZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
8263         export function ChainMonitor_list_monitors(this_arg: number): number[] {
8264                 if(!isWasmInitialized) {
8265                         throw new Error("initializeWasm() must be awaited first!");
8266                 }
8267                 const nativeResponseValue = wasm.ChainMonitor_list_monitors(this_arg);
8268                 return nativeResponseValue;
8269         }
8270         // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
8271         export function ChainMonitor_as_Listen(this_arg: number): number {
8272                 if(!isWasmInitialized) {
8273                         throw new Error("initializeWasm() must be awaited first!");
8274                 }
8275                 const nativeResponseValue = wasm.ChainMonitor_as_Listen(this_arg);
8276                 return nativeResponseValue;
8277         }
8278         // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
8279         export function ChainMonitor_as_Confirm(this_arg: number): number {
8280                 if(!isWasmInitialized) {
8281                         throw new Error("initializeWasm() must be awaited first!");
8282                 }
8283                 const nativeResponseValue = wasm.ChainMonitor_as_Confirm(this_arg);
8284                 return nativeResponseValue;
8285         }
8286         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
8287         export function ChainMonitor_as_Watch(this_arg: number): number {
8288                 if(!isWasmInitialized) {
8289                         throw new Error("initializeWasm() must be awaited first!");
8290                 }
8291                 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
8292                 return nativeResponseValue;
8293         }
8294         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
8295         export function ChainMonitor_as_EventsProvider(this_arg: number): number {
8296                 if(!isWasmInitialized) {
8297                         throw new Error("initializeWasm() must be awaited first!");
8298                 }
8299                 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
8300                 return nativeResponseValue;
8301         }
8302         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
8303         export function ChannelMonitorUpdate_free(this_obj: number): void {
8304                 if(!isWasmInitialized) {
8305                         throw new Error("initializeWasm() must be awaited first!");
8306                 }
8307                 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
8308                 // debug statements here
8309         }
8310         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
8311         export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
8312                 if(!isWasmInitialized) {
8313                         throw new Error("initializeWasm() must be awaited first!");
8314                 }
8315                 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
8316                 return nativeResponseValue;
8317         }
8318         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
8319         export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
8320                 if(!isWasmInitialized) {
8321                         throw new Error("initializeWasm() must be awaited first!");
8322                 }
8323                 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
8324                 // debug statements here
8325         }
8326         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
8327         export function ChannelMonitorUpdate_clone(orig: number): number {
8328                 if(!isWasmInitialized) {
8329                         throw new Error("initializeWasm() must be awaited first!");
8330                 }
8331                 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
8332                 return nativeResponseValue;
8333         }
8334         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
8335         export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
8336                 if(!isWasmInitialized) {
8337                         throw new Error("initializeWasm() must be awaited first!");
8338                 }
8339                 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
8340                 return decodeArray(nativeResponseValue);
8341         }
8342         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
8343         export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
8344                 if(!isWasmInitialized) {
8345                         throw new Error("initializeWasm() must be awaited first!");
8346                 }
8347                 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
8348                 return nativeResponseValue;
8349         }
8350         // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
8351         export function MonitorUpdateError_free(this_obj: number): void {
8352                 if(!isWasmInitialized) {
8353                         throw new Error("initializeWasm() must be awaited first!");
8354                 }
8355                 const nativeResponseValue = wasm.MonitorUpdateError_free(this_obj);
8356                 // debug statements here
8357         }
8358         // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
8359         export function MonitorUpdateError_clone(orig: number): number {
8360                 if(!isWasmInitialized) {
8361                         throw new Error("initializeWasm() must be awaited first!");
8362                 }
8363                 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
8364                 return nativeResponseValue;
8365         }
8366         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
8367         export function MonitorEvent_free(this_ptr: number): void {
8368                 if(!isWasmInitialized) {
8369                         throw new Error("initializeWasm() must be awaited first!");
8370                 }
8371                 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
8372                 // debug statements here
8373         }
8374         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
8375         export function MonitorEvent_clone(orig: number): number {
8376                 if(!isWasmInitialized) {
8377                         throw new Error("initializeWasm() must be awaited first!");
8378                 }
8379                 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
8380                 return nativeResponseValue;
8381         }
8382         // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
8383         export function MonitorEvent_htlcevent(a: number): number {
8384                 if(!isWasmInitialized) {
8385                         throw new Error("initializeWasm() must be awaited first!");
8386                 }
8387                 const nativeResponseValue = wasm.MonitorEvent_htlcevent(a);
8388                 return nativeResponseValue;
8389         }
8390         // struct LDKMonitorEvent MonitorEvent_commitment_tx_confirmed(struct LDKOutPoint a);
8391         export function MonitorEvent_commitment_tx_confirmed(a: number): number {
8392                 if(!isWasmInitialized) {
8393                         throw new Error("initializeWasm() must be awaited first!");
8394                 }
8395                 const nativeResponseValue = wasm.MonitorEvent_commitment_tx_confirmed(a);
8396                 return nativeResponseValue;
8397         }
8398         // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
8399         export function HTLCUpdate_free(this_obj: number): void {
8400                 if(!isWasmInitialized) {
8401                         throw new Error("initializeWasm() must be awaited first!");
8402                 }
8403                 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
8404                 // debug statements here
8405         }
8406         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
8407         export function HTLCUpdate_clone(orig: number): number {
8408                 if(!isWasmInitialized) {
8409                         throw new Error("initializeWasm() must be awaited first!");
8410                 }
8411                 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
8412                 return nativeResponseValue;
8413         }
8414         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
8415         export function HTLCUpdate_write(obj: number): Uint8Array {
8416                 if(!isWasmInitialized) {
8417                         throw new Error("initializeWasm() must be awaited first!");
8418                 }
8419                 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
8420                 return decodeArray(nativeResponseValue);
8421         }
8422         // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
8423         export function HTLCUpdate_read(ser: Uint8Array): number {
8424                 if(!isWasmInitialized) {
8425                         throw new Error("initializeWasm() must be awaited first!");
8426                 }
8427                 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
8428                 return nativeResponseValue;
8429         }
8430         // void Balance_free(struct LDKBalance this_ptr);
8431         export function Balance_free(this_ptr: number): void {
8432                 if(!isWasmInitialized) {
8433                         throw new Error("initializeWasm() must be awaited first!");
8434                 }
8435                 const nativeResponseValue = wasm.Balance_free(this_ptr);
8436                 // debug statements here
8437         }
8438         // struct LDKBalance Balance_clone(const struct LDKBalance *NONNULL_PTR orig);
8439         export function Balance_clone(orig: number): number {
8440                 if(!isWasmInitialized) {
8441                         throw new Error("initializeWasm() must be awaited first!");
8442                 }
8443                 const nativeResponseValue = wasm.Balance_clone(orig);
8444                 return nativeResponseValue;
8445         }
8446         // struct LDKBalance Balance_claimable_on_channel_close(uint64_t claimable_amount_satoshis);
8447         export function Balance_claimable_on_channel_close(claimable_amount_satoshis: number): number {
8448                 if(!isWasmInitialized) {
8449                         throw new Error("initializeWasm() must be awaited first!");
8450                 }
8451                 const nativeResponseValue = wasm.Balance_claimable_on_channel_close(claimable_amount_satoshis);
8452                 return nativeResponseValue;
8453         }
8454         // struct LDKBalance Balance_claimable_awaiting_confirmations(uint64_t claimable_amount_satoshis, uint32_t confirmation_height);
8455         export function Balance_claimable_awaiting_confirmations(claimable_amount_satoshis: number, confirmation_height: number): number {
8456                 if(!isWasmInitialized) {
8457                         throw new Error("initializeWasm() must be awaited first!");
8458                 }
8459                 const nativeResponseValue = wasm.Balance_claimable_awaiting_confirmations(claimable_amount_satoshis, confirmation_height);
8460                 return nativeResponseValue;
8461         }
8462         // struct LDKBalance Balance_contentious_claimable(uint64_t claimable_amount_satoshis, uint32_t timeout_height);
8463         export function Balance_contentious_claimable(claimable_amount_satoshis: number, timeout_height: number): number {
8464                 if(!isWasmInitialized) {
8465                         throw new Error("initializeWasm() must be awaited first!");
8466                 }
8467                 const nativeResponseValue = wasm.Balance_contentious_claimable(claimable_amount_satoshis, timeout_height);
8468                 return nativeResponseValue;
8469         }
8470         // struct LDKBalance Balance_maybe_claimable_htlcawaiting_timeout(uint64_t claimable_amount_satoshis, uint32_t claimable_height);
8471         export function Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis: number, claimable_height: number): number {
8472                 if(!isWasmInitialized) {
8473                         throw new Error("initializeWasm() must be awaited first!");
8474                 }
8475                 const nativeResponseValue = wasm.Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis, claimable_height);
8476                 return nativeResponseValue;
8477         }
8478         // bool Balance_eq(const struct LDKBalance *NONNULL_PTR a, const struct LDKBalance *NONNULL_PTR b);
8479         export function Balance_eq(a: number, b: number): boolean {
8480                 if(!isWasmInitialized) {
8481                         throw new Error("initializeWasm() must be awaited first!");
8482                 }
8483                 const nativeResponseValue = wasm.Balance_eq(a, b);
8484                 return nativeResponseValue;
8485         }
8486         // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
8487         export function ChannelMonitor_free(this_obj: number): void {
8488                 if(!isWasmInitialized) {
8489                         throw new Error("initializeWasm() must be awaited first!");
8490                 }
8491                 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
8492                 // debug statements here
8493         }
8494         // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
8495         export function ChannelMonitor_clone(orig: number): number {
8496                 if(!isWasmInitialized) {
8497                         throw new Error("initializeWasm() must be awaited first!");
8498                 }
8499                 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
8500                 return nativeResponseValue;
8501         }
8502         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
8503         export function ChannelMonitor_write(obj: number): Uint8Array {
8504                 if(!isWasmInitialized) {
8505                         throw new Error("initializeWasm() must be awaited first!");
8506                 }
8507                 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
8508                 return decodeArray(nativeResponseValue);
8509         }
8510         // 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);
8511         export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
8512                 if(!isWasmInitialized) {
8513                         throw new Error("initializeWasm() must be awaited first!");
8514                 }
8515                 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
8516                 return nativeResponseValue;
8517         }
8518         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8519         export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
8520                 if(!isWasmInitialized) {
8521                         throw new Error("initializeWasm() must be awaited first!");
8522                 }
8523                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
8524                 return nativeResponseValue;
8525         }
8526         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8527         export function ChannelMonitor_get_funding_txo(this_arg: number): number {
8528                 if(!isWasmInitialized) {
8529                         throw new Error("initializeWasm() must be awaited first!");
8530                 }
8531                 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
8532                 return nativeResponseValue;
8533         }
8534         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8535         export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
8536                 if(!isWasmInitialized) {
8537                         throw new Error("initializeWasm() must be awaited first!");
8538                 }
8539                 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
8540                 return nativeResponseValue;
8541         }
8542         // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
8543         export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
8544                 if(!isWasmInitialized) {
8545                         throw new Error("initializeWasm() must be awaited first!");
8546                 }
8547                 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
8548                 // debug statements here
8549         }
8550         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8551         export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
8552                 if(!isWasmInitialized) {
8553                         throw new Error("initializeWasm() must be awaited first!");
8554                 }
8555                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
8556                 return nativeResponseValue;
8557         }
8558         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8559         export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
8560                 if(!isWasmInitialized) {
8561                         throw new Error("initializeWasm() must be awaited first!");
8562                 }
8563                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
8564                 return nativeResponseValue;
8565         }
8566         // 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);
8567         export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
8568                 if(!isWasmInitialized) {
8569                         throw new Error("initializeWasm() must be awaited first!");
8570                 }
8571                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
8572                 return nativeResponseValue;
8573         }
8574         // 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);
8575         export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
8576                 if(!isWasmInitialized) {
8577                         throw new Error("initializeWasm() must be awaited first!");
8578                 }
8579                 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
8580                 return nativeResponseValue;
8581         }
8582         // 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);
8583         export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
8584                 if(!isWasmInitialized) {
8585                         throw new Error("initializeWasm() must be awaited first!");
8586                 }
8587                 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
8588                 // debug statements here
8589         }
8590         // 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);
8591         export function ChannelMonitor_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
8592                 if(!isWasmInitialized) {
8593                         throw new Error("initializeWasm() must be awaited first!");
8594                 }
8595                 const nativeResponseValue = wasm.ChannelMonitor_transactions_confirmed(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
8596                 return nativeResponseValue;
8597         }
8598         // 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);
8599         export function ChannelMonitor_transaction_unconfirmed(this_arg: number, txid: Uint8Array, broadcaster: number, fee_estimator: number, logger: number): void {
8600                 if(!isWasmInitialized) {
8601                         throw new Error("initializeWasm() must be awaited first!");
8602                 }
8603                 const nativeResponseValue = wasm.ChannelMonitor_transaction_unconfirmed(this_arg, encodeArray(txid), broadcaster, fee_estimator, logger);
8604                 // debug statements here
8605         }
8606         // 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);
8607         export function ChannelMonitor_best_block_updated(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
8608                 if(!isWasmInitialized) {
8609                         throw new Error("initializeWasm() must be awaited first!");
8610                 }
8611                 const nativeResponseValue = wasm.ChannelMonitor_best_block_updated(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
8612                 return nativeResponseValue;
8613         }
8614         // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8615         export function ChannelMonitor_get_relevant_txids(this_arg: number): Uint8Array[] {
8616                 if(!isWasmInitialized) {
8617                         throw new Error("initializeWasm() must be awaited first!");
8618                 }
8619                 const nativeResponseValue = wasm.ChannelMonitor_get_relevant_txids(this_arg);
8620                 return nativeResponseValue;
8621         }
8622         // MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8623         export function ChannelMonitor_current_best_block(this_arg: number): number {
8624                 if(!isWasmInitialized) {
8625                         throw new Error("initializeWasm() must be awaited first!");
8626                 }
8627                 const nativeResponseValue = wasm.ChannelMonitor_current_best_block(this_arg);
8628                 return nativeResponseValue;
8629         }
8630         // MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8631         export function ChannelMonitor_get_claimable_balances(this_arg: number): number[] {
8632                 if(!isWasmInitialized) {
8633                         throw new Error("initializeWasm() must be awaited first!");
8634                 }
8635                 const nativeResponseValue = wasm.ChannelMonitor_get_claimable_balances(this_arg);
8636                 return nativeResponseValue;
8637         }
8638         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
8639         export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
8640                 if(!isWasmInitialized) {
8641                         throw new Error("initializeWasm() must be awaited first!");
8642                 }
8643                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
8644                 return nativeResponseValue;
8645         }
8646         // void OutPoint_free(struct LDKOutPoint this_obj);
8647         export function OutPoint_free(this_obj: number): void {
8648                 if(!isWasmInitialized) {
8649                         throw new Error("initializeWasm() must be awaited first!");
8650                 }
8651                 const nativeResponseValue = wasm.OutPoint_free(this_obj);
8652                 // debug statements here
8653         }
8654         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
8655         export function OutPoint_get_txid(this_ptr: number): Uint8Array {
8656                 if(!isWasmInitialized) {
8657                         throw new Error("initializeWasm() must be awaited first!");
8658                 }
8659                 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
8660                 return decodeArray(nativeResponseValue);
8661         }
8662         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8663         export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
8664                 if(!isWasmInitialized) {
8665                         throw new Error("initializeWasm() must be awaited first!");
8666                 }
8667                 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
8668                 // debug statements here
8669         }
8670         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
8671         export function OutPoint_get_index(this_ptr: number): number {
8672                 if(!isWasmInitialized) {
8673                         throw new Error("initializeWasm() must be awaited first!");
8674                 }
8675                 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
8676                 return nativeResponseValue;
8677         }
8678         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
8679         export function OutPoint_set_index(this_ptr: number, val: number): void {
8680                 if(!isWasmInitialized) {
8681                         throw new Error("initializeWasm() must be awaited first!");
8682                 }
8683                 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
8684                 // debug statements here
8685         }
8686         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
8687         export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
8688                 if(!isWasmInitialized) {
8689                         throw new Error("initializeWasm() must be awaited first!");
8690                 }
8691                 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
8692                 return nativeResponseValue;
8693         }
8694         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
8695         export function OutPoint_clone(orig: number): number {
8696                 if(!isWasmInitialized) {
8697                         throw new Error("initializeWasm() must be awaited first!");
8698                 }
8699                 const nativeResponseValue = wasm.OutPoint_clone(orig);
8700                 return nativeResponseValue;
8701         }
8702         // bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b);
8703         export function OutPoint_eq(a: number, b: number): boolean {
8704                 if(!isWasmInitialized) {
8705                         throw new Error("initializeWasm() must be awaited first!");
8706                 }
8707                 const nativeResponseValue = wasm.OutPoint_eq(a, b);
8708                 return nativeResponseValue;
8709         }
8710         // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
8711         export function OutPoint_hash(o: number): number {
8712                 if(!isWasmInitialized) {
8713                         throw new Error("initializeWasm() must be awaited first!");
8714                 }
8715                 const nativeResponseValue = wasm.OutPoint_hash(o);
8716                 return nativeResponseValue;
8717         }
8718         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
8719         export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
8720                 if(!isWasmInitialized) {
8721                         throw new Error("initializeWasm() must be awaited first!");
8722                 }
8723                 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
8724                 return decodeArray(nativeResponseValue);
8725         }
8726         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
8727         export function OutPoint_write(obj: number): Uint8Array {
8728                 if(!isWasmInitialized) {
8729                         throw new Error("initializeWasm() must be awaited first!");
8730                 }
8731                 const nativeResponseValue = wasm.OutPoint_write(obj);
8732                 return decodeArray(nativeResponseValue);
8733         }
8734         // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
8735         export function OutPoint_read(ser: Uint8Array): number {
8736                 if(!isWasmInitialized) {
8737                         throw new Error("initializeWasm() must be awaited first!");
8738                 }
8739                 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
8740                 return nativeResponseValue;
8741         }
8742         // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
8743         export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
8744                 if(!isWasmInitialized) {
8745                         throw new Error("initializeWasm() must be awaited first!");
8746                 }
8747                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
8748                 // debug statements here
8749         }
8750         // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8751         export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
8752                 if(!isWasmInitialized) {
8753                         throw new Error("initializeWasm() must be awaited first!");
8754                 }
8755                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
8756                 return nativeResponseValue;
8757         }
8758         // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
8759         export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
8760                 if(!isWasmInitialized) {
8761                         throw new Error("initializeWasm() must be awaited first!");
8762                 }
8763                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
8764                 // debug statements here
8765         }
8766         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8767         export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
8768                 if(!isWasmInitialized) {
8769                         throw new Error("initializeWasm() must be awaited first!");
8770                 }
8771                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
8772                 return decodeArray(nativeResponseValue);
8773         }
8774         // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8775         export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8776                 if(!isWasmInitialized) {
8777                         throw new Error("initializeWasm() must be awaited first!");
8778                 }
8779                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
8780                 // debug statements here
8781         }
8782         // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8783         export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
8784                 if(!isWasmInitialized) {
8785                         throw new Error("initializeWasm() must be awaited first!");
8786                 }
8787                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
8788                 return nativeResponseValue;
8789         }
8790         // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
8791         export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
8792                 if(!isWasmInitialized) {
8793                         throw new Error("initializeWasm() must be awaited first!");
8794                 }
8795                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
8796                 // debug statements here
8797         }
8798         // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
8799         export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
8800                 if(!isWasmInitialized) {
8801                         throw new Error("initializeWasm() must be awaited first!");
8802                 }
8803                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
8804                 // debug statements here
8805         }
8806         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8807         export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
8808                 if(!isWasmInitialized) {
8809                         throw new Error("initializeWasm() must be awaited first!");
8810                 }
8811                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
8812                 return decodeArray(nativeResponseValue);
8813         }
8814         // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8815         export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
8816                 if(!isWasmInitialized) {
8817                         throw new Error("initializeWasm() must be awaited first!");
8818                 }
8819                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
8820                 // debug statements here
8821         }
8822         // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
8823         export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
8824                 if(!isWasmInitialized) {
8825                         throw new Error("initializeWasm() must be awaited first!");
8826                 }
8827                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
8828                 return decodeArray(nativeResponseValue);
8829         }
8830         // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8831         export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
8832                 if(!isWasmInitialized) {
8833                         throw new Error("initializeWasm() must be awaited first!");
8834                 }
8835                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
8836                 // debug statements here
8837         }
8838         // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8839         export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
8840                 if(!isWasmInitialized) {
8841                         throw new Error("initializeWasm() must be awaited first!");
8842                 }
8843                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
8844                 return nativeResponseValue;
8845         }
8846         // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
8847         export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
8848                 if(!isWasmInitialized) {
8849                         throw new Error("initializeWasm() must be awaited first!");
8850                 }
8851                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
8852                 // debug statements here
8853         }
8854         // 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);
8855         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 {
8856                 if(!isWasmInitialized) {
8857                         throw new Error("initializeWasm() must be awaited first!");
8858                 }
8859                 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);
8860                 return nativeResponseValue;
8861         }
8862         // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
8863         export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
8864                 if(!isWasmInitialized) {
8865                         throw new Error("initializeWasm() must be awaited first!");
8866                 }
8867                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
8868                 return nativeResponseValue;
8869         }
8870         // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
8871         export function DelayedPaymentOutputDescriptor_write(obj: number): Uint8Array {
8872                 if(!isWasmInitialized) {
8873                         throw new Error("initializeWasm() must be awaited first!");
8874                 }
8875                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_write(obj);
8876                 return decodeArray(nativeResponseValue);
8877         }
8878         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
8879         export function DelayedPaymentOutputDescriptor_read(ser: Uint8Array): number {
8880                 if(!isWasmInitialized) {
8881                         throw new Error("initializeWasm() must be awaited first!");
8882                 }
8883                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_read(encodeArray(ser));
8884                 return nativeResponseValue;
8885         }
8886         // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
8887         export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
8888                 if(!isWasmInitialized) {
8889                         throw new Error("initializeWasm() must be awaited first!");
8890                 }
8891                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
8892                 // debug statements here
8893         }
8894         // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8895         export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
8896                 if(!isWasmInitialized) {
8897                         throw new Error("initializeWasm() must be awaited first!");
8898                 }
8899                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
8900                 return nativeResponseValue;
8901         }
8902         // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
8903         export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
8904                 if(!isWasmInitialized) {
8905                         throw new Error("initializeWasm() must be awaited first!");
8906                 }
8907                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
8908                 // debug statements here
8909         }
8910         // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
8911         export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
8912                 if(!isWasmInitialized) {
8913                         throw new Error("initializeWasm() must be awaited first!");
8914                 }
8915                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
8916                 // debug statements here
8917         }
8918         // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
8919         export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
8920                 if(!isWasmInitialized) {
8921                         throw new Error("initializeWasm() must be awaited first!");
8922                 }
8923                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
8924                 return decodeArray(nativeResponseValue);
8925         }
8926         // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8927         export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
8928                 if(!isWasmInitialized) {
8929                         throw new Error("initializeWasm() must be awaited first!");
8930                 }
8931                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
8932                 // debug statements here
8933         }
8934         // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8935         export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
8936                 if(!isWasmInitialized) {
8937                         throw new Error("initializeWasm() must be awaited first!");
8938                 }
8939                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
8940                 return nativeResponseValue;
8941         }
8942         // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
8943         export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
8944                 if(!isWasmInitialized) {
8945                         throw new Error("initializeWasm() must be awaited first!");
8946                 }
8947                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
8948                 // debug statements here
8949         }
8950         // 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);
8951         export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
8952                 if(!isWasmInitialized) {
8953                         throw new Error("initializeWasm() must be awaited first!");
8954                 }
8955                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
8956                 return nativeResponseValue;
8957         }
8958         // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
8959         export function StaticPaymentOutputDescriptor_clone(orig: number): number {
8960                 if(!isWasmInitialized) {
8961                         throw new Error("initializeWasm() must be awaited first!");
8962                 }
8963                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
8964                 return nativeResponseValue;
8965         }
8966         // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
8967         export function StaticPaymentOutputDescriptor_write(obj: number): Uint8Array {
8968                 if(!isWasmInitialized) {
8969                         throw new Error("initializeWasm() must be awaited first!");
8970                 }
8971                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_write(obj);
8972                 return decodeArray(nativeResponseValue);
8973         }
8974         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
8975         export function StaticPaymentOutputDescriptor_read(ser: Uint8Array): number {
8976                 if(!isWasmInitialized) {
8977                         throw new Error("initializeWasm() must be awaited first!");
8978                 }
8979                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_read(encodeArray(ser));
8980                 return nativeResponseValue;
8981         }
8982         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
8983         export function SpendableOutputDescriptor_free(this_ptr: number): void {
8984                 if(!isWasmInitialized) {
8985                         throw new Error("initializeWasm() must be awaited first!");
8986                 }
8987                 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
8988                 // debug statements here
8989         }
8990         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
8991         export function SpendableOutputDescriptor_clone(orig: number): number {
8992                 if(!isWasmInitialized) {
8993                         throw new Error("initializeWasm() must be awaited first!");
8994                 }
8995                 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
8996                 return nativeResponseValue;
8997         }
8998         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output);
8999         export function SpendableOutputDescriptor_static_output(outpoint: number, output: number): number {
9000                 if(!isWasmInitialized) {
9001                         throw new Error("initializeWasm() must be awaited first!");
9002                 }
9003                 const nativeResponseValue = wasm.SpendableOutputDescriptor_static_output(outpoint, output);
9004                 return nativeResponseValue;
9005         }
9006         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
9007         export function SpendableOutputDescriptor_delayed_payment_output(a: number): number {
9008                 if(!isWasmInitialized) {
9009                         throw new Error("initializeWasm() must be awaited first!");
9010                 }
9011                 const nativeResponseValue = wasm.SpendableOutputDescriptor_delayed_payment_output(a);
9012                 return nativeResponseValue;
9013         }
9014         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
9015         export function SpendableOutputDescriptor_static_payment_output(a: number): number {
9016                 if(!isWasmInitialized) {
9017                         throw new Error("initializeWasm() must be awaited first!");
9018                 }
9019                 const nativeResponseValue = wasm.SpendableOutputDescriptor_static_payment_output(a);
9020                 return nativeResponseValue;
9021         }
9022         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
9023         export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
9024                 if(!isWasmInitialized) {
9025                         throw new Error("initializeWasm() must be awaited first!");
9026                 }
9027                 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
9028                 return decodeArray(nativeResponseValue);
9029         }
9030         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
9031         export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
9032                 if(!isWasmInitialized) {
9033                         throw new Error("initializeWasm() must be awaited first!");
9034                 }
9035                 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
9036                 return nativeResponseValue;
9037         }
9038         // void BaseSign_free(struct LDKBaseSign this_ptr);
9039         export function BaseSign_free(this_ptr: number): void {
9040                 if(!isWasmInitialized) {
9041                         throw new Error("initializeWasm() must be awaited first!");
9042                 }
9043                 const nativeResponseValue = wasm.BaseSign_free(this_ptr);
9044                 // debug statements here
9045         }
9046         // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
9047         export function Sign_clone(orig: number): number {
9048                 if(!isWasmInitialized) {
9049                         throw new Error("initializeWasm() must be awaited first!");
9050                 }
9051                 const nativeResponseValue = wasm.Sign_clone(orig);
9052                 return nativeResponseValue;
9053         }
9054         // void Sign_free(struct LDKSign this_ptr);
9055         export function Sign_free(this_ptr: number): void {
9056                 if(!isWasmInitialized) {
9057                         throw new Error("initializeWasm() must be awaited first!");
9058                 }
9059                 const nativeResponseValue = wasm.Sign_free(this_ptr);
9060                 // debug statements here
9061         }
9062         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
9063         export function KeysInterface_free(this_ptr: number): void {
9064                 if(!isWasmInitialized) {
9065                         throw new Error("initializeWasm() must be awaited first!");
9066                 }
9067                 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
9068                 // debug statements here
9069         }
9070         // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
9071         export function InMemorySigner_free(this_obj: number): void {
9072                 if(!isWasmInitialized) {
9073                         throw new Error("initializeWasm() must be awaited first!");
9074                 }
9075                 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
9076                 // debug statements here
9077         }
9078         // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
9079         export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
9080                 if(!isWasmInitialized) {
9081                         throw new Error("initializeWasm() must be awaited first!");
9082                 }
9083                 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
9084                 return decodeArray(nativeResponseValue);
9085         }
9086         // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
9087         export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
9088                 if(!isWasmInitialized) {
9089                         throw new Error("initializeWasm() must be awaited first!");
9090                 }
9091                 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
9092                 // debug statements here
9093         }
9094         // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
9095         export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
9096                 if(!isWasmInitialized) {
9097                         throw new Error("initializeWasm() must be awaited first!");
9098                 }
9099                 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
9100                 return decodeArray(nativeResponseValue);
9101         }
9102         // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
9103         export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
9104                 if(!isWasmInitialized) {
9105                         throw new Error("initializeWasm() must be awaited first!");
9106                 }
9107                 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
9108                 // debug statements here
9109         }
9110         // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
9111         export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
9112                 if(!isWasmInitialized) {
9113                         throw new Error("initializeWasm() must be awaited first!");
9114                 }
9115                 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
9116                 return decodeArray(nativeResponseValue);
9117         }
9118         // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
9119         export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
9120                 if(!isWasmInitialized) {
9121                         throw new Error("initializeWasm() must be awaited first!");
9122                 }
9123                 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
9124                 // debug statements here
9125         }
9126         // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
9127         export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
9128                 if(!isWasmInitialized) {
9129                         throw new Error("initializeWasm() must be awaited first!");
9130                 }
9131                 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
9132                 return decodeArray(nativeResponseValue);
9133         }
9134         // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
9135         export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
9136                 if(!isWasmInitialized) {
9137                         throw new Error("initializeWasm() must be awaited first!");
9138                 }
9139                 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
9140                 // debug statements here
9141         }
9142         // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
9143         export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
9144                 if(!isWasmInitialized) {
9145                         throw new Error("initializeWasm() must be awaited first!");
9146                 }
9147                 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
9148                 return decodeArray(nativeResponseValue);
9149         }
9150         // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
9151         export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
9152                 if(!isWasmInitialized) {
9153                         throw new Error("initializeWasm() must be awaited first!");
9154                 }
9155                 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
9156                 // debug statements here
9157         }
9158         // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
9159         export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
9160                 if(!isWasmInitialized) {
9161                         throw new Error("initializeWasm() must be awaited first!");
9162                 }
9163                 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
9164                 return decodeArray(nativeResponseValue);
9165         }
9166         // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9167         export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
9168                 if(!isWasmInitialized) {
9169                         throw new Error("initializeWasm() must be awaited first!");
9170                 }
9171                 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
9172                 // debug statements here
9173         }
9174         // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
9175         export function InMemorySigner_clone(orig: number): number {
9176                 if(!isWasmInitialized) {
9177                         throw new Error("initializeWasm() must be awaited first!");
9178                 }
9179                 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
9180                 return nativeResponseValue;
9181         }
9182         // 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);
9183         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 {
9184                 if(!isWasmInitialized) {
9185                         throw new Error("initializeWasm() must be awaited first!");
9186                 }
9187                 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));
9188                 return nativeResponseValue;
9189         }
9190         // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9191         export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
9192                 if(!isWasmInitialized) {
9193                         throw new Error("initializeWasm() must be awaited first!");
9194                 }
9195                 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
9196                 return nativeResponseValue;
9197         }
9198         // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9199         export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
9200                 if(!isWasmInitialized) {
9201                         throw new Error("initializeWasm() must be awaited first!");
9202                 }
9203                 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
9204                 return nativeResponseValue;
9205         }
9206         // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9207         export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
9208                 if(!isWasmInitialized) {
9209                         throw new Error("initializeWasm() must be awaited first!");
9210                 }
9211                 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
9212                 return nativeResponseValue;
9213         }
9214         // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9215         export function InMemorySigner_is_outbound(this_arg: number): boolean {
9216                 if(!isWasmInitialized) {
9217                         throw new Error("initializeWasm() must be awaited first!");
9218                 }
9219                 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
9220                 return nativeResponseValue;
9221         }
9222         // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9223         export function InMemorySigner_funding_outpoint(this_arg: number): number {
9224                 if(!isWasmInitialized) {
9225                         throw new Error("initializeWasm() must be awaited first!");
9226                 }
9227                 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
9228                 return nativeResponseValue;
9229         }
9230         // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9231         export function InMemorySigner_get_channel_parameters(this_arg: number): number {
9232                 if(!isWasmInitialized) {
9233                         throw new Error("initializeWasm() must be awaited first!");
9234                 }
9235                 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
9236                 return nativeResponseValue;
9237         }
9238         // 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);
9239         export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
9240                 if(!isWasmInitialized) {
9241                         throw new Error("initializeWasm() must be awaited first!");
9242                 }
9243                 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
9244                 return nativeResponseValue;
9245         }
9246         // 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);
9247         export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
9248                 if(!isWasmInitialized) {
9249                         throw new Error("initializeWasm() must be awaited first!");
9250                 }
9251                 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
9252                 return nativeResponseValue;
9253         }
9254         // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9255         export function InMemorySigner_as_BaseSign(this_arg: number): number {
9256                 if(!isWasmInitialized) {
9257                         throw new Error("initializeWasm() must be awaited first!");
9258                 }
9259                 const nativeResponseValue = wasm.InMemorySigner_as_BaseSign(this_arg);
9260                 return nativeResponseValue;
9261         }
9262         // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9263         export function InMemorySigner_as_Sign(this_arg: number): number {
9264                 if(!isWasmInitialized) {
9265                         throw new Error("initializeWasm() must be awaited first!");
9266                 }
9267                 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
9268                 return nativeResponseValue;
9269         }
9270         // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
9271         export function InMemorySigner_write(obj: number): Uint8Array {
9272                 if(!isWasmInitialized) {
9273                         throw new Error("initializeWasm() must be awaited first!");
9274                 }
9275                 const nativeResponseValue = wasm.InMemorySigner_write(obj);
9276                 return decodeArray(nativeResponseValue);
9277         }
9278         // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
9279         export function InMemorySigner_read(ser: Uint8Array): number {
9280                 if(!isWasmInitialized) {
9281                         throw new Error("initializeWasm() must be awaited first!");
9282                 }
9283                 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
9284                 return nativeResponseValue;
9285         }
9286         // void KeysManager_free(struct LDKKeysManager this_obj);
9287         export function KeysManager_free(this_obj: number): void {
9288                 if(!isWasmInitialized) {
9289                         throw new Error("initializeWasm() must be awaited first!");
9290                 }
9291                 const nativeResponseValue = wasm.KeysManager_free(this_obj);
9292                 // debug statements here
9293         }
9294         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
9295         export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
9296                 if(!isWasmInitialized) {
9297                         throw new Error("initializeWasm() must be awaited first!");
9298                 }
9299                 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
9300                 return nativeResponseValue;
9301         }
9302         // 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]);
9303         export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
9304                 if(!isWasmInitialized) {
9305                         throw new Error("initializeWasm() must be awaited first!");
9306                 }
9307                 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
9308                 return nativeResponseValue;
9309         }
9310         // 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);
9311         export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
9312                 if(!isWasmInitialized) {
9313                         throw new Error("initializeWasm() must be awaited first!");
9314                 }
9315                 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
9316                 return nativeResponseValue;
9317         }
9318         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
9319         export function KeysManager_as_KeysInterface(this_arg: number): number {
9320                 if(!isWasmInitialized) {
9321                         throw new Error("initializeWasm() must be awaited first!");
9322                 }
9323                 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
9324                 return nativeResponseValue;
9325         }
9326         // void PaymentId_free(struct LDKPaymentId this_obj);
9327         export function PaymentId_free(this_obj: number): void {
9328                 if(!isWasmInitialized) {
9329                         throw new Error("initializeWasm() must be awaited first!");
9330                 }
9331                 const nativeResponseValue = wasm.PaymentId_free(this_obj);
9332                 // debug statements here
9333         }
9334         // uint64_t PaymentId_hash(const struct LDKPaymentId *NONNULL_PTR o);
9335         export function PaymentId_hash(o: number): number {
9336                 if(!isWasmInitialized) {
9337                         throw new Error("initializeWasm() must be awaited first!");
9338                 }
9339                 const nativeResponseValue = wasm.PaymentId_hash(o);
9340                 return nativeResponseValue;
9341         }
9342         // struct LDKPaymentId PaymentId_clone(const struct LDKPaymentId *NONNULL_PTR orig);
9343         export function PaymentId_clone(orig: number): number {
9344                 if(!isWasmInitialized) {
9345                         throw new Error("initializeWasm() must be awaited first!");
9346                 }
9347                 const nativeResponseValue = wasm.PaymentId_clone(orig);
9348                 return nativeResponseValue;
9349         }
9350         // bool PaymentId_eq(const struct LDKPaymentId *NONNULL_PTR a, const struct LDKPaymentId *NONNULL_PTR b);
9351         export function PaymentId_eq(a: number, b: number): boolean {
9352                 if(!isWasmInitialized) {
9353                         throw new Error("initializeWasm() must be awaited first!");
9354                 }
9355                 const nativeResponseValue = wasm.PaymentId_eq(a, b);
9356                 return nativeResponseValue;
9357         }
9358         // struct LDKCVec_u8Z PaymentId_write(const struct LDKPaymentId *NONNULL_PTR obj);
9359         export function PaymentId_write(obj: number): Uint8Array {
9360                 if(!isWasmInitialized) {
9361                         throw new Error("initializeWasm() must be awaited first!");
9362                 }
9363                 const nativeResponseValue = wasm.PaymentId_write(obj);
9364                 return decodeArray(nativeResponseValue);
9365         }
9366         // struct LDKCResult_PaymentIdDecodeErrorZ PaymentId_read(struct LDKu8slice ser);
9367         export function PaymentId_read(ser: Uint8Array): number {
9368                 if(!isWasmInitialized) {
9369                         throw new Error("initializeWasm() must be awaited first!");
9370                 }
9371                 const nativeResponseValue = wasm.PaymentId_read(encodeArray(ser));
9372                 return nativeResponseValue;
9373         }
9374         // void ChannelManager_free(struct LDKChannelManager this_obj);
9375         export function ChannelManager_free(this_obj: number): void {
9376                 if(!isWasmInitialized) {
9377                         throw new Error("initializeWasm() must be awaited first!");
9378                 }
9379                 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
9380                 // debug statements here
9381         }
9382         // void ChainParameters_free(struct LDKChainParameters this_obj);
9383         export function ChainParameters_free(this_obj: number): void {
9384                 if(!isWasmInitialized) {
9385                         throw new Error("initializeWasm() must be awaited first!");
9386                 }
9387                 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
9388                 // debug statements here
9389         }
9390         // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
9391         export function ChainParameters_get_network(this_ptr: number): Network {
9392                 if(!isWasmInitialized) {
9393                         throw new Error("initializeWasm() must be awaited first!");
9394                 }
9395                 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
9396                 return nativeResponseValue;
9397         }
9398         // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
9399         export function ChainParameters_set_network(this_ptr: number, val: Network): void {
9400                 if(!isWasmInitialized) {
9401                         throw new Error("initializeWasm() must be awaited first!");
9402                 }
9403                 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
9404                 // debug statements here
9405         }
9406         // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
9407         export function ChainParameters_get_best_block(this_ptr: number): number {
9408                 if(!isWasmInitialized) {
9409                         throw new Error("initializeWasm() must be awaited first!");
9410                 }
9411                 const nativeResponseValue = wasm.ChainParameters_get_best_block(this_ptr);
9412                 return nativeResponseValue;
9413         }
9414         // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
9415         export function ChainParameters_set_best_block(this_ptr: number, val: number): void {
9416                 if(!isWasmInitialized) {
9417                         throw new Error("initializeWasm() must be awaited first!");
9418                 }
9419                 const nativeResponseValue = wasm.ChainParameters_set_best_block(this_ptr, val);
9420                 // debug statements here
9421         }
9422         // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
9423         export function ChainParameters_new(network_arg: Network, best_block_arg: number): number {
9424                 if(!isWasmInitialized) {
9425                         throw new Error("initializeWasm() must be awaited first!");
9426                 }
9427                 const nativeResponseValue = wasm.ChainParameters_new(network_arg, best_block_arg);
9428                 return nativeResponseValue;
9429         }
9430         // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
9431         export function ChainParameters_clone(orig: number): number {
9432                 if(!isWasmInitialized) {
9433                         throw new Error("initializeWasm() must be awaited first!");
9434                 }
9435                 const nativeResponseValue = wasm.ChainParameters_clone(orig);
9436                 return nativeResponseValue;
9437         }
9438         // void CounterpartyForwardingInfo_free(struct LDKCounterpartyForwardingInfo this_obj);
9439         export function CounterpartyForwardingInfo_free(this_obj: number): void {
9440                 if(!isWasmInitialized) {
9441                         throw new Error("initializeWasm() must be awaited first!");
9442                 }
9443                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_free(this_obj);
9444                 // debug statements here
9445         }
9446         // uint32_t CounterpartyForwardingInfo_get_fee_base_msat(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
9447         export function CounterpartyForwardingInfo_get_fee_base_msat(this_ptr: number): number {
9448                 if(!isWasmInitialized) {
9449                         throw new Error("initializeWasm() must be awaited first!");
9450                 }
9451                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_fee_base_msat(this_ptr);
9452                 return nativeResponseValue;
9453         }
9454         // void CounterpartyForwardingInfo_set_fee_base_msat(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
9455         export function CounterpartyForwardingInfo_set_fee_base_msat(this_ptr: number, val: number): void {
9456                 if(!isWasmInitialized) {
9457                         throw new Error("initializeWasm() must be awaited first!");
9458                 }
9459                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_fee_base_msat(this_ptr, val);
9460                 // debug statements here
9461         }
9462         // uint32_t CounterpartyForwardingInfo_get_fee_proportional_millionths(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
9463         export function CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr: number): number {
9464                 if(!isWasmInitialized) {
9465                         throw new Error("initializeWasm() must be awaited first!");
9466                 }
9467                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr);
9468                 return nativeResponseValue;
9469         }
9470         // void CounterpartyForwardingInfo_set_fee_proportional_millionths(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
9471         export function CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr: number, val: number): void {
9472                 if(!isWasmInitialized) {
9473                         throw new Error("initializeWasm() must be awaited first!");
9474                 }
9475                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr, val);
9476                 // debug statements here
9477         }
9478         // uint16_t CounterpartyForwardingInfo_get_cltv_expiry_delta(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
9479         export function CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr: number): number {
9480                 if(!isWasmInitialized) {
9481                         throw new Error("initializeWasm() must be awaited first!");
9482                 }
9483                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr);
9484                 return nativeResponseValue;
9485         }
9486         // void CounterpartyForwardingInfo_set_cltv_expiry_delta(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint16_t val);
9487         export function CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
9488                 if(!isWasmInitialized) {
9489                         throw new Error("initializeWasm() must be awaited first!");
9490                 }
9491                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr, val);
9492                 // debug statements here
9493         }
9494         // 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);
9495         export function CounterpartyForwardingInfo_new(fee_base_msat_arg: number, fee_proportional_millionths_arg: number, cltv_expiry_delta_arg: number): number {
9496                 if(!isWasmInitialized) {
9497                         throw new Error("initializeWasm() must be awaited first!");
9498                 }
9499                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg);
9500                 return nativeResponseValue;
9501         }
9502         // struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_clone(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR orig);
9503         export function CounterpartyForwardingInfo_clone(orig: number): number {
9504                 if(!isWasmInitialized) {
9505                         throw new Error("initializeWasm() must be awaited first!");
9506                 }
9507                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_clone(orig);
9508                 return nativeResponseValue;
9509         }
9510         // void ChannelCounterparty_free(struct LDKChannelCounterparty this_obj);
9511         export function ChannelCounterparty_free(this_obj: number): void {
9512                 if(!isWasmInitialized) {
9513                         throw new Error("initializeWasm() must be awaited first!");
9514                 }
9515                 const nativeResponseValue = wasm.ChannelCounterparty_free(this_obj);
9516                 // debug statements here
9517         }
9518         // struct LDKPublicKey ChannelCounterparty_get_node_id(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
9519         export function ChannelCounterparty_get_node_id(this_ptr: number): Uint8Array {
9520                 if(!isWasmInitialized) {
9521                         throw new Error("initializeWasm() must be awaited first!");
9522                 }
9523                 const nativeResponseValue = wasm.ChannelCounterparty_get_node_id(this_ptr);
9524                 return decodeArray(nativeResponseValue);
9525         }
9526         // void ChannelCounterparty_set_node_id(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9527         export function ChannelCounterparty_set_node_id(this_ptr: number, val: Uint8Array): void {
9528                 if(!isWasmInitialized) {
9529                         throw new Error("initializeWasm() must be awaited first!");
9530                 }
9531                 const nativeResponseValue = wasm.ChannelCounterparty_set_node_id(this_ptr, encodeArray(val));
9532                 // debug statements here
9533         }
9534         // struct LDKInitFeatures ChannelCounterparty_get_features(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
9535         export function ChannelCounterparty_get_features(this_ptr: number): number {
9536                 if(!isWasmInitialized) {
9537                         throw new Error("initializeWasm() must be awaited first!");
9538                 }
9539                 const nativeResponseValue = wasm.ChannelCounterparty_get_features(this_ptr);
9540                 return nativeResponseValue;
9541         }
9542         // void ChannelCounterparty_set_features(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
9543         export function ChannelCounterparty_set_features(this_ptr: number, val: number): void {
9544                 if(!isWasmInitialized) {
9545                         throw new Error("initializeWasm() must be awaited first!");
9546                 }
9547                 const nativeResponseValue = wasm.ChannelCounterparty_set_features(this_ptr, val);
9548                 // debug statements here
9549         }
9550         // uint64_t ChannelCounterparty_get_unspendable_punishment_reserve(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
9551         export function ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr: number): number {
9552                 if(!isWasmInitialized) {
9553                         throw new Error("initializeWasm() must be awaited first!");
9554                 }
9555                 const nativeResponseValue = wasm.ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr);
9556                 return nativeResponseValue;
9557         }
9558         // void ChannelCounterparty_set_unspendable_punishment_reserve(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, uint64_t val);
9559         export function ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
9560                 if(!isWasmInitialized) {
9561                         throw new Error("initializeWasm() must be awaited first!");
9562                 }
9563                 const nativeResponseValue = wasm.ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr, val);
9564                 // debug statements here
9565         }
9566         // struct LDKCounterpartyForwardingInfo ChannelCounterparty_get_forwarding_info(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
9567         export function ChannelCounterparty_get_forwarding_info(this_ptr: number): number {
9568                 if(!isWasmInitialized) {
9569                         throw new Error("initializeWasm() must be awaited first!");
9570                 }
9571                 const nativeResponseValue = wasm.ChannelCounterparty_get_forwarding_info(this_ptr);
9572                 return nativeResponseValue;
9573         }
9574         // void ChannelCounterparty_set_forwarding_info(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKCounterpartyForwardingInfo val);
9575         export function ChannelCounterparty_set_forwarding_info(this_ptr: number, val: number): void {
9576                 if(!isWasmInitialized) {
9577                         throw new Error("initializeWasm() must be awaited first!");
9578                 }
9579                 const nativeResponseValue = wasm.ChannelCounterparty_set_forwarding_info(this_ptr, val);
9580                 // debug statements here
9581         }
9582         // 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);
9583         export function ChannelCounterparty_new(node_id_arg: Uint8Array, features_arg: number, unspendable_punishment_reserve_arg: number, forwarding_info_arg: number): number {
9584                 if(!isWasmInitialized) {
9585                         throw new Error("initializeWasm() must be awaited first!");
9586                 }
9587                 const nativeResponseValue = wasm.ChannelCounterparty_new(encodeArray(node_id_arg), features_arg, unspendable_punishment_reserve_arg, forwarding_info_arg);
9588                 return nativeResponseValue;
9589         }
9590         // struct LDKChannelCounterparty ChannelCounterparty_clone(const struct LDKChannelCounterparty *NONNULL_PTR orig);
9591         export function ChannelCounterparty_clone(orig: number): number {
9592                 if(!isWasmInitialized) {
9593                         throw new Error("initializeWasm() must be awaited first!");
9594                 }
9595                 const nativeResponseValue = wasm.ChannelCounterparty_clone(orig);
9596                 return nativeResponseValue;
9597         }
9598         // void ChannelDetails_free(struct LDKChannelDetails this_obj);
9599         export function ChannelDetails_free(this_obj: number): void {
9600                 if(!isWasmInitialized) {
9601                         throw new Error("initializeWasm() must be awaited first!");
9602                 }
9603                 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
9604                 // debug statements here
9605         }
9606         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
9607         export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
9608                 if(!isWasmInitialized) {
9609                         throw new Error("initializeWasm() must be awaited first!");
9610                 }
9611                 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
9612                 return decodeArray(nativeResponseValue);
9613         }
9614         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9615         export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
9616                 if(!isWasmInitialized) {
9617                         throw new Error("initializeWasm() must be awaited first!");
9618                 }
9619                 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
9620                 // debug statements here
9621         }
9622         // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9623         export function ChannelDetails_get_counterparty(this_ptr: number): number {
9624                 if(!isWasmInitialized) {
9625                         throw new Error("initializeWasm() must be awaited first!");
9626                 }
9627                 const nativeResponseValue = wasm.ChannelDetails_get_counterparty(this_ptr);
9628                 return nativeResponseValue;
9629         }
9630         // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
9631         export function ChannelDetails_set_counterparty(this_ptr: number, val: number): void {
9632                 if(!isWasmInitialized) {
9633                         throw new Error("initializeWasm() must be awaited first!");
9634                 }
9635                 const nativeResponseValue = wasm.ChannelDetails_set_counterparty(this_ptr, val);
9636                 // debug statements here
9637         }
9638         // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9639         export function ChannelDetails_get_funding_txo(this_ptr: number): number {
9640                 if(!isWasmInitialized) {
9641                         throw new Error("initializeWasm() must be awaited first!");
9642                 }
9643                 const nativeResponseValue = wasm.ChannelDetails_get_funding_txo(this_ptr);
9644                 return nativeResponseValue;
9645         }
9646         // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
9647         export function ChannelDetails_set_funding_txo(this_ptr: number, val: number): void {
9648                 if(!isWasmInitialized) {
9649                         throw new Error("initializeWasm() must be awaited first!");
9650                 }
9651                 const nativeResponseValue = wasm.ChannelDetails_set_funding_txo(this_ptr, val);
9652                 // debug statements here
9653         }
9654         // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9655         export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
9656                 if(!isWasmInitialized) {
9657                         throw new Error("initializeWasm() must be awaited first!");
9658                 }
9659                 const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
9660                 return nativeResponseValue;
9661         }
9662         // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
9663         export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
9664                 if(!isWasmInitialized) {
9665                         throw new Error("initializeWasm() must be awaited first!");
9666                 }
9667                 const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
9668                 // debug statements here
9669         }
9670         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9671         export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
9672                 if(!isWasmInitialized) {
9673                         throw new Error("initializeWasm() must be awaited first!");
9674                 }
9675                 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
9676                 return nativeResponseValue;
9677         }
9678         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
9679         export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
9680                 if(!isWasmInitialized) {
9681                         throw new Error("initializeWasm() must be awaited first!");
9682                 }
9683                 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
9684                 // debug statements here
9685         }
9686         // struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9687         export function ChannelDetails_get_unspendable_punishment_reserve(this_ptr: number): number {
9688                 if(!isWasmInitialized) {
9689                         throw new Error("initializeWasm() must be awaited first!");
9690                 }
9691                 const nativeResponseValue = wasm.ChannelDetails_get_unspendable_punishment_reserve(this_ptr);
9692                 return nativeResponseValue;
9693         }
9694         // void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
9695         export function ChannelDetails_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
9696                 if(!isWasmInitialized) {
9697                         throw new Error("initializeWasm() must be awaited first!");
9698                 }
9699                 const nativeResponseValue = wasm.ChannelDetails_set_unspendable_punishment_reserve(this_ptr, val);
9700                 // debug statements here
9701         }
9702         // uint64_t ChannelDetails_get_user_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9703         export function ChannelDetails_get_user_channel_id(this_ptr: number): number {
9704                 if(!isWasmInitialized) {
9705                         throw new Error("initializeWasm() must be awaited first!");
9706                 }
9707                 const nativeResponseValue = wasm.ChannelDetails_get_user_channel_id(this_ptr);
9708                 return nativeResponseValue;
9709         }
9710         // void ChannelDetails_set_user_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
9711         export function ChannelDetails_set_user_channel_id(this_ptr: number, val: number): void {
9712                 if(!isWasmInitialized) {
9713                         throw new Error("initializeWasm() must be awaited first!");
9714                 }
9715                 const nativeResponseValue = wasm.ChannelDetails_set_user_channel_id(this_ptr, val);
9716                 // debug statements here
9717         }
9718         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9719         export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
9720                 if(!isWasmInitialized) {
9721                         throw new Error("initializeWasm() must be awaited first!");
9722                 }
9723                 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
9724                 return nativeResponseValue;
9725         }
9726         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
9727         export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
9728                 if(!isWasmInitialized) {
9729                         throw new Error("initializeWasm() must be awaited first!");
9730                 }
9731                 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
9732                 // debug statements here
9733         }
9734         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9735         export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
9736                 if(!isWasmInitialized) {
9737                         throw new Error("initializeWasm() must be awaited first!");
9738                 }
9739                 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
9740                 return nativeResponseValue;
9741         }
9742         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
9743         export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
9744                 if(!isWasmInitialized) {
9745                         throw new Error("initializeWasm() must be awaited first!");
9746                 }
9747                 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
9748                 // debug statements here
9749         }
9750         // struct LDKCOption_u32Z ChannelDetails_get_confirmations_required(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9751         export function ChannelDetails_get_confirmations_required(this_ptr: number): number {
9752                 if(!isWasmInitialized) {
9753                         throw new Error("initializeWasm() must be awaited first!");
9754                 }
9755                 const nativeResponseValue = wasm.ChannelDetails_get_confirmations_required(this_ptr);
9756                 return nativeResponseValue;
9757         }
9758         // void ChannelDetails_set_confirmations_required(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
9759         export function ChannelDetails_set_confirmations_required(this_ptr: number, val: number): void {
9760                 if(!isWasmInitialized) {
9761                         throw new Error("initializeWasm() must be awaited first!");
9762                 }
9763                 const nativeResponseValue = wasm.ChannelDetails_set_confirmations_required(this_ptr, val);
9764                 // debug statements here
9765         }
9766         // struct LDKCOption_u16Z ChannelDetails_get_force_close_spend_delay(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9767         export function ChannelDetails_get_force_close_spend_delay(this_ptr: number): number {
9768                 if(!isWasmInitialized) {
9769                         throw new Error("initializeWasm() must be awaited first!");
9770                 }
9771                 const nativeResponseValue = wasm.ChannelDetails_get_force_close_spend_delay(this_ptr);
9772                 return nativeResponseValue;
9773         }
9774         // void ChannelDetails_set_force_close_spend_delay(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
9775         export function ChannelDetails_set_force_close_spend_delay(this_ptr: number, val: number): void {
9776                 if(!isWasmInitialized) {
9777                         throw new Error("initializeWasm() must be awaited first!");
9778                 }
9779                 const nativeResponseValue = wasm.ChannelDetails_set_force_close_spend_delay(this_ptr, val);
9780                 // debug statements here
9781         }
9782         // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9783         export function ChannelDetails_get_is_outbound(this_ptr: number): boolean {
9784                 if(!isWasmInitialized) {
9785                         throw new Error("initializeWasm() must be awaited first!");
9786                 }
9787                 const nativeResponseValue = wasm.ChannelDetails_get_is_outbound(this_ptr);
9788                 return nativeResponseValue;
9789         }
9790         // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
9791         export function ChannelDetails_set_is_outbound(this_ptr: number, val: boolean): void {
9792                 if(!isWasmInitialized) {
9793                         throw new Error("initializeWasm() must be awaited first!");
9794                 }
9795                 const nativeResponseValue = wasm.ChannelDetails_set_is_outbound(this_ptr, val);
9796                 // debug statements here
9797         }
9798         // bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9799         export function ChannelDetails_get_is_funding_locked(this_ptr: number): boolean {
9800                 if(!isWasmInitialized) {
9801                         throw new Error("initializeWasm() must be awaited first!");
9802                 }
9803                 const nativeResponseValue = wasm.ChannelDetails_get_is_funding_locked(this_ptr);
9804                 return nativeResponseValue;
9805         }
9806         // void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
9807         export function ChannelDetails_set_is_funding_locked(this_ptr: number, val: boolean): void {
9808                 if(!isWasmInitialized) {
9809                         throw new Error("initializeWasm() must be awaited first!");
9810                 }
9811                 const nativeResponseValue = wasm.ChannelDetails_set_is_funding_locked(this_ptr, val);
9812                 // debug statements here
9813         }
9814         // bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9815         export function ChannelDetails_get_is_usable(this_ptr: number): boolean {
9816                 if(!isWasmInitialized) {
9817                         throw new Error("initializeWasm() must be awaited first!");
9818                 }
9819                 const nativeResponseValue = wasm.ChannelDetails_get_is_usable(this_ptr);
9820                 return nativeResponseValue;
9821         }
9822         // void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
9823         export function ChannelDetails_set_is_usable(this_ptr: number, val: boolean): void {
9824                 if(!isWasmInitialized) {
9825                         throw new Error("initializeWasm() must be awaited first!");
9826                 }
9827                 const nativeResponseValue = wasm.ChannelDetails_set_is_usable(this_ptr, val);
9828                 // debug statements here
9829         }
9830         // bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9831         export function ChannelDetails_get_is_public(this_ptr: number): boolean {
9832                 if(!isWasmInitialized) {
9833                         throw new Error("initializeWasm() must be awaited first!");
9834                 }
9835                 const nativeResponseValue = wasm.ChannelDetails_get_is_public(this_ptr);
9836                 return nativeResponseValue;
9837         }
9838         // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
9839         export function ChannelDetails_set_is_public(this_ptr: number, val: boolean): void {
9840                 if(!isWasmInitialized) {
9841                         throw new Error("initializeWasm() must be awaited first!");
9842                 }
9843                 const nativeResponseValue = wasm.ChannelDetails_set_is_public(this_ptr, val);
9844                 // debug statements here
9845         }
9846         // MUST_USE_RES struct LDKChannelDetails ChannelDetails_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKChannelCounterparty counterparty_arg, struct LDKOutPoint funding_txo_arg, struct LDKCOption_u64Z short_channel_id_arg, uint64_t channel_value_satoshis_arg, struct LDKCOption_u64Z unspendable_punishment_reserve_arg, uint64_t user_channel_id_arg, uint64_t outbound_capacity_msat_arg, uint64_t inbound_capacity_msat_arg, struct LDKCOption_u32Z confirmations_required_arg, struct LDKCOption_u16Z force_close_spend_delay_arg, bool is_outbound_arg, bool is_funding_locked_arg, bool is_usable_arg, bool is_public_arg);
9847         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_channel_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 {
9848                 if(!isWasmInitialized) {
9849                         throw new Error("initializeWasm() must be awaited first!");
9850                 }
9851                 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_channel_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);
9852                 return nativeResponseValue;
9853         }
9854         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
9855         export function ChannelDetails_clone(orig: number): number {
9856                 if(!isWasmInitialized) {
9857                         throw new Error("initializeWasm() must be awaited first!");
9858                 }
9859                 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
9860                 return nativeResponseValue;
9861         }
9862         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
9863         export function PaymentSendFailure_free(this_ptr: number): void {
9864                 if(!isWasmInitialized) {
9865                         throw new Error("initializeWasm() must be awaited first!");
9866                 }
9867                 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
9868                 // debug statements here
9869         }
9870         // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
9871         export function PaymentSendFailure_clone(orig: number): number {
9872                 if(!isWasmInitialized) {
9873                         throw new Error("initializeWasm() must be awaited first!");
9874                 }
9875                 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
9876                 return nativeResponseValue;
9877         }
9878         // struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
9879         export function PaymentSendFailure_parameter_error(a: number): number {
9880                 if(!isWasmInitialized) {
9881                         throw new Error("initializeWasm() must be awaited first!");
9882                 }
9883                 const nativeResponseValue = wasm.PaymentSendFailure_parameter_error(a);
9884                 return nativeResponseValue;
9885         }
9886         // struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
9887         export function PaymentSendFailure_path_parameter_error(a: number[]): number {
9888                 if(!isWasmInitialized) {
9889                         throw new Error("initializeWasm() must be awaited first!");
9890                 }
9891                 const nativeResponseValue = wasm.PaymentSendFailure_path_parameter_error(a);
9892                 return nativeResponseValue;
9893         }
9894         // struct LDKPaymentSendFailure PaymentSendFailure_all_failed_retry_safe(struct LDKCVec_APIErrorZ a);
9895         export function PaymentSendFailure_all_failed_retry_safe(a: number[]): number {
9896                 if(!isWasmInitialized) {
9897                         throw new Error("initializeWasm() must be awaited first!");
9898                 }
9899                 const nativeResponseValue = wasm.PaymentSendFailure_all_failed_retry_safe(a);
9900                 return nativeResponseValue;
9901         }
9902         // struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ a);
9903         export function PaymentSendFailure_partial_failure(a: number[]): number {
9904                 if(!isWasmInitialized) {
9905                         throw new Error("initializeWasm() must be awaited first!");
9906                 }
9907                 const nativeResponseValue = wasm.PaymentSendFailure_partial_failure(a);
9908                 return nativeResponseValue;
9909         }
9910         // 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);
9911         export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
9912                 if(!isWasmInitialized) {
9913                         throw new Error("initializeWasm() must be awaited first!");
9914                 }
9915                 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
9916                 return nativeResponseValue;
9917         }
9918         // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
9919         export function ChannelManager_get_current_default_configuration(this_arg: number): number {
9920                 if(!isWasmInitialized) {
9921                         throw new Error("initializeWasm() must be awaited first!");
9922                 }
9923                 const nativeResponseValue = wasm.ChannelManager_get_current_default_configuration(this_arg);
9924                 return nativeResponseValue;
9925         }
9926         // MUST_USE_RES struct LDKCResult__u832APIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, uint64_t user_channel_id, struct LDKUserConfig override_config);
9927         export function ChannelManager_create_channel(this_arg: number, their_network_key: Uint8Array, channel_value_satoshis: number, push_msat: number, user_channel_id: number, override_config: number): number {
9928                 if(!isWasmInitialized) {
9929                         throw new Error("initializeWasm() must be awaited first!");
9930                 }
9931                 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_channel_id, override_config);
9932                 return nativeResponseValue;
9933         }
9934         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
9935         export function ChannelManager_list_channels(this_arg: number): number[] {
9936                 if(!isWasmInitialized) {
9937                         throw new Error("initializeWasm() must be awaited first!");
9938                 }
9939                 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
9940                 return nativeResponseValue;
9941         }
9942         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
9943         export function ChannelManager_list_usable_channels(this_arg: number): number[] {
9944                 if(!isWasmInitialized) {
9945                         throw new Error("initializeWasm() must be awaited first!");
9946                 }
9947                 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
9948                 return nativeResponseValue;
9949         }
9950         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
9951         export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
9952                 if(!isWasmInitialized) {
9953                         throw new Error("initializeWasm() must be awaited first!");
9954                 }
9955                 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
9956                 return nativeResponseValue;
9957         }
9958         // 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);
9959         export function ChannelManager_close_channel_with_target_feerate(this_arg: number, channel_id: Uint8Array, target_feerate_sats_per_1000_weight: number): number {
9960                 if(!isWasmInitialized) {
9961                         throw new Error("initializeWasm() must be awaited first!");
9962                 }
9963                 const nativeResponseValue = wasm.ChannelManager_close_channel_with_target_feerate(this_arg, encodeArray(channel_id), target_feerate_sats_per_1000_weight);
9964                 return nativeResponseValue;
9965         }
9966         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
9967         export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
9968                 if(!isWasmInitialized) {
9969                         throw new Error("initializeWasm() must be awaited first!");
9970                 }
9971                 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
9972                 return nativeResponseValue;
9973         }
9974         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
9975         export function ChannelManager_force_close_all_channels(this_arg: number): void {
9976                 if(!isWasmInitialized) {
9977                         throw new Error("initializeWasm() must be awaited first!");
9978                 }
9979                 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
9980                 // debug statements here
9981         }
9982         // MUST_USE_RES struct LDKCResult_PaymentIdPaymentSendFailureZ ChannelManager_send_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_hash, struct LDKThirtyTwoBytes payment_secret);
9983         export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
9984                 if(!isWasmInitialized) {
9985                         throw new Error("initializeWasm() must be awaited first!");
9986                 }
9987                 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
9988                 return nativeResponseValue;
9989         }
9990         // MUST_USE_RES struct LDKCResult_NonePaymentSendFailureZ ChannelManager_retry_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKPaymentId payment_id);
9991         export function ChannelManager_retry_payment(this_arg: number, route: number, payment_id: number): number {
9992                 if(!isWasmInitialized) {
9993                         throw new Error("initializeWasm() must be awaited first!");
9994                 }
9995                 const nativeResponseValue = wasm.ChannelManager_retry_payment(this_arg, route, payment_id);
9996                 return nativeResponseValue;
9997         }
9998         // MUST_USE_RES struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ ChannelManager_send_spontaneous_payment(const struct LDKChannelManager *NONNULL_PTR this_arg, const struct LDKRoute *NONNULL_PTR route, struct LDKThirtyTwoBytes payment_preimage);
9999         export function ChannelManager_send_spontaneous_payment(this_arg: number, route: number, payment_preimage: Uint8Array): number {
10000                 if(!isWasmInitialized) {
10001                         throw new Error("initializeWasm() must be awaited first!");
10002                 }
10003                 const nativeResponseValue = wasm.ChannelManager_send_spontaneous_payment(this_arg, route, encodeArray(payment_preimage));
10004                 return nativeResponseValue;
10005         }
10006         // 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);
10007         export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_transaction: Uint8Array): number {
10008                 if(!isWasmInitialized) {
10009                         throw new Error("initializeWasm() must be awaited first!");
10010                 }
10011                 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), encodeArray(funding_transaction));
10012                 return nativeResponseValue;
10013         }
10014         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
10015         export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
10016                 if(!isWasmInitialized) {
10017                         throw new Error("initializeWasm() must be awaited first!");
10018                 }
10019                 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
10020                 // debug statements here
10021         }
10022         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
10023         export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
10024                 if(!isWasmInitialized) {
10025                         throw new Error("initializeWasm() must be awaited first!");
10026                 }
10027                 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
10028                 // debug statements here
10029         }
10030         // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
10031         export function ChannelManager_timer_tick_occurred(this_arg: number): void {
10032                 if(!isWasmInitialized) {
10033                         throw new Error("initializeWasm() must be awaited first!");
10034                 }
10035                 const nativeResponseValue = wasm.ChannelManager_timer_tick_occurred(this_arg);
10036                 // debug statements here
10037         }
10038         // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
10039         export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array): boolean {
10040                 if(!isWasmInitialized) {
10041                         throw new Error("initializeWasm() must be awaited first!");
10042                 }
10043                 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash));
10044                 return nativeResponseValue;
10045         }
10046         // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
10047         export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array): boolean {
10048                 if(!isWasmInitialized) {
10049                         throw new Error("initializeWasm() must be awaited first!");
10050                 }
10051                 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage));
10052                 return nativeResponseValue;
10053         }
10054         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
10055         export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
10056                 if(!isWasmInitialized) {
10057                         throw new Error("initializeWasm() must be awaited first!");
10058                 }
10059                 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
10060                 return decodeArray(nativeResponseValue);
10061         }
10062         // 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);
10063         export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
10064                 if(!isWasmInitialized) {
10065                         throw new Error("initializeWasm() must be awaited first!");
10066                 }
10067                 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
10068                 // debug statements here
10069         }
10070         // 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);
10071         export function ChannelManager_create_inbound_payment(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number, user_payment_id: number): number {
10072                 if(!isWasmInitialized) {
10073                         throw new Error("initializeWasm() must be awaited first!");
10074                 }
10075                 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment(this_arg, min_value_msat, invoice_expiry_delta_secs, user_payment_id);
10076                 return nativeResponseValue;
10077         }
10078         // 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);
10079         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 {
10080                 if(!isWasmInitialized) {
10081                         throw new Error("initializeWasm() must be awaited first!");
10082                 }
10083                 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment_for_hash(this_arg, encodeArray(payment_hash), min_value_msat, invoice_expiry_delta_secs, user_payment_id);
10084                 return nativeResponseValue;
10085         }
10086         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
10087         export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
10088                 if(!isWasmInitialized) {
10089                         throw new Error("initializeWasm() must be awaited first!");
10090                 }
10091                 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
10092                 return nativeResponseValue;
10093         }
10094         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
10095         export function ChannelManager_as_EventsProvider(this_arg: number): number {
10096                 if(!isWasmInitialized) {
10097                         throw new Error("initializeWasm() must be awaited first!");
10098                 }
10099                 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
10100                 return nativeResponseValue;
10101         }
10102         // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
10103         export function ChannelManager_as_Listen(this_arg: number): number {
10104                 if(!isWasmInitialized) {
10105                         throw new Error("initializeWasm() must be awaited first!");
10106                 }
10107                 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
10108                 return nativeResponseValue;
10109         }
10110         // struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
10111         export function ChannelManager_as_Confirm(this_arg: number): number {
10112                 if(!isWasmInitialized) {
10113                         throw new Error("initializeWasm() must be awaited first!");
10114                 }
10115                 const nativeResponseValue = wasm.ChannelManager_as_Confirm(this_arg);
10116                 return nativeResponseValue;
10117         }
10118         // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
10119         export function ChannelManager_await_persistable_update_timeout(this_arg: number, max_wait: number): boolean {
10120                 if(!isWasmInitialized) {
10121                         throw new Error("initializeWasm() must be awaited first!");
10122                 }
10123                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update_timeout(this_arg, max_wait);
10124                 return nativeResponseValue;
10125         }
10126         // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
10127         export function ChannelManager_await_persistable_update(this_arg: number): void {
10128                 if(!isWasmInitialized) {
10129                         throw new Error("initializeWasm() must be awaited first!");
10130                 }
10131                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
10132                 // debug statements here
10133         }
10134         // MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
10135         export function ChannelManager_current_best_block(this_arg: number): number {
10136                 if(!isWasmInitialized) {
10137                         throw new Error("initializeWasm() must be awaited first!");
10138                 }
10139                 const nativeResponseValue = wasm.ChannelManager_current_best_block(this_arg);
10140                 return nativeResponseValue;
10141         }
10142         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
10143         export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
10144                 if(!isWasmInitialized) {
10145                         throw new Error("initializeWasm() must be awaited first!");
10146                 }
10147                 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
10148                 return nativeResponseValue;
10149         }
10150         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
10151         export function ChannelManager_write(obj: number): Uint8Array {
10152                 if(!isWasmInitialized) {
10153                         throw new Error("initializeWasm() must be awaited first!");
10154                 }
10155                 const nativeResponseValue = wasm.ChannelManager_write(obj);
10156                 return decodeArray(nativeResponseValue);
10157         }
10158         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
10159         export function ChannelManagerReadArgs_free(this_obj: number): void {
10160                 if(!isWasmInitialized) {
10161                         throw new Error("initializeWasm() must be awaited first!");
10162                 }
10163                 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
10164                 // debug statements here
10165         }
10166         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
10167         export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
10168                 if(!isWasmInitialized) {
10169                         throw new Error("initializeWasm() must be awaited first!");
10170                 }
10171                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
10172                 return nativeResponseValue;
10173         }
10174         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
10175         export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
10176                 if(!isWasmInitialized) {
10177                         throw new Error("initializeWasm() must be awaited first!");
10178                 }
10179                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
10180                 // debug statements here
10181         }
10182         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
10183         export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
10184                 if(!isWasmInitialized) {
10185                         throw new Error("initializeWasm() must be awaited first!");
10186                 }
10187                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
10188                 return nativeResponseValue;
10189         }
10190         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
10191         export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
10192                 if(!isWasmInitialized) {
10193                         throw new Error("initializeWasm() must be awaited first!");
10194                 }
10195                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
10196                 // debug statements here
10197         }
10198         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
10199         export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
10200                 if(!isWasmInitialized) {
10201                         throw new Error("initializeWasm() must be awaited first!");
10202                 }
10203                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
10204                 return nativeResponseValue;
10205         }
10206         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
10207         export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
10208                 if(!isWasmInitialized) {
10209                         throw new Error("initializeWasm() must be awaited first!");
10210                 }
10211                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
10212                 // debug statements here
10213         }
10214         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
10215         export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
10216                 if(!isWasmInitialized) {
10217                         throw new Error("initializeWasm() must be awaited first!");
10218                 }
10219                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
10220                 return nativeResponseValue;
10221         }
10222         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
10223         export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
10224                 if(!isWasmInitialized) {
10225                         throw new Error("initializeWasm() must be awaited first!");
10226                 }
10227                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
10228                 // debug statements here
10229         }
10230         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
10231         export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
10232                 if(!isWasmInitialized) {
10233                         throw new Error("initializeWasm() must be awaited first!");
10234                 }
10235                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
10236                 return nativeResponseValue;
10237         }
10238         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
10239         export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
10240                 if(!isWasmInitialized) {
10241                         throw new Error("initializeWasm() must be awaited first!");
10242                 }
10243                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
10244                 // debug statements here
10245         }
10246         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
10247         export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
10248                 if(!isWasmInitialized) {
10249                         throw new Error("initializeWasm() must be awaited first!");
10250                 }
10251                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
10252                 return nativeResponseValue;
10253         }
10254         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
10255         export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
10256                 if(!isWasmInitialized) {
10257                         throw new Error("initializeWasm() must be awaited first!");
10258                 }
10259                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
10260                 // debug statements here
10261         }
10262         // 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);
10263         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 {
10264                 if(!isWasmInitialized) {
10265                         throw new Error("initializeWasm() must be awaited first!");
10266                 }
10267                 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
10268                 return nativeResponseValue;
10269         }
10270         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
10271         export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
10272                 if(!isWasmInitialized) {
10273                         throw new Error("initializeWasm() must be awaited first!");
10274                 }
10275                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
10276                 return nativeResponseValue;
10277         }
10278         // void DecodeError_free(struct LDKDecodeError this_obj);
10279         export function DecodeError_free(this_obj: number): void {
10280                 if(!isWasmInitialized) {
10281                         throw new Error("initializeWasm() must be awaited first!");
10282                 }
10283                 const nativeResponseValue = wasm.DecodeError_free(this_obj);
10284                 // debug statements here
10285         }
10286         // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
10287         export function DecodeError_clone(orig: number): number {
10288                 if(!isWasmInitialized) {
10289                         throw new Error("initializeWasm() must be awaited first!");
10290                 }
10291                 const nativeResponseValue = wasm.DecodeError_clone(orig);
10292                 return nativeResponseValue;
10293         }
10294         // void Init_free(struct LDKInit this_obj);
10295         export function Init_free(this_obj: number): void {
10296                 if(!isWasmInitialized) {
10297                         throw new Error("initializeWasm() must be awaited first!");
10298                 }
10299                 const nativeResponseValue = wasm.Init_free(this_obj);
10300                 // debug statements here
10301         }
10302         // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
10303         export function Init_get_features(this_ptr: number): number {
10304                 if(!isWasmInitialized) {
10305                         throw new Error("initializeWasm() must be awaited first!");
10306                 }
10307                 const nativeResponseValue = wasm.Init_get_features(this_ptr);
10308                 return nativeResponseValue;
10309         }
10310         // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
10311         export function Init_set_features(this_ptr: number, val: number): void {
10312                 if(!isWasmInitialized) {
10313                         throw new Error("initializeWasm() must be awaited first!");
10314                 }
10315                 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
10316                 // debug statements here
10317         }
10318         // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
10319         export function Init_new(features_arg: number): number {
10320                 if(!isWasmInitialized) {
10321                         throw new Error("initializeWasm() must be awaited first!");
10322                 }
10323                 const nativeResponseValue = wasm.Init_new(features_arg);
10324                 return nativeResponseValue;
10325         }
10326         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
10327         export function Init_clone(orig: number): number {
10328                 if(!isWasmInitialized) {
10329                         throw new Error("initializeWasm() must be awaited first!");
10330                 }
10331                 const nativeResponseValue = wasm.Init_clone(orig);
10332                 return nativeResponseValue;
10333         }
10334         // void ErrorMessage_free(struct LDKErrorMessage this_obj);
10335         export function ErrorMessage_free(this_obj: number): void {
10336                 if(!isWasmInitialized) {
10337                         throw new Error("initializeWasm() must be awaited first!");
10338                 }
10339                 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
10340                 // debug statements here
10341         }
10342         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
10343         export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
10344                 if(!isWasmInitialized) {
10345                         throw new Error("initializeWasm() must be awaited first!");
10346                 }
10347                 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
10348                 return decodeArray(nativeResponseValue);
10349         }
10350         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10351         export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
10352                 if(!isWasmInitialized) {
10353                         throw new Error("initializeWasm() must be awaited first!");
10354                 }
10355                 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
10356                 // debug statements here
10357         }
10358         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
10359         export function ErrorMessage_get_data(this_ptr: number): String {
10360                 if(!isWasmInitialized) {
10361                         throw new Error("initializeWasm() must be awaited first!");
10362                 }
10363                 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
10364                 return nativeResponseValue;
10365         }
10366         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
10367         export function ErrorMessage_set_data(this_ptr: number, val: String): void {
10368                 if(!isWasmInitialized) {
10369                         throw new Error("initializeWasm() must be awaited first!");
10370                 }
10371                 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, val);
10372                 // debug statements here
10373         }
10374         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
10375         export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: String): number {
10376                 if(!isWasmInitialized) {
10377                         throw new Error("initializeWasm() must be awaited first!");
10378                 }
10379                 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), data_arg);
10380                 return nativeResponseValue;
10381         }
10382         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
10383         export function ErrorMessage_clone(orig: number): number {
10384                 if(!isWasmInitialized) {
10385                         throw new Error("initializeWasm() must be awaited first!");
10386                 }
10387                 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
10388                 return nativeResponseValue;
10389         }
10390         // void Ping_free(struct LDKPing this_obj);
10391         export function Ping_free(this_obj: number): void {
10392                 if(!isWasmInitialized) {
10393                         throw new Error("initializeWasm() must be awaited first!");
10394                 }
10395                 const nativeResponseValue = wasm.Ping_free(this_obj);
10396                 // debug statements here
10397         }
10398         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
10399         export function Ping_get_ponglen(this_ptr: number): number {
10400                 if(!isWasmInitialized) {
10401                         throw new Error("initializeWasm() must be awaited first!");
10402                 }
10403                 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
10404                 return nativeResponseValue;
10405         }
10406         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
10407         export function Ping_set_ponglen(this_ptr: number, val: number): void {
10408                 if(!isWasmInitialized) {
10409                         throw new Error("initializeWasm() must be awaited first!");
10410                 }
10411                 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
10412                 // debug statements here
10413         }
10414         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
10415         export function Ping_get_byteslen(this_ptr: number): number {
10416                 if(!isWasmInitialized) {
10417                         throw new Error("initializeWasm() must be awaited first!");
10418                 }
10419                 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
10420                 return nativeResponseValue;
10421         }
10422         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
10423         export function Ping_set_byteslen(this_ptr: number, val: number): void {
10424                 if(!isWasmInitialized) {
10425                         throw new Error("initializeWasm() must be awaited first!");
10426                 }
10427                 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
10428                 // debug statements here
10429         }
10430         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
10431         export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
10432                 if(!isWasmInitialized) {
10433                         throw new Error("initializeWasm() must be awaited first!");
10434                 }
10435                 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
10436                 return nativeResponseValue;
10437         }
10438         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
10439         export function Ping_clone(orig: number): number {
10440                 if(!isWasmInitialized) {
10441                         throw new Error("initializeWasm() must be awaited first!");
10442                 }
10443                 const nativeResponseValue = wasm.Ping_clone(orig);
10444                 return nativeResponseValue;
10445         }
10446         // void Pong_free(struct LDKPong this_obj);
10447         export function Pong_free(this_obj: number): void {
10448                 if(!isWasmInitialized) {
10449                         throw new Error("initializeWasm() must be awaited first!");
10450                 }
10451                 const nativeResponseValue = wasm.Pong_free(this_obj);
10452                 // debug statements here
10453         }
10454         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
10455         export function Pong_get_byteslen(this_ptr: number): number {
10456                 if(!isWasmInitialized) {
10457                         throw new Error("initializeWasm() must be awaited first!");
10458                 }
10459                 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
10460                 return nativeResponseValue;
10461         }
10462         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
10463         export function Pong_set_byteslen(this_ptr: number, val: number): void {
10464                 if(!isWasmInitialized) {
10465                         throw new Error("initializeWasm() must be awaited first!");
10466                 }
10467                 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
10468                 // debug statements here
10469         }
10470         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
10471         export function Pong_new(byteslen_arg: number): number {
10472                 if(!isWasmInitialized) {
10473                         throw new Error("initializeWasm() must be awaited first!");
10474                 }
10475                 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
10476                 return nativeResponseValue;
10477         }
10478         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
10479         export function Pong_clone(orig: number): number {
10480                 if(!isWasmInitialized) {
10481                         throw new Error("initializeWasm() must be awaited first!");
10482                 }
10483                 const nativeResponseValue = wasm.Pong_clone(orig);
10484                 return nativeResponseValue;
10485         }
10486         // void OpenChannel_free(struct LDKOpenChannel this_obj);
10487         export function OpenChannel_free(this_obj: number): void {
10488                 if(!isWasmInitialized) {
10489                         throw new Error("initializeWasm() must be awaited first!");
10490                 }
10491                 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
10492                 // debug statements here
10493         }
10494         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
10495         export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
10496                 if(!isWasmInitialized) {
10497                         throw new Error("initializeWasm() must be awaited first!");
10498                 }
10499                 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
10500                 return decodeArray(nativeResponseValue);
10501         }
10502         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10503         export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10504                 if(!isWasmInitialized) {
10505                         throw new Error("initializeWasm() must be awaited first!");
10506                 }
10507                 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
10508                 // debug statements here
10509         }
10510         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
10511         export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
10512                 if(!isWasmInitialized) {
10513                         throw new Error("initializeWasm() must be awaited first!");
10514                 }
10515                 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
10516                 return decodeArray(nativeResponseValue);
10517         }
10518         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10519         export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
10520                 if(!isWasmInitialized) {
10521                         throw new Error("initializeWasm() must be awaited first!");
10522                 }
10523                 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
10524                 // debug statements here
10525         }
10526         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10527         export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
10528                 if(!isWasmInitialized) {
10529                         throw new Error("initializeWasm() must be awaited first!");
10530                 }
10531                 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
10532                 return nativeResponseValue;
10533         }
10534         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10535         export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
10536                 if(!isWasmInitialized) {
10537                         throw new Error("initializeWasm() must be awaited first!");
10538                 }
10539                 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
10540                 // debug statements here
10541         }
10542         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10543         export function OpenChannel_get_push_msat(this_ptr: number): number {
10544                 if(!isWasmInitialized) {
10545                         throw new Error("initializeWasm() must be awaited first!");
10546                 }
10547                 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
10548                 return nativeResponseValue;
10549         }
10550         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10551         export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
10552                 if(!isWasmInitialized) {
10553                         throw new Error("initializeWasm() must be awaited first!");
10554                 }
10555                 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
10556                 // debug statements here
10557         }
10558         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10559         export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
10560                 if(!isWasmInitialized) {
10561                         throw new Error("initializeWasm() must be awaited first!");
10562                 }
10563                 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
10564                 return nativeResponseValue;
10565         }
10566         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10567         export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
10568                 if(!isWasmInitialized) {
10569                         throw new Error("initializeWasm() must be awaited first!");
10570                 }
10571                 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
10572                 // debug statements here
10573         }
10574         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10575         export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
10576                 if(!isWasmInitialized) {
10577                         throw new Error("initializeWasm() must be awaited first!");
10578                 }
10579                 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
10580                 return nativeResponseValue;
10581         }
10582         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10583         export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
10584                 if(!isWasmInitialized) {
10585                         throw new Error("initializeWasm() must be awaited first!");
10586                 }
10587                 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
10588                 // debug statements here
10589         }
10590         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10591         export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
10592                 if(!isWasmInitialized) {
10593                         throw new Error("initializeWasm() must be awaited first!");
10594                 }
10595                 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
10596                 return nativeResponseValue;
10597         }
10598         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10599         export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
10600                 if(!isWasmInitialized) {
10601                         throw new Error("initializeWasm() must be awaited first!");
10602                 }
10603                 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
10604                 // debug statements here
10605         }
10606         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10607         export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
10608                 if(!isWasmInitialized) {
10609                         throw new Error("initializeWasm() must be awaited first!");
10610                 }
10611                 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
10612                 return nativeResponseValue;
10613         }
10614         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10615         export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
10616                 if(!isWasmInitialized) {
10617                         throw new Error("initializeWasm() must be awaited first!");
10618                 }
10619                 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
10620                 // debug statements here
10621         }
10622         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10623         export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
10624                 if(!isWasmInitialized) {
10625                         throw new Error("initializeWasm() must be awaited first!");
10626                 }
10627                 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
10628                 return nativeResponseValue;
10629         }
10630         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
10631         export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
10632                 if(!isWasmInitialized) {
10633                         throw new Error("initializeWasm() must be awaited first!");
10634                 }
10635                 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
10636                 // debug statements here
10637         }
10638         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10639         export function OpenChannel_get_to_self_delay(this_ptr: number): number {
10640                 if(!isWasmInitialized) {
10641                         throw new Error("initializeWasm() must be awaited first!");
10642                 }
10643                 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
10644                 return nativeResponseValue;
10645         }
10646         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
10647         export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
10648                 if(!isWasmInitialized) {
10649                         throw new Error("initializeWasm() must be awaited first!");
10650                 }
10651                 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
10652                 // debug statements here
10653         }
10654         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10655         export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
10656                 if(!isWasmInitialized) {
10657                         throw new Error("initializeWasm() must be awaited first!");
10658                 }
10659                 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
10660                 return nativeResponseValue;
10661         }
10662         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
10663         export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
10664                 if(!isWasmInitialized) {
10665                         throw new Error("initializeWasm() must be awaited first!");
10666                 }
10667                 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
10668                 // debug statements here
10669         }
10670         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10671         export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
10672                 if(!isWasmInitialized) {
10673                         throw new Error("initializeWasm() must be awaited first!");
10674                 }
10675                 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
10676                 return decodeArray(nativeResponseValue);
10677         }
10678         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10679         export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
10680                 if(!isWasmInitialized) {
10681                         throw new Error("initializeWasm() must be awaited first!");
10682                 }
10683                 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
10684                 // debug statements here
10685         }
10686         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10687         export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
10688                 if(!isWasmInitialized) {
10689                         throw new Error("initializeWasm() must be awaited first!");
10690                 }
10691                 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
10692                 return decodeArray(nativeResponseValue);
10693         }
10694         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10695         export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
10696                 if(!isWasmInitialized) {
10697                         throw new Error("initializeWasm() must be awaited first!");
10698                 }
10699                 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
10700                 // debug statements here
10701         }
10702         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10703         export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
10704                 if(!isWasmInitialized) {
10705                         throw new Error("initializeWasm() must be awaited first!");
10706                 }
10707                 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
10708                 return decodeArray(nativeResponseValue);
10709         }
10710         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10711         export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
10712                 if(!isWasmInitialized) {
10713                         throw new Error("initializeWasm() must be awaited first!");
10714                 }
10715                 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
10716                 // debug statements here
10717         }
10718         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10719         export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
10720                 if(!isWasmInitialized) {
10721                         throw new Error("initializeWasm() must be awaited first!");
10722                 }
10723                 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
10724                 return decodeArray(nativeResponseValue);
10725         }
10726         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10727         export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
10728                 if(!isWasmInitialized) {
10729                         throw new Error("initializeWasm() must be awaited first!");
10730                 }
10731                 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
10732                 // debug statements here
10733         }
10734         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10735         export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
10736                 if(!isWasmInitialized) {
10737                         throw new Error("initializeWasm() must be awaited first!");
10738                 }
10739                 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
10740                 return decodeArray(nativeResponseValue);
10741         }
10742         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10743         export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
10744                 if(!isWasmInitialized) {
10745                         throw new Error("initializeWasm() must be awaited first!");
10746                 }
10747                 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
10748                 // debug statements here
10749         }
10750         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10751         export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
10752                 if(!isWasmInitialized) {
10753                         throw new Error("initializeWasm() must be awaited first!");
10754                 }
10755                 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
10756                 return decodeArray(nativeResponseValue);
10757         }
10758         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10759         export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10760                 if(!isWasmInitialized) {
10761                         throw new Error("initializeWasm() must be awaited first!");
10762                 }
10763                 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
10764                 // debug statements here
10765         }
10766         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10767         export function OpenChannel_get_channel_flags(this_ptr: number): number {
10768                 if(!isWasmInitialized) {
10769                         throw new Error("initializeWasm() must be awaited first!");
10770                 }
10771                 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
10772                 return nativeResponseValue;
10773         }
10774         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
10775         export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
10776                 if(!isWasmInitialized) {
10777                         throw new Error("initializeWasm() must be awaited first!");
10778                 }
10779                 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
10780                 // debug statements here
10781         }
10782         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
10783         export function OpenChannel_clone(orig: number): number {
10784                 if(!isWasmInitialized) {
10785                         throw new Error("initializeWasm() must be awaited first!");
10786                 }
10787                 const nativeResponseValue = wasm.OpenChannel_clone(orig);
10788                 return nativeResponseValue;
10789         }
10790         // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
10791         export function AcceptChannel_free(this_obj: number): void {
10792                 if(!isWasmInitialized) {
10793                         throw new Error("initializeWasm() must be awaited first!");
10794                 }
10795                 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
10796                 // debug statements here
10797         }
10798         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
10799         export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
10800                 if(!isWasmInitialized) {
10801                         throw new Error("initializeWasm() must be awaited first!");
10802                 }
10803                 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
10804                 return decodeArray(nativeResponseValue);
10805         }
10806         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10807         export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
10808                 if(!isWasmInitialized) {
10809                         throw new Error("initializeWasm() must be awaited first!");
10810                 }
10811                 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
10812                 // debug statements here
10813         }
10814         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10815         export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
10816                 if(!isWasmInitialized) {
10817                         throw new Error("initializeWasm() must be awaited first!");
10818                 }
10819                 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
10820                 return nativeResponseValue;
10821         }
10822         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
10823         export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
10824                 if(!isWasmInitialized) {
10825                         throw new Error("initializeWasm() must be awaited first!");
10826                 }
10827                 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
10828                 // debug statements here
10829         }
10830         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10831         export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
10832                 if(!isWasmInitialized) {
10833                         throw new Error("initializeWasm() must be awaited first!");
10834                 }
10835                 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
10836                 return nativeResponseValue;
10837         }
10838         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
10839         export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
10840                 if(!isWasmInitialized) {
10841                         throw new Error("initializeWasm() must be awaited first!");
10842                 }
10843                 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
10844                 // debug statements here
10845         }
10846         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10847         export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
10848                 if(!isWasmInitialized) {
10849                         throw new Error("initializeWasm() must be awaited first!");
10850                 }
10851                 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
10852                 return nativeResponseValue;
10853         }
10854         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
10855         export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
10856                 if(!isWasmInitialized) {
10857                         throw new Error("initializeWasm() must be awaited first!");
10858                 }
10859                 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
10860                 // debug statements here
10861         }
10862         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10863         export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
10864                 if(!isWasmInitialized) {
10865                         throw new Error("initializeWasm() must be awaited first!");
10866                 }
10867                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
10868                 return nativeResponseValue;
10869         }
10870         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
10871         export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
10872                 if(!isWasmInitialized) {
10873                         throw new Error("initializeWasm() must be awaited first!");
10874                 }
10875                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
10876                 // debug statements here
10877         }
10878         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10879         export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
10880                 if(!isWasmInitialized) {
10881                         throw new Error("initializeWasm() must be awaited first!");
10882                 }
10883                 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
10884                 return nativeResponseValue;
10885         }
10886         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
10887         export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
10888                 if(!isWasmInitialized) {
10889                         throw new Error("initializeWasm() must be awaited first!");
10890                 }
10891                 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
10892                 // debug statements here
10893         }
10894         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10895         export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
10896                 if(!isWasmInitialized) {
10897                         throw new Error("initializeWasm() must be awaited first!");
10898                 }
10899                 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
10900                 return nativeResponseValue;
10901         }
10902         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
10903         export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
10904                 if(!isWasmInitialized) {
10905                         throw new Error("initializeWasm() must be awaited first!");
10906                 }
10907                 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
10908                 // debug statements here
10909         }
10910         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10911         export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
10912                 if(!isWasmInitialized) {
10913                         throw new Error("initializeWasm() must be awaited first!");
10914                 }
10915                 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
10916                 return nativeResponseValue;
10917         }
10918         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
10919         export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
10920                 if(!isWasmInitialized) {
10921                         throw new Error("initializeWasm() must be awaited first!");
10922                 }
10923                 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
10924                 // debug statements here
10925         }
10926         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10927         export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
10928                 if(!isWasmInitialized) {
10929                         throw new Error("initializeWasm() must be awaited first!");
10930                 }
10931                 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
10932                 return decodeArray(nativeResponseValue);
10933         }
10934         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10935         export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
10936                 if(!isWasmInitialized) {
10937                         throw new Error("initializeWasm() must be awaited first!");
10938                 }
10939                 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
10940                 // debug statements here
10941         }
10942         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10943         export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
10944                 if(!isWasmInitialized) {
10945                         throw new Error("initializeWasm() must be awaited first!");
10946                 }
10947                 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
10948                 return decodeArray(nativeResponseValue);
10949         }
10950         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10951         export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
10952                 if(!isWasmInitialized) {
10953                         throw new Error("initializeWasm() must be awaited first!");
10954                 }
10955                 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
10956                 // debug statements here
10957         }
10958         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10959         export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
10960                 if(!isWasmInitialized) {
10961                         throw new Error("initializeWasm() must be awaited first!");
10962                 }
10963                 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
10964                 return decodeArray(nativeResponseValue);
10965         }
10966         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10967         export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
10968                 if(!isWasmInitialized) {
10969                         throw new Error("initializeWasm() must be awaited first!");
10970                 }
10971                 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
10972                 // debug statements here
10973         }
10974         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10975         export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
10976                 if(!isWasmInitialized) {
10977                         throw new Error("initializeWasm() must be awaited first!");
10978                 }
10979                 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
10980                 return decodeArray(nativeResponseValue);
10981         }
10982         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10983         export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
10984                 if(!isWasmInitialized) {
10985                         throw new Error("initializeWasm() must be awaited first!");
10986                 }
10987                 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
10988                 // debug statements here
10989         }
10990         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10991         export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
10992                 if(!isWasmInitialized) {
10993                         throw new Error("initializeWasm() must be awaited first!");
10994                 }
10995                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
10996                 return decodeArray(nativeResponseValue);
10997         }
10998         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10999         export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
11000                 if(!isWasmInitialized) {
11001                         throw new Error("initializeWasm() must be awaited first!");
11002                 }
11003                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
11004                 // debug statements here
11005         }
11006         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
11007         export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
11008                 if(!isWasmInitialized) {
11009                         throw new Error("initializeWasm() must be awaited first!");
11010                 }
11011                 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
11012                 return decodeArray(nativeResponseValue);
11013         }
11014         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11015         export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11016                 if(!isWasmInitialized) {
11017                         throw new Error("initializeWasm() must be awaited first!");
11018                 }
11019                 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
11020                 // debug statements here
11021         }
11022         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
11023         export function AcceptChannel_clone(orig: number): number {
11024                 if(!isWasmInitialized) {
11025                         throw new Error("initializeWasm() must be awaited first!");
11026                 }
11027                 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
11028                 return nativeResponseValue;
11029         }
11030         // void FundingCreated_free(struct LDKFundingCreated this_obj);
11031         export function FundingCreated_free(this_obj: number): void {
11032                 if(!isWasmInitialized) {
11033                         throw new Error("initializeWasm() must be awaited first!");
11034                 }
11035                 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
11036                 // debug statements here
11037         }
11038         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
11039         export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
11040                 if(!isWasmInitialized) {
11041                         throw new Error("initializeWasm() must be awaited first!");
11042                 }
11043                 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
11044                 return decodeArray(nativeResponseValue);
11045         }
11046         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11047         export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
11048                 if(!isWasmInitialized) {
11049                         throw new Error("initializeWasm() must be awaited first!");
11050                 }
11051                 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
11052                 // debug statements here
11053         }
11054         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
11055         export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
11056                 if(!isWasmInitialized) {
11057                         throw new Error("initializeWasm() must be awaited first!");
11058                 }
11059                 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
11060                 return decodeArray(nativeResponseValue);
11061         }
11062         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11063         export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
11064                 if(!isWasmInitialized) {
11065                         throw new Error("initializeWasm() must be awaited first!");
11066                 }
11067                 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
11068                 // debug statements here
11069         }
11070         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
11071         export function FundingCreated_get_funding_output_index(this_ptr: number): number {
11072                 if(!isWasmInitialized) {
11073                         throw new Error("initializeWasm() must be awaited first!");
11074                 }
11075                 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
11076                 return nativeResponseValue;
11077         }
11078         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
11079         export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
11080                 if(!isWasmInitialized) {
11081                         throw new Error("initializeWasm() must be awaited first!");
11082                 }
11083                 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
11084                 // debug statements here
11085         }
11086         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
11087         export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
11088                 if(!isWasmInitialized) {
11089                         throw new Error("initializeWasm() must be awaited first!");
11090                 }
11091                 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
11092                 return decodeArray(nativeResponseValue);
11093         }
11094         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
11095         export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
11096                 if(!isWasmInitialized) {
11097                         throw new Error("initializeWasm() must be awaited first!");
11098                 }
11099                 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
11100                 // debug statements here
11101         }
11102         // 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);
11103         export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
11104                 if(!isWasmInitialized) {
11105                         throw new Error("initializeWasm() must be awaited first!");
11106                 }
11107                 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
11108                 return nativeResponseValue;
11109         }
11110         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
11111         export function FundingCreated_clone(orig: number): number {
11112                 if(!isWasmInitialized) {
11113                         throw new Error("initializeWasm() must be awaited first!");
11114                 }
11115                 const nativeResponseValue = wasm.FundingCreated_clone(orig);
11116                 return nativeResponseValue;
11117         }
11118         // void FundingSigned_free(struct LDKFundingSigned this_obj);
11119         export function FundingSigned_free(this_obj: number): void {
11120                 if(!isWasmInitialized) {
11121                         throw new Error("initializeWasm() must be awaited first!");
11122                 }
11123                 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
11124                 // debug statements here
11125         }
11126         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
11127         export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
11128                 if(!isWasmInitialized) {
11129                         throw new Error("initializeWasm() must be awaited first!");
11130                 }
11131                 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
11132                 return decodeArray(nativeResponseValue);
11133         }
11134         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11135         export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
11136                 if(!isWasmInitialized) {
11137                         throw new Error("initializeWasm() must be awaited first!");
11138                 }
11139                 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
11140                 // debug statements here
11141         }
11142         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
11143         export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
11144                 if(!isWasmInitialized) {
11145                         throw new Error("initializeWasm() must be awaited first!");
11146                 }
11147                 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
11148                 return decodeArray(nativeResponseValue);
11149         }
11150         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
11151         export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
11152                 if(!isWasmInitialized) {
11153                         throw new Error("initializeWasm() must be awaited first!");
11154                 }
11155                 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
11156                 // debug statements here
11157         }
11158         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
11159         export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
11160                 if(!isWasmInitialized) {
11161                         throw new Error("initializeWasm() must be awaited first!");
11162                 }
11163                 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
11164                 return nativeResponseValue;
11165         }
11166         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
11167         export function FundingSigned_clone(orig: number): number {
11168                 if(!isWasmInitialized) {
11169                         throw new Error("initializeWasm() must be awaited first!");
11170                 }
11171                 const nativeResponseValue = wasm.FundingSigned_clone(orig);
11172                 return nativeResponseValue;
11173         }
11174         // void FundingLocked_free(struct LDKFundingLocked this_obj);
11175         export function FundingLocked_free(this_obj: number): void {
11176                 if(!isWasmInitialized) {
11177                         throw new Error("initializeWasm() must be awaited first!");
11178                 }
11179                 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
11180                 // debug statements here
11181         }
11182         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
11183         export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
11184                 if(!isWasmInitialized) {
11185                         throw new Error("initializeWasm() must be awaited first!");
11186                 }
11187                 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
11188                 return decodeArray(nativeResponseValue);
11189         }
11190         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11191         export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
11192                 if(!isWasmInitialized) {
11193                         throw new Error("initializeWasm() must be awaited first!");
11194                 }
11195                 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
11196                 // debug statements here
11197         }
11198         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
11199         export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
11200                 if(!isWasmInitialized) {
11201                         throw new Error("initializeWasm() must be awaited first!");
11202                 }
11203                 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
11204                 return decodeArray(nativeResponseValue);
11205         }
11206         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11207         export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11208                 if(!isWasmInitialized) {
11209                         throw new Error("initializeWasm() must be awaited first!");
11210                 }
11211                 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
11212                 // debug statements here
11213         }
11214         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
11215         export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
11216                 if(!isWasmInitialized) {
11217                         throw new Error("initializeWasm() must be awaited first!");
11218                 }
11219                 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
11220                 return nativeResponseValue;
11221         }
11222         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
11223         export function FundingLocked_clone(orig: number): number {
11224                 if(!isWasmInitialized) {
11225                         throw new Error("initializeWasm() must be awaited first!");
11226                 }
11227                 const nativeResponseValue = wasm.FundingLocked_clone(orig);
11228                 return nativeResponseValue;
11229         }
11230         // void Shutdown_free(struct LDKShutdown this_obj);
11231         export function Shutdown_free(this_obj: number): void {
11232                 if(!isWasmInitialized) {
11233                         throw new Error("initializeWasm() must be awaited first!");
11234                 }
11235                 const nativeResponseValue = wasm.Shutdown_free(this_obj);
11236                 // debug statements here
11237         }
11238         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
11239         export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
11240                 if(!isWasmInitialized) {
11241                         throw new Error("initializeWasm() must be awaited first!");
11242                 }
11243                 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
11244                 return decodeArray(nativeResponseValue);
11245         }
11246         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11247         export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
11248                 if(!isWasmInitialized) {
11249                         throw new Error("initializeWasm() must be awaited first!");
11250                 }
11251                 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
11252                 // debug statements here
11253         }
11254         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
11255         export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
11256                 if(!isWasmInitialized) {
11257                         throw new Error("initializeWasm() must be awaited first!");
11258                 }
11259                 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
11260                 return decodeArray(nativeResponseValue);
11261         }
11262         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
11263         export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
11264                 if(!isWasmInitialized) {
11265                         throw new Error("initializeWasm() must be awaited first!");
11266                 }
11267                 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
11268                 // debug statements here
11269         }
11270         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
11271         export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
11272                 if(!isWasmInitialized) {
11273                         throw new Error("initializeWasm() must be awaited first!");
11274                 }
11275                 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
11276                 return nativeResponseValue;
11277         }
11278         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
11279         export function Shutdown_clone(orig: number): number {
11280                 if(!isWasmInitialized) {
11281                         throw new Error("initializeWasm() must be awaited first!");
11282                 }
11283                 const nativeResponseValue = wasm.Shutdown_clone(orig);
11284                 return nativeResponseValue;
11285         }
11286         // void ClosingSignedFeeRange_free(struct LDKClosingSignedFeeRange this_obj);
11287         export function ClosingSignedFeeRange_free(this_obj: number): void {
11288                 if(!isWasmInitialized) {
11289                         throw new Error("initializeWasm() must be awaited first!");
11290                 }
11291                 const nativeResponseValue = wasm.ClosingSignedFeeRange_free(this_obj);
11292                 // debug statements here
11293         }
11294         // uint64_t ClosingSignedFeeRange_get_min_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
11295         export function ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr: number): number {
11296                 if(!isWasmInitialized) {
11297                         throw new Error("initializeWasm() must be awaited first!");
11298                 }
11299                 const nativeResponseValue = wasm.ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr);
11300                 return nativeResponseValue;
11301         }
11302         // void ClosingSignedFeeRange_set_min_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
11303         export function ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr: number, val: number): void {
11304                 if(!isWasmInitialized) {
11305                         throw new Error("initializeWasm() must be awaited first!");
11306                 }
11307                 const nativeResponseValue = wasm.ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr, val);
11308                 // debug statements here
11309         }
11310         // uint64_t ClosingSignedFeeRange_get_max_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
11311         export function ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr: number): number {
11312                 if(!isWasmInitialized) {
11313                         throw new Error("initializeWasm() must be awaited first!");
11314                 }
11315                 const nativeResponseValue = wasm.ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr);
11316                 return nativeResponseValue;
11317         }
11318         // void ClosingSignedFeeRange_set_max_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
11319         export function ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr: number, val: number): void {
11320                 if(!isWasmInitialized) {
11321                         throw new Error("initializeWasm() must be awaited first!");
11322                 }
11323                 const nativeResponseValue = wasm.ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr, val);
11324                 // debug statements here
11325         }
11326         // MUST_USE_RES struct LDKClosingSignedFeeRange ClosingSignedFeeRange_new(uint64_t min_fee_satoshis_arg, uint64_t max_fee_satoshis_arg);
11327         export function ClosingSignedFeeRange_new(min_fee_satoshis_arg: number, max_fee_satoshis_arg: number): number {
11328                 if(!isWasmInitialized) {
11329                         throw new Error("initializeWasm() must be awaited first!");
11330                 }
11331                 const nativeResponseValue = wasm.ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg);
11332                 return nativeResponseValue;
11333         }
11334         // struct LDKClosingSignedFeeRange ClosingSignedFeeRange_clone(const struct LDKClosingSignedFeeRange *NONNULL_PTR orig);
11335         export function ClosingSignedFeeRange_clone(orig: number): number {
11336                 if(!isWasmInitialized) {
11337                         throw new Error("initializeWasm() must be awaited first!");
11338                 }
11339                 const nativeResponseValue = wasm.ClosingSignedFeeRange_clone(orig);
11340                 return nativeResponseValue;
11341         }
11342         // void ClosingSigned_free(struct LDKClosingSigned this_obj);
11343         export function ClosingSigned_free(this_obj: number): void {
11344                 if(!isWasmInitialized) {
11345                         throw new Error("initializeWasm() must be awaited first!");
11346                 }
11347                 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
11348                 // debug statements here
11349         }
11350         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
11351         export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
11352                 if(!isWasmInitialized) {
11353                         throw new Error("initializeWasm() must be awaited first!");
11354                 }
11355                 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
11356                 return decodeArray(nativeResponseValue);
11357         }
11358         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11359         export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
11360                 if(!isWasmInitialized) {
11361                         throw new Error("initializeWasm() must be awaited first!");
11362                 }
11363                 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
11364                 // debug statements here
11365         }
11366         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
11367         export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
11368                 if(!isWasmInitialized) {
11369                         throw new Error("initializeWasm() must be awaited first!");
11370                 }
11371                 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
11372                 return nativeResponseValue;
11373         }
11374         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
11375         export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
11376                 if(!isWasmInitialized) {
11377                         throw new Error("initializeWasm() must be awaited first!");
11378                 }
11379                 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
11380                 // debug statements here
11381         }
11382         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
11383         export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
11384                 if(!isWasmInitialized) {
11385                         throw new Error("initializeWasm() must be awaited first!");
11386                 }
11387                 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
11388                 return decodeArray(nativeResponseValue);
11389         }
11390         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
11391         export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
11392                 if(!isWasmInitialized) {
11393                         throw new Error("initializeWasm() must be awaited first!");
11394                 }
11395                 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
11396                 // debug statements here
11397         }
11398         // struct LDKClosingSignedFeeRange ClosingSigned_get_fee_range(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
11399         export function ClosingSigned_get_fee_range(this_ptr: number): number {
11400                 if(!isWasmInitialized) {
11401                         throw new Error("initializeWasm() must be awaited first!");
11402                 }
11403                 const nativeResponseValue = wasm.ClosingSigned_get_fee_range(this_ptr);
11404                 return nativeResponseValue;
11405         }
11406         // void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val);
11407         export function ClosingSigned_set_fee_range(this_ptr: number, val: number): void {
11408                 if(!isWasmInitialized) {
11409                         throw new Error("initializeWasm() must be awaited first!");
11410                 }
11411                 const nativeResponseValue = wasm.ClosingSigned_set_fee_range(this_ptr, val);
11412                 // debug statements here
11413         }
11414         // 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);
11415         export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array, fee_range_arg: number): number {
11416                 if(!isWasmInitialized) {
11417                         throw new Error("initializeWasm() must be awaited first!");
11418                 }
11419                 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg), fee_range_arg);
11420                 return nativeResponseValue;
11421         }
11422         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
11423         export function ClosingSigned_clone(orig: number): number {
11424                 if(!isWasmInitialized) {
11425                         throw new Error("initializeWasm() must be awaited first!");
11426                 }
11427                 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
11428                 return nativeResponseValue;
11429         }
11430         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
11431         export function UpdateAddHTLC_free(this_obj: number): void {
11432                 if(!isWasmInitialized) {
11433                         throw new Error("initializeWasm() must be awaited first!");
11434                 }
11435                 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
11436                 // debug statements here
11437         }
11438         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
11439         export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
11440                 if(!isWasmInitialized) {
11441                         throw new Error("initializeWasm() must be awaited first!");
11442                 }
11443                 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
11444                 return decodeArray(nativeResponseValue);
11445         }
11446         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11447         export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
11448                 if(!isWasmInitialized) {
11449                         throw new Error("initializeWasm() must be awaited first!");
11450                 }
11451                 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
11452                 // debug statements here
11453         }
11454         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
11455         export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
11456                 if(!isWasmInitialized) {
11457                         throw new Error("initializeWasm() must be awaited first!");
11458                 }
11459                 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
11460                 return nativeResponseValue;
11461         }
11462         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
11463         export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
11464                 if(!isWasmInitialized) {
11465                         throw new Error("initializeWasm() must be awaited first!");
11466                 }
11467                 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
11468                 // debug statements here
11469         }
11470         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
11471         export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
11472                 if(!isWasmInitialized) {
11473                         throw new Error("initializeWasm() must be awaited first!");
11474                 }
11475                 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
11476                 return nativeResponseValue;
11477         }
11478         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
11479         export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
11480                 if(!isWasmInitialized) {
11481                         throw new Error("initializeWasm() must be awaited first!");
11482                 }
11483                 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
11484                 // debug statements here
11485         }
11486         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
11487         export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
11488                 if(!isWasmInitialized) {
11489                         throw new Error("initializeWasm() must be awaited first!");
11490                 }
11491                 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
11492                 return decodeArray(nativeResponseValue);
11493         }
11494         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11495         export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
11496                 if(!isWasmInitialized) {
11497                         throw new Error("initializeWasm() must be awaited first!");
11498                 }
11499                 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
11500                 // debug statements here
11501         }
11502         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
11503         export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
11504                 if(!isWasmInitialized) {
11505                         throw new Error("initializeWasm() must be awaited first!");
11506                 }
11507                 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
11508                 return nativeResponseValue;
11509         }
11510         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
11511         export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
11512                 if(!isWasmInitialized) {
11513                         throw new Error("initializeWasm() must be awaited first!");
11514                 }
11515                 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
11516                 // debug statements here
11517         }
11518         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
11519         export function UpdateAddHTLC_clone(orig: number): number {
11520                 if(!isWasmInitialized) {
11521                         throw new Error("initializeWasm() must be awaited first!");
11522                 }
11523                 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
11524                 return nativeResponseValue;
11525         }
11526         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
11527         export function UpdateFulfillHTLC_free(this_obj: number): void {
11528                 if(!isWasmInitialized) {
11529                         throw new Error("initializeWasm() must be awaited first!");
11530                 }
11531                 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
11532                 // debug statements here
11533         }
11534         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
11535         export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
11536                 if(!isWasmInitialized) {
11537                         throw new Error("initializeWasm() must be awaited first!");
11538                 }
11539                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
11540                 return decodeArray(nativeResponseValue);
11541         }
11542         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11543         export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
11544                 if(!isWasmInitialized) {
11545                         throw new Error("initializeWasm() must be awaited first!");
11546                 }
11547                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
11548                 // debug statements here
11549         }
11550         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
11551         export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
11552                 if(!isWasmInitialized) {
11553                         throw new Error("initializeWasm() must be awaited first!");
11554                 }
11555                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
11556                 return nativeResponseValue;
11557         }
11558         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
11559         export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
11560                 if(!isWasmInitialized) {
11561                         throw new Error("initializeWasm() must be awaited first!");
11562                 }
11563                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
11564                 // debug statements here
11565         }
11566         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
11567         export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
11568                 if(!isWasmInitialized) {
11569                         throw new Error("initializeWasm() must be awaited first!");
11570                 }
11571                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
11572                 return decodeArray(nativeResponseValue);
11573         }
11574         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11575         export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
11576                 if(!isWasmInitialized) {
11577                         throw new Error("initializeWasm() must be awaited first!");
11578                 }
11579                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
11580                 // debug statements here
11581         }
11582         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
11583         export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
11584                 if(!isWasmInitialized) {
11585                         throw new Error("initializeWasm() must be awaited first!");
11586                 }
11587                 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
11588                 return nativeResponseValue;
11589         }
11590         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
11591         export function UpdateFulfillHTLC_clone(orig: number): number {
11592                 if(!isWasmInitialized) {
11593                         throw new Error("initializeWasm() must be awaited first!");
11594                 }
11595                 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
11596                 return nativeResponseValue;
11597         }
11598         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
11599         export function UpdateFailHTLC_free(this_obj: number): void {
11600                 if(!isWasmInitialized) {
11601                         throw new Error("initializeWasm() must be awaited first!");
11602                 }
11603                 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
11604                 // debug statements here
11605         }
11606         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
11607         export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
11608                 if(!isWasmInitialized) {
11609                         throw new Error("initializeWasm() must be awaited first!");
11610                 }
11611                 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
11612                 return decodeArray(nativeResponseValue);
11613         }
11614         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11615         export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
11616                 if(!isWasmInitialized) {
11617                         throw new Error("initializeWasm() must be awaited first!");
11618                 }
11619                 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
11620                 // debug statements here
11621         }
11622         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
11623         export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
11624                 if(!isWasmInitialized) {
11625                         throw new Error("initializeWasm() must be awaited first!");
11626                 }
11627                 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
11628                 return nativeResponseValue;
11629         }
11630         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
11631         export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
11632                 if(!isWasmInitialized) {
11633                         throw new Error("initializeWasm() must be awaited first!");
11634                 }
11635                 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
11636                 // debug statements here
11637         }
11638         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
11639         export function UpdateFailHTLC_clone(orig: number): number {
11640                 if(!isWasmInitialized) {
11641                         throw new Error("initializeWasm() must be awaited first!");
11642                 }
11643                 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
11644                 return nativeResponseValue;
11645         }
11646         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
11647         export function UpdateFailMalformedHTLC_free(this_obj: number): void {
11648                 if(!isWasmInitialized) {
11649                         throw new Error("initializeWasm() must be awaited first!");
11650                 }
11651                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
11652                 // debug statements here
11653         }
11654         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
11655         export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
11656                 if(!isWasmInitialized) {
11657                         throw new Error("initializeWasm() must be awaited first!");
11658                 }
11659                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
11660                 return decodeArray(nativeResponseValue);
11661         }
11662         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11663         export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
11664                 if(!isWasmInitialized) {
11665                         throw new Error("initializeWasm() must be awaited first!");
11666                 }
11667                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
11668                 // debug statements here
11669         }
11670         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
11671         export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
11672                 if(!isWasmInitialized) {
11673                         throw new Error("initializeWasm() must be awaited first!");
11674                 }
11675                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
11676                 return nativeResponseValue;
11677         }
11678         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
11679         export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
11680                 if(!isWasmInitialized) {
11681                         throw new Error("initializeWasm() must be awaited first!");
11682                 }
11683                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
11684                 // debug statements here
11685         }
11686         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
11687         export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
11688                 if(!isWasmInitialized) {
11689                         throw new Error("initializeWasm() must be awaited first!");
11690                 }
11691                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
11692                 return nativeResponseValue;
11693         }
11694         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
11695         export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
11696                 if(!isWasmInitialized) {
11697                         throw new Error("initializeWasm() must be awaited first!");
11698                 }
11699                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
11700                 // debug statements here
11701         }
11702         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
11703         export function UpdateFailMalformedHTLC_clone(orig: number): number {
11704                 if(!isWasmInitialized) {
11705                         throw new Error("initializeWasm() must be awaited first!");
11706                 }
11707                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
11708                 return nativeResponseValue;
11709         }
11710         // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
11711         export function CommitmentSigned_free(this_obj: number): void {
11712                 if(!isWasmInitialized) {
11713                         throw new Error("initializeWasm() must be awaited first!");
11714                 }
11715                 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
11716                 // debug statements here
11717         }
11718         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
11719         export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
11720                 if(!isWasmInitialized) {
11721                         throw new Error("initializeWasm() must be awaited first!");
11722                 }
11723                 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
11724                 return decodeArray(nativeResponseValue);
11725         }
11726         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11727         export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
11728                 if(!isWasmInitialized) {
11729                         throw new Error("initializeWasm() must be awaited first!");
11730                 }
11731                 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
11732                 // debug statements here
11733         }
11734         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
11735         export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
11736                 if(!isWasmInitialized) {
11737                         throw new Error("initializeWasm() must be awaited first!");
11738                 }
11739                 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
11740                 return decodeArray(nativeResponseValue);
11741         }
11742         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
11743         export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
11744                 if(!isWasmInitialized) {
11745                         throw new Error("initializeWasm() must be awaited first!");
11746                 }
11747                 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
11748                 // debug statements here
11749         }
11750         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
11751         export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
11752                 if(!isWasmInitialized) {
11753                         throw new Error("initializeWasm() must be awaited first!");
11754                 }
11755                 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
11756                 // debug statements here
11757         }
11758         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
11759         export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
11760                 if(!isWasmInitialized) {
11761                         throw new Error("initializeWasm() must be awaited first!");
11762                 }
11763                 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
11764                 return nativeResponseValue;
11765         }
11766         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
11767         export function CommitmentSigned_clone(orig: number): number {
11768                 if(!isWasmInitialized) {
11769                         throw new Error("initializeWasm() must be awaited first!");
11770                 }
11771                 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
11772                 return nativeResponseValue;
11773         }
11774         // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
11775         export function RevokeAndACK_free(this_obj: number): void {
11776                 if(!isWasmInitialized) {
11777                         throw new Error("initializeWasm() must be awaited first!");
11778                 }
11779                 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
11780                 // debug statements here
11781         }
11782         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
11783         export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
11784                 if(!isWasmInitialized) {
11785                         throw new Error("initializeWasm() must be awaited first!");
11786                 }
11787                 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
11788                 return decodeArray(nativeResponseValue);
11789         }
11790         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11791         export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
11792                 if(!isWasmInitialized) {
11793                         throw new Error("initializeWasm() must be awaited first!");
11794                 }
11795                 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
11796                 // debug statements here
11797         }
11798         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
11799         export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
11800                 if(!isWasmInitialized) {
11801                         throw new Error("initializeWasm() must be awaited first!");
11802                 }
11803                 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
11804                 return decodeArray(nativeResponseValue);
11805         }
11806         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11807         export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
11808                 if(!isWasmInitialized) {
11809                         throw new Error("initializeWasm() must be awaited first!");
11810                 }
11811                 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
11812                 // debug statements here
11813         }
11814         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
11815         export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
11816                 if(!isWasmInitialized) {
11817                         throw new Error("initializeWasm() must be awaited first!");
11818                 }
11819                 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
11820                 return decodeArray(nativeResponseValue);
11821         }
11822         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11823         export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11824                 if(!isWasmInitialized) {
11825                         throw new Error("initializeWasm() must be awaited first!");
11826                 }
11827                 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
11828                 // debug statements here
11829         }
11830         // 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);
11831         export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
11832                 if(!isWasmInitialized) {
11833                         throw new Error("initializeWasm() must be awaited first!");
11834                 }
11835                 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
11836                 return nativeResponseValue;
11837         }
11838         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
11839         export function RevokeAndACK_clone(orig: number): number {
11840                 if(!isWasmInitialized) {
11841                         throw new Error("initializeWasm() must be awaited first!");
11842                 }
11843                 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
11844                 return nativeResponseValue;
11845         }
11846         // void UpdateFee_free(struct LDKUpdateFee this_obj);
11847         export function UpdateFee_free(this_obj: number): void {
11848                 if(!isWasmInitialized) {
11849                         throw new Error("initializeWasm() must be awaited first!");
11850                 }
11851                 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
11852                 // debug statements here
11853         }
11854         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
11855         export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
11856                 if(!isWasmInitialized) {
11857                         throw new Error("initializeWasm() must be awaited first!");
11858                 }
11859                 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
11860                 return decodeArray(nativeResponseValue);
11861         }
11862         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11863         export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
11864                 if(!isWasmInitialized) {
11865                         throw new Error("initializeWasm() must be awaited first!");
11866                 }
11867                 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
11868                 // debug statements here
11869         }
11870         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
11871         export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
11872                 if(!isWasmInitialized) {
11873                         throw new Error("initializeWasm() must be awaited first!");
11874                 }
11875                 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
11876                 return nativeResponseValue;
11877         }
11878         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
11879         export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
11880                 if(!isWasmInitialized) {
11881                         throw new Error("initializeWasm() must be awaited first!");
11882                 }
11883                 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
11884                 // debug statements here
11885         }
11886         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
11887         export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
11888                 if(!isWasmInitialized) {
11889                         throw new Error("initializeWasm() must be awaited first!");
11890                 }
11891                 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
11892                 return nativeResponseValue;
11893         }
11894         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
11895         export function UpdateFee_clone(orig: number): number {
11896                 if(!isWasmInitialized) {
11897                         throw new Error("initializeWasm() must be awaited first!");
11898                 }
11899                 const nativeResponseValue = wasm.UpdateFee_clone(orig);
11900                 return nativeResponseValue;
11901         }
11902         // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
11903         export function DataLossProtect_free(this_obj: number): void {
11904                 if(!isWasmInitialized) {
11905                         throw new Error("initializeWasm() must be awaited first!");
11906                 }
11907                 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
11908                 // debug statements here
11909         }
11910         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
11911         export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
11912                 if(!isWasmInitialized) {
11913                         throw new Error("initializeWasm() must be awaited first!");
11914                 }
11915                 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
11916                 return decodeArray(nativeResponseValue);
11917         }
11918         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11919         export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
11920                 if(!isWasmInitialized) {
11921                         throw new Error("initializeWasm() must be awaited first!");
11922                 }
11923                 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
11924                 // debug statements here
11925         }
11926         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
11927         export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
11928                 if(!isWasmInitialized) {
11929                         throw new Error("initializeWasm() must be awaited first!");
11930                 }
11931                 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
11932                 return decodeArray(nativeResponseValue);
11933         }
11934         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11935         export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11936                 if(!isWasmInitialized) {
11937                         throw new Error("initializeWasm() must be awaited first!");
11938                 }
11939                 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
11940                 // debug statements here
11941         }
11942         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
11943         export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
11944                 if(!isWasmInitialized) {
11945                         throw new Error("initializeWasm() must be awaited first!");
11946                 }
11947                 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
11948                 return nativeResponseValue;
11949         }
11950         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
11951         export function DataLossProtect_clone(orig: number): number {
11952                 if(!isWasmInitialized) {
11953                         throw new Error("initializeWasm() must be awaited first!");
11954                 }
11955                 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
11956                 return nativeResponseValue;
11957         }
11958         // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
11959         export function ChannelReestablish_free(this_obj: number): void {
11960                 if(!isWasmInitialized) {
11961                         throw new Error("initializeWasm() must be awaited first!");
11962                 }
11963                 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
11964                 // debug statements here
11965         }
11966         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
11967         export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
11968                 if(!isWasmInitialized) {
11969                         throw new Error("initializeWasm() must be awaited first!");
11970                 }
11971                 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
11972                 return decodeArray(nativeResponseValue);
11973         }
11974         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11975         export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
11976                 if(!isWasmInitialized) {
11977                         throw new Error("initializeWasm() must be awaited first!");
11978                 }
11979                 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
11980                 // debug statements here
11981         }
11982         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
11983         export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
11984                 if(!isWasmInitialized) {
11985                         throw new Error("initializeWasm() must be awaited first!");
11986                 }
11987                 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
11988                 return nativeResponseValue;
11989         }
11990         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
11991         export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
11992                 if(!isWasmInitialized) {
11993                         throw new Error("initializeWasm() must be awaited first!");
11994                 }
11995                 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
11996                 // debug statements here
11997         }
11998         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
11999         export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
12000                 if(!isWasmInitialized) {
12001                         throw new Error("initializeWasm() must be awaited first!");
12002                 }
12003                 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
12004                 return nativeResponseValue;
12005         }
12006         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
12007         export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
12008                 if(!isWasmInitialized) {
12009                         throw new Error("initializeWasm() must be awaited first!");
12010                 }
12011                 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
12012                 // debug statements here
12013         }
12014         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
12015         export function ChannelReestablish_clone(orig: number): number {
12016                 if(!isWasmInitialized) {
12017                         throw new Error("initializeWasm() must be awaited first!");
12018                 }
12019                 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
12020                 return nativeResponseValue;
12021         }
12022         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
12023         export function AnnouncementSignatures_free(this_obj: number): void {
12024                 if(!isWasmInitialized) {
12025                         throw new Error("initializeWasm() must be awaited first!");
12026                 }
12027                 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
12028                 // debug statements here
12029         }
12030         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
12031         export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
12032                 if(!isWasmInitialized) {
12033                         throw new Error("initializeWasm() must be awaited first!");
12034                 }
12035                 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
12036                 return decodeArray(nativeResponseValue);
12037         }
12038         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12039         export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
12040                 if(!isWasmInitialized) {
12041                         throw new Error("initializeWasm() must be awaited first!");
12042                 }
12043                 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
12044                 // debug statements here
12045         }
12046         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
12047         export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
12048                 if(!isWasmInitialized) {
12049                         throw new Error("initializeWasm() must be awaited first!");
12050                 }
12051                 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
12052                 return nativeResponseValue;
12053         }
12054         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
12055         export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
12056                 if(!isWasmInitialized) {
12057                         throw new Error("initializeWasm() must be awaited first!");
12058                 }
12059                 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
12060                 // debug statements here
12061         }
12062         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
12063         export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
12064                 if(!isWasmInitialized) {
12065                         throw new Error("initializeWasm() must be awaited first!");
12066                 }
12067                 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
12068                 return decodeArray(nativeResponseValue);
12069         }
12070         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
12071         export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
12072                 if(!isWasmInitialized) {
12073                         throw new Error("initializeWasm() must be awaited first!");
12074                 }
12075                 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
12076                 // debug statements here
12077         }
12078         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
12079         export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
12080                 if(!isWasmInitialized) {
12081                         throw new Error("initializeWasm() must be awaited first!");
12082                 }
12083                 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
12084                 return decodeArray(nativeResponseValue);
12085         }
12086         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
12087         export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
12088                 if(!isWasmInitialized) {
12089                         throw new Error("initializeWasm() must be awaited first!");
12090                 }
12091                 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
12092                 // debug statements here
12093         }
12094         // 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);
12095         export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
12096                 if(!isWasmInitialized) {
12097                         throw new Error("initializeWasm() must be awaited first!");
12098                 }
12099                 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
12100                 return nativeResponseValue;
12101         }
12102         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
12103         export function AnnouncementSignatures_clone(orig: number): number {
12104                 if(!isWasmInitialized) {
12105                         throw new Error("initializeWasm() must be awaited first!");
12106                 }
12107                 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
12108                 return nativeResponseValue;
12109         }
12110         // void NetAddress_free(struct LDKNetAddress this_ptr);
12111         export function NetAddress_free(this_ptr: number): void {
12112                 if(!isWasmInitialized) {
12113                         throw new Error("initializeWasm() must be awaited first!");
12114                 }
12115                 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
12116                 // debug statements here
12117         }
12118         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
12119         export function NetAddress_clone(orig: number): number {
12120                 if(!isWasmInitialized) {
12121                         throw new Error("initializeWasm() must be awaited first!");
12122                 }
12123                 const nativeResponseValue = wasm.NetAddress_clone(orig);
12124                 return nativeResponseValue;
12125         }
12126         // struct LDKNetAddress NetAddress_ipv4(struct LDKFourBytes addr, uint16_t port);
12127         export function NetAddress_ipv4(addr: Uint8Array, port: number): number {
12128                 if(!isWasmInitialized) {
12129                         throw new Error("initializeWasm() must be awaited first!");
12130                 }
12131                 const nativeResponseValue = wasm.NetAddress_ipv4(encodeArray(addr), port);
12132                 return nativeResponseValue;
12133         }
12134         // struct LDKNetAddress NetAddress_ipv6(struct LDKSixteenBytes addr, uint16_t port);
12135         export function NetAddress_ipv6(addr: Uint8Array, port: number): number {
12136                 if(!isWasmInitialized) {
12137                         throw new Error("initializeWasm() must be awaited first!");
12138                 }
12139                 const nativeResponseValue = wasm.NetAddress_ipv6(encodeArray(addr), port);
12140                 return nativeResponseValue;
12141         }
12142         // struct LDKNetAddress NetAddress_onion_v2(struct LDKTenBytes addr, uint16_t port);
12143         export function NetAddress_onion_v2(addr: Uint8Array, port: number): number {
12144                 if(!isWasmInitialized) {
12145                         throw new Error("initializeWasm() must be awaited first!");
12146                 }
12147                 const nativeResponseValue = wasm.NetAddress_onion_v2(encodeArray(addr), port);
12148                 return nativeResponseValue;
12149         }
12150         // struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
12151         export function NetAddress_onion_v3(ed25519_pubkey: Uint8Array, checksum: number, version: number, port: number): number {
12152                 if(!isWasmInitialized) {
12153                         throw new Error("initializeWasm() must be awaited first!");
12154                 }
12155                 const nativeResponseValue = wasm.NetAddress_onion_v3(encodeArray(ed25519_pubkey), checksum, version, port);
12156                 return nativeResponseValue;
12157         }
12158         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
12159         export function NetAddress_write(obj: number): Uint8Array {
12160                 if(!isWasmInitialized) {
12161                         throw new Error("initializeWasm() must be awaited first!");
12162                 }
12163                 const nativeResponseValue = wasm.NetAddress_write(obj);
12164                 return decodeArray(nativeResponseValue);
12165         }
12166         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
12167         export function Result_read(ser: Uint8Array): number {
12168                 if(!isWasmInitialized) {
12169                         throw new Error("initializeWasm() must be awaited first!");
12170                 }
12171                 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
12172                 return nativeResponseValue;
12173         }
12174         // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
12175         export function NetAddress_read(ser: Uint8Array): number {
12176                 if(!isWasmInitialized) {
12177                         throw new Error("initializeWasm() must be awaited first!");
12178                 }
12179                 const nativeResponseValue = wasm.NetAddress_read(encodeArray(ser));
12180                 return nativeResponseValue;
12181         }
12182         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
12183         export function UnsignedNodeAnnouncement_free(this_obj: number): void {
12184                 if(!isWasmInitialized) {
12185                         throw new Error("initializeWasm() must be awaited first!");
12186                 }
12187                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
12188                 // debug statements here
12189         }
12190         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
12191         export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
12192                 if(!isWasmInitialized) {
12193                         throw new Error("initializeWasm() must be awaited first!");
12194                 }
12195                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
12196                 return nativeResponseValue;
12197         }
12198         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
12199         export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
12200                 if(!isWasmInitialized) {
12201                         throw new Error("initializeWasm() must be awaited first!");
12202                 }
12203                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
12204                 // debug statements here
12205         }
12206         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
12207         export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
12208                 if(!isWasmInitialized) {
12209                         throw new Error("initializeWasm() must be awaited first!");
12210                 }
12211                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
12212                 return nativeResponseValue;
12213         }
12214         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
12215         export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
12216                 if(!isWasmInitialized) {
12217                         throw new Error("initializeWasm() must be awaited first!");
12218                 }
12219                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
12220                 // debug statements here
12221         }
12222         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
12223         export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
12224                 if(!isWasmInitialized) {
12225                         throw new Error("initializeWasm() must be awaited first!");
12226                 }
12227                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
12228                 return decodeArray(nativeResponseValue);
12229         }
12230         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12231         export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
12232                 if(!isWasmInitialized) {
12233                         throw new Error("initializeWasm() must be awaited first!");
12234                 }
12235                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
12236                 // debug statements here
12237         }
12238         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
12239         export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
12240                 if(!isWasmInitialized) {
12241                         throw new Error("initializeWasm() must be awaited first!");
12242                 }
12243                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
12244                 return decodeArray(nativeResponseValue);
12245         }
12246         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
12247         export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
12248                 if(!isWasmInitialized) {
12249                         throw new Error("initializeWasm() must be awaited first!");
12250                 }
12251                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
12252                 // debug statements here
12253         }
12254         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
12255         export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
12256                 if(!isWasmInitialized) {
12257                         throw new Error("initializeWasm() must be awaited first!");
12258                 }
12259                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
12260                 return decodeArray(nativeResponseValue);
12261         }
12262         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12263         export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
12264                 if(!isWasmInitialized) {
12265                         throw new Error("initializeWasm() must be awaited first!");
12266                 }
12267                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
12268                 // debug statements here
12269         }
12270         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
12271         export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
12272                 if(!isWasmInitialized) {
12273                         throw new Error("initializeWasm() must be awaited first!");
12274                 }
12275                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
12276                 // debug statements here
12277         }
12278         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
12279         export function UnsignedNodeAnnouncement_clone(orig: number): number {
12280                 if(!isWasmInitialized) {
12281                         throw new Error("initializeWasm() must be awaited first!");
12282                 }
12283                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
12284                 return nativeResponseValue;
12285         }
12286         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
12287         export function NodeAnnouncement_free(this_obj: number): void {
12288                 if(!isWasmInitialized) {
12289                         throw new Error("initializeWasm() must be awaited first!");
12290                 }
12291                 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
12292                 // debug statements here
12293         }
12294         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
12295         export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
12296                 if(!isWasmInitialized) {
12297                         throw new Error("initializeWasm() must be awaited first!");
12298                 }
12299                 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
12300                 return decodeArray(nativeResponseValue);
12301         }
12302         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12303         export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
12304                 if(!isWasmInitialized) {
12305                         throw new Error("initializeWasm() must be awaited first!");
12306                 }
12307                 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
12308                 // debug statements here
12309         }
12310         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
12311         export function NodeAnnouncement_get_contents(this_ptr: number): number {
12312                 if(!isWasmInitialized) {
12313                         throw new Error("initializeWasm() must be awaited first!");
12314                 }
12315                 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
12316                 return nativeResponseValue;
12317         }
12318         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
12319         export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
12320                 if(!isWasmInitialized) {
12321                         throw new Error("initializeWasm() must be awaited first!");
12322                 }
12323                 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
12324                 // debug statements here
12325         }
12326         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
12327         export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
12328                 if(!isWasmInitialized) {
12329                         throw new Error("initializeWasm() must be awaited first!");
12330                 }
12331                 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
12332                 return nativeResponseValue;
12333         }
12334         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
12335         export function NodeAnnouncement_clone(orig: number): number {
12336                 if(!isWasmInitialized) {
12337                         throw new Error("initializeWasm() must be awaited first!");
12338                 }
12339                 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
12340                 return nativeResponseValue;
12341         }
12342         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
12343         export function UnsignedChannelAnnouncement_free(this_obj: number): void {
12344                 if(!isWasmInitialized) {
12345                         throw new Error("initializeWasm() must be awaited first!");
12346                 }
12347                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
12348                 // debug statements here
12349         }
12350         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12351         export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
12352                 if(!isWasmInitialized) {
12353                         throw new Error("initializeWasm() must be awaited first!");
12354                 }
12355                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
12356                 return nativeResponseValue;
12357         }
12358         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
12359         export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
12360                 if(!isWasmInitialized) {
12361                         throw new Error("initializeWasm() must be awaited first!");
12362                 }
12363                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
12364                 // debug statements here
12365         }
12366         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
12367         export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
12368                 if(!isWasmInitialized) {
12369                         throw new Error("initializeWasm() must be awaited first!");
12370                 }
12371                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
12372                 return decodeArray(nativeResponseValue);
12373         }
12374         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12375         export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12376                 if(!isWasmInitialized) {
12377                         throw new Error("initializeWasm() must be awaited first!");
12378                 }
12379                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
12380                 // debug statements here
12381         }
12382         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12383         export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
12384                 if(!isWasmInitialized) {
12385                         throw new Error("initializeWasm() must be awaited first!");
12386                 }
12387                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
12388                 return nativeResponseValue;
12389         }
12390         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
12391         export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
12392                 if(!isWasmInitialized) {
12393                         throw new Error("initializeWasm() must be awaited first!");
12394                 }
12395                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
12396                 // debug statements here
12397         }
12398         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12399         export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
12400                 if(!isWasmInitialized) {
12401                         throw new Error("initializeWasm() must be awaited first!");
12402                 }
12403                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
12404                 return decodeArray(nativeResponseValue);
12405         }
12406         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12407         export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
12408                 if(!isWasmInitialized) {
12409                         throw new Error("initializeWasm() must be awaited first!");
12410                 }
12411                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
12412                 // debug statements here
12413         }
12414         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12415         export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
12416                 if(!isWasmInitialized) {
12417                         throw new Error("initializeWasm() must be awaited first!");
12418                 }
12419                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
12420                 return decodeArray(nativeResponseValue);
12421         }
12422         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12423         export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
12424                 if(!isWasmInitialized) {
12425                         throw new Error("initializeWasm() must be awaited first!");
12426                 }
12427                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
12428                 // debug statements here
12429         }
12430         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12431         export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
12432                 if(!isWasmInitialized) {
12433                         throw new Error("initializeWasm() must be awaited first!");
12434                 }
12435                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
12436                 return decodeArray(nativeResponseValue);
12437         }
12438         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12439         export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
12440                 if(!isWasmInitialized) {
12441                         throw new Error("initializeWasm() must be awaited first!");
12442                 }
12443                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
12444                 // debug statements here
12445         }
12446         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12447         export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
12448                 if(!isWasmInitialized) {
12449                         throw new Error("initializeWasm() must be awaited first!");
12450                 }
12451                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
12452                 return decodeArray(nativeResponseValue);
12453         }
12454         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12455         export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
12456                 if(!isWasmInitialized) {
12457                         throw new Error("initializeWasm() must be awaited first!");
12458                 }
12459                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
12460                 // debug statements here
12461         }
12462         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
12463         export function UnsignedChannelAnnouncement_clone(orig: number): number {
12464                 if(!isWasmInitialized) {
12465                         throw new Error("initializeWasm() must be awaited first!");
12466                 }
12467                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
12468                 return nativeResponseValue;
12469         }
12470         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
12471         export function ChannelAnnouncement_free(this_obj: number): void {
12472                 if(!isWasmInitialized) {
12473                         throw new Error("initializeWasm() must be awaited first!");
12474                 }
12475                 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
12476                 // debug statements here
12477         }
12478         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12479         export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
12480                 if(!isWasmInitialized) {
12481                         throw new Error("initializeWasm() must be awaited first!");
12482                 }
12483                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
12484                 return decodeArray(nativeResponseValue);
12485         }
12486         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12487         export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
12488                 if(!isWasmInitialized) {
12489                         throw new Error("initializeWasm() must be awaited first!");
12490                 }
12491                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
12492                 // debug statements here
12493         }
12494         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12495         export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
12496                 if(!isWasmInitialized) {
12497                         throw new Error("initializeWasm() must be awaited first!");
12498                 }
12499                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
12500                 return decodeArray(nativeResponseValue);
12501         }
12502         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12503         export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
12504                 if(!isWasmInitialized) {
12505                         throw new Error("initializeWasm() must be awaited first!");
12506                 }
12507                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
12508                 // debug statements here
12509         }
12510         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12511         export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
12512                 if(!isWasmInitialized) {
12513                         throw new Error("initializeWasm() must be awaited first!");
12514                 }
12515                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
12516                 return decodeArray(nativeResponseValue);
12517         }
12518         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12519         export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
12520                 if(!isWasmInitialized) {
12521                         throw new Error("initializeWasm() must be awaited first!");
12522                 }
12523                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
12524                 // debug statements here
12525         }
12526         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12527         export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
12528                 if(!isWasmInitialized) {
12529                         throw new Error("initializeWasm() must be awaited first!");
12530                 }
12531                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
12532                 return decodeArray(nativeResponseValue);
12533         }
12534         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12535         export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
12536                 if(!isWasmInitialized) {
12537                         throw new Error("initializeWasm() must be awaited first!");
12538                 }
12539                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
12540                 // debug statements here
12541         }
12542         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12543         export function ChannelAnnouncement_get_contents(this_ptr: number): number {
12544                 if(!isWasmInitialized) {
12545                         throw new Error("initializeWasm() must be awaited first!");
12546                 }
12547                 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
12548                 return nativeResponseValue;
12549         }
12550         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
12551         export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
12552                 if(!isWasmInitialized) {
12553                         throw new Error("initializeWasm() must be awaited first!");
12554                 }
12555                 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
12556                 // debug statements here
12557         }
12558         // 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);
12559         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 {
12560                 if(!isWasmInitialized) {
12561                         throw new Error("initializeWasm() must be awaited first!");
12562                 }
12563                 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);
12564                 return nativeResponseValue;
12565         }
12566         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
12567         export function ChannelAnnouncement_clone(orig: number): number {
12568                 if(!isWasmInitialized) {
12569                         throw new Error("initializeWasm() must be awaited first!");
12570                 }
12571                 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
12572                 return nativeResponseValue;
12573         }
12574         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
12575         export function UnsignedChannelUpdate_free(this_obj: number): void {
12576                 if(!isWasmInitialized) {
12577                         throw new Error("initializeWasm() must be awaited first!");
12578                 }
12579                 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
12580                 // debug statements here
12581         }
12582         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
12583         export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
12584                 if(!isWasmInitialized) {
12585                         throw new Error("initializeWasm() must be awaited first!");
12586                 }
12587                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
12588                 return decodeArray(nativeResponseValue);
12589         }
12590         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12591         export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12592                 if(!isWasmInitialized) {
12593                         throw new Error("initializeWasm() must be awaited first!");
12594                 }
12595                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
12596                 // debug statements here
12597         }
12598         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12599         export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
12600                 if(!isWasmInitialized) {
12601                         throw new Error("initializeWasm() must be awaited first!");
12602                 }
12603                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
12604                 return nativeResponseValue;
12605         }
12606         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
12607         export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
12608                 if(!isWasmInitialized) {
12609                         throw new Error("initializeWasm() must be awaited first!");
12610                 }
12611                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
12612                 // debug statements here
12613         }
12614         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12615         export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
12616                 if(!isWasmInitialized) {
12617                         throw new Error("initializeWasm() must be awaited first!");
12618                 }
12619                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
12620                 return nativeResponseValue;
12621         }
12622         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
12623         export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
12624                 if(!isWasmInitialized) {
12625                         throw new Error("initializeWasm() must be awaited first!");
12626                 }
12627                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
12628                 // debug statements here
12629         }
12630         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12631         export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
12632                 if(!isWasmInitialized) {
12633                         throw new Error("initializeWasm() must be awaited first!");
12634                 }
12635                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
12636                 return nativeResponseValue;
12637         }
12638         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
12639         export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
12640                 if(!isWasmInitialized) {
12641                         throw new Error("initializeWasm() must be awaited first!");
12642                 }
12643                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
12644                 // debug statements here
12645         }
12646         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12647         export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
12648                 if(!isWasmInitialized) {
12649                         throw new Error("initializeWasm() must be awaited first!");
12650                 }
12651                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
12652                 return nativeResponseValue;
12653         }
12654         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
12655         export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
12656                 if(!isWasmInitialized) {
12657                         throw new Error("initializeWasm() must be awaited first!");
12658                 }
12659                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
12660                 // debug statements here
12661         }
12662         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12663         export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
12664                 if(!isWasmInitialized) {
12665                         throw new Error("initializeWasm() must be awaited first!");
12666                 }
12667                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
12668                 return nativeResponseValue;
12669         }
12670         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
12671         export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
12672                 if(!isWasmInitialized) {
12673                         throw new Error("initializeWasm() must be awaited first!");
12674                 }
12675                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
12676                 // debug statements here
12677         }
12678         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12679         export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
12680                 if(!isWasmInitialized) {
12681                         throw new Error("initializeWasm() must be awaited first!");
12682                 }
12683                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
12684                 return nativeResponseValue;
12685         }
12686         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
12687         export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
12688                 if(!isWasmInitialized) {
12689                         throw new Error("initializeWasm() must be awaited first!");
12690                 }
12691                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
12692                 // debug statements here
12693         }
12694         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12695         export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
12696                 if(!isWasmInitialized) {
12697                         throw new Error("initializeWasm() must be awaited first!");
12698                 }
12699                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
12700                 return nativeResponseValue;
12701         }
12702         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
12703         export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
12704                 if(!isWasmInitialized) {
12705                         throw new Error("initializeWasm() must be awaited first!");
12706                 }
12707                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
12708                 // debug statements here
12709         }
12710         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
12711         export function UnsignedChannelUpdate_clone(orig: number): number {
12712                 if(!isWasmInitialized) {
12713                         throw new Error("initializeWasm() must be awaited first!");
12714                 }
12715                 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
12716                 return nativeResponseValue;
12717         }
12718         // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
12719         export function ChannelUpdate_free(this_obj: number): void {
12720                 if(!isWasmInitialized) {
12721                         throw new Error("initializeWasm() must be awaited first!");
12722                 }
12723                 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
12724                 // debug statements here
12725         }
12726         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
12727         export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
12728                 if(!isWasmInitialized) {
12729                         throw new Error("initializeWasm() must be awaited first!");
12730                 }
12731                 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
12732                 return decodeArray(nativeResponseValue);
12733         }
12734         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
12735         export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
12736                 if(!isWasmInitialized) {
12737                         throw new Error("initializeWasm() must be awaited first!");
12738                 }
12739                 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
12740                 // debug statements here
12741         }
12742         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
12743         export function ChannelUpdate_get_contents(this_ptr: number): number {
12744                 if(!isWasmInitialized) {
12745                         throw new Error("initializeWasm() must be awaited first!");
12746                 }
12747                 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
12748                 return nativeResponseValue;
12749         }
12750         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
12751         export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
12752                 if(!isWasmInitialized) {
12753                         throw new Error("initializeWasm() must be awaited first!");
12754                 }
12755                 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
12756                 // debug statements here
12757         }
12758         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
12759         export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
12760                 if(!isWasmInitialized) {
12761                         throw new Error("initializeWasm() must be awaited first!");
12762                 }
12763                 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
12764                 return nativeResponseValue;
12765         }
12766         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
12767         export function ChannelUpdate_clone(orig: number): number {
12768                 if(!isWasmInitialized) {
12769                         throw new Error("initializeWasm() must be awaited first!");
12770                 }
12771                 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
12772                 return nativeResponseValue;
12773         }
12774         // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
12775         export function QueryChannelRange_free(this_obj: number): void {
12776                 if(!isWasmInitialized) {
12777                         throw new Error("initializeWasm() must be awaited first!");
12778                 }
12779                 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
12780                 // debug statements here
12781         }
12782         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
12783         export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
12784                 if(!isWasmInitialized) {
12785                         throw new Error("initializeWasm() must be awaited first!");
12786                 }
12787                 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
12788                 return decodeArray(nativeResponseValue);
12789         }
12790         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12791         export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12792                 if(!isWasmInitialized) {
12793                         throw new Error("initializeWasm() must be awaited first!");
12794                 }
12795                 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
12796                 // debug statements here
12797         }
12798         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
12799         export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
12800                 if(!isWasmInitialized) {
12801                         throw new Error("initializeWasm() must be awaited first!");
12802                 }
12803                 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
12804                 return nativeResponseValue;
12805         }
12806         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
12807         export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
12808                 if(!isWasmInitialized) {
12809                         throw new Error("initializeWasm() must be awaited first!");
12810                 }
12811                 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
12812                 // debug statements here
12813         }
12814         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
12815         export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
12816                 if(!isWasmInitialized) {
12817                         throw new Error("initializeWasm() must be awaited first!");
12818                 }
12819                 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
12820                 return nativeResponseValue;
12821         }
12822         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
12823         export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
12824                 if(!isWasmInitialized) {
12825                         throw new Error("initializeWasm() must be awaited first!");
12826                 }
12827                 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
12828                 // debug statements here
12829         }
12830         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
12831         export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
12832                 if(!isWasmInitialized) {
12833                         throw new Error("initializeWasm() must be awaited first!");
12834                 }
12835                 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
12836                 return nativeResponseValue;
12837         }
12838         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
12839         export function QueryChannelRange_clone(orig: number): number {
12840                 if(!isWasmInitialized) {
12841                         throw new Error("initializeWasm() must be awaited first!");
12842                 }
12843                 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
12844                 return nativeResponseValue;
12845         }
12846         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
12847         export function ReplyChannelRange_free(this_obj: number): void {
12848                 if(!isWasmInitialized) {
12849                         throw new Error("initializeWasm() must be awaited first!");
12850                 }
12851                 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
12852                 // debug statements here
12853         }
12854         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
12855         export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
12856                 if(!isWasmInitialized) {
12857                         throw new Error("initializeWasm() must be awaited first!");
12858                 }
12859                 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
12860                 return decodeArray(nativeResponseValue);
12861         }
12862         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12863         export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12864                 if(!isWasmInitialized) {
12865                         throw new Error("initializeWasm() must be awaited first!");
12866                 }
12867                 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
12868                 // debug statements here
12869         }
12870         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
12871         export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
12872                 if(!isWasmInitialized) {
12873                         throw new Error("initializeWasm() must be awaited first!");
12874                 }
12875                 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
12876                 return nativeResponseValue;
12877         }
12878         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
12879         export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
12880                 if(!isWasmInitialized) {
12881                         throw new Error("initializeWasm() must be awaited first!");
12882                 }
12883                 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
12884                 // debug statements here
12885         }
12886         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
12887         export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
12888                 if(!isWasmInitialized) {
12889                         throw new Error("initializeWasm() must be awaited first!");
12890                 }
12891                 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
12892                 return nativeResponseValue;
12893         }
12894         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
12895         export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
12896                 if(!isWasmInitialized) {
12897                         throw new Error("initializeWasm() must be awaited first!");
12898                 }
12899                 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
12900                 // debug statements here
12901         }
12902         // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
12903         export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
12904                 if(!isWasmInitialized) {
12905                         throw new Error("initializeWasm() must be awaited first!");
12906                 }
12907                 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
12908                 return nativeResponseValue;
12909         }
12910         // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
12911         export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
12912                 if(!isWasmInitialized) {
12913                         throw new Error("initializeWasm() must be awaited first!");
12914                 }
12915                 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
12916                 // debug statements here
12917         }
12918         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
12919         export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
12920                 if(!isWasmInitialized) {
12921                         throw new Error("initializeWasm() must be awaited first!");
12922                 }
12923                 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
12924                 // debug statements here
12925         }
12926         // 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);
12927         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 {
12928                 if(!isWasmInitialized) {
12929                         throw new Error("initializeWasm() must be awaited first!");
12930                 }
12931                 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
12932                 return nativeResponseValue;
12933         }
12934         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
12935         export function ReplyChannelRange_clone(orig: number): number {
12936                 if(!isWasmInitialized) {
12937                         throw new Error("initializeWasm() must be awaited first!");
12938                 }
12939                 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
12940                 return nativeResponseValue;
12941         }
12942         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
12943         export function QueryShortChannelIds_free(this_obj: number): void {
12944                 if(!isWasmInitialized) {
12945                         throw new Error("initializeWasm() must be awaited first!");
12946                 }
12947                 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
12948                 // debug statements here
12949         }
12950         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
12951         export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
12952                 if(!isWasmInitialized) {
12953                         throw new Error("initializeWasm() must be awaited first!");
12954                 }
12955                 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
12956                 return decodeArray(nativeResponseValue);
12957         }
12958         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12959         export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12960                 if(!isWasmInitialized) {
12961                         throw new Error("initializeWasm() must be awaited first!");
12962                 }
12963                 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
12964                 // debug statements here
12965         }
12966         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
12967         export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
12968                 if(!isWasmInitialized) {
12969                         throw new Error("initializeWasm() must be awaited first!");
12970                 }
12971                 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
12972                 // debug statements here
12973         }
12974         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
12975         export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
12976                 if(!isWasmInitialized) {
12977                         throw new Error("initializeWasm() must be awaited first!");
12978                 }
12979                 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
12980                 return nativeResponseValue;
12981         }
12982         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
12983         export function QueryShortChannelIds_clone(orig: number): number {
12984                 if(!isWasmInitialized) {
12985                         throw new Error("initializeWasm() must be awaited first!");
12986                 }
12987                 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
12988                 return nativeResponseValue;
12989         }
12990         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
12991         export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
12992                 if(!isWasmInitialized) {
12993                         throw new Error("initializeWasm() must be awaited first!");
12994                 }
12995                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
12996                 // debug statements here
12997         }
12998         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
12999         export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
13000                 if(!isWasmInitialized) {
13001                         throw new Error("initializeWasm() must be awaited first!");
13002                 }
13003                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
13004                 return decodeArray(nativeResponseValue);
13005         }
13006         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13007         export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
13008                 if(!isWasmInitialized) {
13009                         throw new Error("initializeWasm() must be awaited first!");
13010                 }
13011                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
13012                 // debug statements here
13013         }
13014         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
13015         export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
13016                 if(!isWasmInitialized) {
13017                         throw new Error("initializeWasm() must be awaited first!");
13018                 }
13019                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
13020                 return nativeResponseValue;
13021         }
13022         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
13023         export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
13024                 if(!isWasmInitialized) {
13025                         throw new Error("initializeWasm() must be awaited first!");
13026                 }
13027                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
13028                 // debug statements here
13029         }
13030         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
13031         export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
13032                 if(!isWasmInitialized) {
13033                         throw new Error("initializeWasm() must be awaited first!");
13034                 }
13035                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
13036                 return nativeResponseValue;
13037         }
13038         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
13039         export function ReplyShortChannelIdsEnd_clone(orig: number): number {
13040                 if(!isWasmInitialized) {
13041                         throw new Error("initializeWasm() must be awaited first!");
13042                 }
13043                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
13044                 return nativeResponseValue;
13045         }
13046         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
13047         export function GossipTimestampFilter_free(this_obj: number): void {
13048                 if(!isWasmInitialized) {
13049                         throw new Error("initializeWasm() must be awaited first!");
13050                 }
13051                 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
13052                 // debug statements here
13053         }
13054         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
13055         export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
13056                 if(!isWasmInitialized) {
13057                         throw new Error("initializeWasm() must be awaited first!");
13058                 }
13059                 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
13060                 return decodeArray(nativeResponseValue);
13061         }
13062         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13063         export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
13064                 if(!isWasmInitialized) {
13065                         throw new Error("initializeWasm() must be awaited first!");
13066                 }
13067                 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
13068                 // debug statements here
13069         }
13070         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
13071         export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
13072                 if(!isWasmInitialized) {
13073                         throw new Error("initializeWasm() must be awaited first!");
13074                 }
13075                 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
13076                 return nativeResponseValue;
13077         }
13078         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
13079         export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
13080                 if(!isWasmInitialized) {
13081                         throw new Error("initializeWasm() must be awaited first!");
13082                 }
13083                 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
13084                 // debug statements here
13085         }
13086         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
13087         export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
13088                 if(!isWasmInitialized) {
13089                         throw new Error("initializeWasm() must be awaited first!");
13090                 }
13091                 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
13092                 return nativeResponseValue;
13093         }
13094         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
13095         export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
13096                 if(!isWasmInitialized) {
13097                         throw new Error("initializeWasm() must be awaited first!");
13098                 }
13099                 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
13100                 // debug statements here
13101         }
13102         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
13103         export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
13104                 if(!isWasmInitialized) {
13105                         throw new Error("initializeWasm() must be awaited first!");
13106                 }
13107                 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
13108                 return nativeResponseValue;
13109         }
13110         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
13111         export function GossipTimestampFilter_clone(orig: number): number {
13112                 if(!isWasmInitialized) {
13113                         throw new Error("initializeWasm() must be awaited first!");
13114                 }
13115                 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
13116                 return nativeResponseValue;
13117         }
13118         // void ErrorAction_free(struct LDKErrorAction this_ptr);
13119         export function ErrorAction_free(this_ptr: number): void {
13120                 if(!isWasmInitialized) {
13121                         throw new Error("initializeWasm() must be awaited first!");
13122                 }
13123                 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
13124                 // debug statements here
13125         }
13126         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
13127         export function ErrorAction_clone(orig: number): number {
13128                 if(!isWasmInitialized) {
13129                         throw new Error("initializeWasm() must be awaited first!");
13130                 }
13131                 const nativeResponseValue = wasm.ErrorAction_clone(orig);
13132                 return nativeResponseValue;
13133         }
13134         // struct LDKErrorAction ErrorAction_disconnect_peer(struct LDKErrorMessage msg);
13135         export function ErrorAction_disconnect_peer(msg: number): number {
13136                 if(!isWasmInitialized) {
13137                         throw new Error("initializeWasm() must be awaited first!");
13138                 }
13139                 const nativeResponseValue = wasm.ErrorAction_disconnect_peer(msg);
13140                 return nativeResponseValue;
13141         }
13142         // struct LDKErrorAction ErrorAction_ignore_error(void);
13143         export function ErrorAction_ignore_error(): number {
13144                 if(!isWasmInitialized) {
13145                         throw new Error("initializeWasm() must be awaited first!");
13146                 }
13147                 const nativeResponseValue = wasm.ErrorAction_ignore_error();
13148                 return nativeResponseValue;
13149         }
13150         // struct LDKErrorAction ErrorAction_ignore_and_log(enum LDKLevel a);
13151         export function ErrorAction_ignore_and_log(a: Level): number {
13152                 if(!isWasmInitialized) {
13153                         throw new Error("initializeWasm() must be awaited first!");
13154                 }
13155                 const nativeResponseValue = wasm.ErrorAction_ignore_and_log(a);
13156                 return nativeResponseValue;
13157         }
13158         // struct LDKErrorAction ErrorAction_send_error_message(struct LDKErrorMessage msg);
13159         export function ErrorAction_send_error_message(msg: number): number {
13160                 if(!isWasmInitialized) {
13161                         throw new Error("initializeWasm() must be awaited first!");
13162                 }
13163                 const nativeResponseValue = wasm.ErrorAction_send_error_message(msg);
13164                 return nativeResponseValue;
13165         }
13166         // void LightningError_free(struct LDKLightningError this_obj);
13167         export function LightningError_free(this_obj: number): void {
13168                 if(!isWasmInitialized) {
13169                         throw new Error("initializeWasm() must be awaited first!");
13170                 }
13171                 const nativeResponseValue = wasm.LightningError_free(this_obj);
13172                 // debug statements here
13173         }
13174         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
13175         export function LightningError_get_err(this_ptr: number): String {
13176                 if(!isWasmInitialized) {
13177                         throw new Error("initializeWasm() must be awaited first!");
13178                 }
13179                 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
13180                 return nativeResponseValue;
13181         }
13182         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKStr val);
13183         export function LightningError_set_err(this_ptr: number, val: String): void {
13184                 if(!isWasmInitialized) {
13185                         throw new Error("initializeWasm() must be awaited first!");
13186                 }
13187                 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, val);
13188                 // debug statements here
13189         }
13190         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
13191         export function LightningError_get_action(this_ptr: number): number {
13192                 if(!isWasmInitialized) {
13193                         throw new Error("initializeWasm() must be awaited first!");
13194                 }
13195                 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
13196                 return nativeResponseValue;
13197         }
13198         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
13199         export function LightningError_set_action(this_ptr: number, val: number): void {
13200                 if(!isWasmInitialized) {
13201                         throw new Error("initializeWasm() must be awaited first!");
13202                 }
13203                 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
13204                 // debug statements here
13205         }
13206         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKStr err_arg, struct LDKErrorAction action_arg);
13207         export function LightningError_new(err_arg: String, action_arg: number): number {
13208                 if(!isWasmInitialized) {
13209                         throw new Error("initializeWasm() must be awaited first!");
13210                 }
13211                 const nativeResponseValue = wasm.LightningError_new(err_arg, action_arg);
13212                 return nativeResponseValue;
13213         }
13214         // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
13215         export function LightningError_clone(orig: number): number {
13216                 if(!isWasmInitialized) {
13217                         throw new Error("initializeWasm() must be awaited first!");
13218                 }
13219                 const nativeResponseValue = wasm.LightningError_clone(orig);
13220                 return nativeResponseValue;
13221         }
13222         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
13223         export function CommitmentUpdate_free(this_obj: number): void {
13224                 if(!isWasmInitialized) {
13225                         throw new Error("initializeWasm() must be awaited first!");
13226                 }
13227                 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
13228                 // debug statements here
13229         }
13230         // struct LDKCVec_UpdateAddHTLCZ CommitmentUpdate_get_update_add_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
13231         export function CommitmentUpdate_get_update_add_htlcs(this_ptr: number): number[] {
13232                 if(!isWasmInitialized) {
13233                         throw new Error("initializeWasm() must be awaited first!");
13234                 }
13235                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_add_htlcs(this_ptr);
13236                 return nativeResponseValue;
13237         }
13238         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
13239         export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
13240                 if(!isWasmInitialized) {
13241                         throw new Error("initializeWasm() must be awaited first!");
13242                 }
13243                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
13244                 // debug statements here
13245         }
13246         // struct LDKCVec_UpdateFulfillHTLCZ CommitmentUpdate_get_update_fulfill_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
13247         export function CommitmentUpdate_get_update_fulfill_htlcs(this_ptr: number): number[] {
13248                 if(!isWasmInitialized) {
13249                         throw new Error("initializeWasm() must be awaited first!");
13250                 }
13251                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fulfill_htlcs(this_ptr);
13252                 return nativeResponseValue;
13253         }
13254         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
13255         export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
13256                 if(!isWasmInitialized) {
13257                         throw new Error("initializeWasm() must be awaited first!");
13258                 }
13259                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
13260                 // debug statements here
13261         }
13262         // struct LDKCVec_UpdateFailHTLCZ CommitmentUpdate_get_update_fail_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
13263         export function CommitmentUpdate_get_update_fail_htlcs(this_ptr: number): number[] {
13264                 if(!isWasmInitialized) {
13265                         throw new Error("initializeWasm() must be awaited first!");
13266                 }
13267                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fail_htlcs(this_ptr);
13268                 return nativeResponseValue;
13269         }
13270         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
13271         export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
13272                 if(!isWasmInitialized) {
13273                         throw new Error("initializeWasm() must be awaited first!");
13274                 }
13275                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
13276                 // debug statements here
13277         }
13278         // struct LDKCVec_UpdateFailMalformedHTLCZ CommitmentUpdate_get_update_fail_malformed_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
13279         export function CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr: number): number[] {
13280                 if(!isWasmInitialized) {
13281                         throw new Error("initializeWasm() must be awaited first!");
13282                 }
13283                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr);
13284                 return nativeResponseValue;
13285         }
13286         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
13287         export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
13288                 if(!isWasmInitialized) {
13289                         throw new Error("initializeWasm() must be awaited first!");
13290                 }
13291                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
13292                 // debug statements here
13293         }
13294         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
13295         export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
13296                 if(!isWasmInitialized) {
13297                         throw new Error("initializeWasm() must be awaited first!");
13298                 }
13299                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
13300                 return nativeResponseValue;
13301         }
13302         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
13303         export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
13304                 if(!isWasmInitialized) {
13305                         throw new Error("initializeWasm() must be awaited first!");
13306                 }
13307                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
13308                 // debug statements here
13309         }
13310         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
13311         export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
13312                 if(!isWasmInitialized) {
13313                         throw new Error("initializeWasm() must be awaited first!");
13314                 }
13315                 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
13316                 return nativeResponseValue;
13317         }
13318         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
13319         export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
13320                 if(!isWasmInitialized) {
13321                         throw new Error("initializeWasm() must be awaited first!");
13322                 }
13323                 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
13324                 // debug statements here
13325         }
13326         // 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);
13327         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 {
13328                 if(!isWasmInitialized) {
13329                         throw new Error("initializeWasm() must be awaited first!");
13330                 }
13331                 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);
13332                 return nativeResponseValue;
13333         }
13334         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
13335         export function CommitmentUpdate_clone(orig: number): number {
13336                 if(!isWasmInitialized) {
13337                         throw new Error("initializeWasm() must be awaited first!");
13338                 }
13339                 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
13340                 return nativeResponseValue;
13341         }
13342         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
13343         export function ChannelMessageHandler_free(this_ptr: number): void {
13344                 if(!isWasmInitialized) {
13345                         throw new Error("initializeWasm() must be awaited first!");
13346                 }
13347                 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
13348                 // debug statements here
13349         }
13350         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
13351         export function RoutingMessageHandler_free(this_ptr: number): void {
13352                 if(!isWasmInitialized) {
13353                         throw new Error("initializeWasm() must be awaited first!");
13354                 }
13355                 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
13356                 // debug statements here
13357         }
13358         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
13359         export function AcceptChannel_write(obj: number): Uint8Array {
13360                 if(!isWasmInitialized) {
13361                         throw new Error("initializeWasm() must be awaited first!");
13362                 }
13363                 const nativeResponseValue = wasm.AcceptChannel_write(obj);
13364                 return decodeArray(nativeResponseValue);
13365         }
13366         // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
13367         export function AcceptChannel_read(ser: Uint8Array): number {
13368                 if(!isWasmInitialized) {
13369                         throw new Error("initializeWasm() must be awaited first!");
13370                 }
13371                 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
13372                 return nativeResponseValue;
13373         }
13374         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
13375         export function AnnouncementSignatures_write(obj: number): Uint8Array {
13376                 if(!isWasmInitialized) {
13377                         throw new Error("initializeWasm() must be awaited first!");
13378                 }
13379                 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
13380                 return decodeArray(nativeResponseValue);
13381         }
13382         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
13383         export function AnnouncementSignatures_read(ser: Uint8Array): number {
13384                 if(!isWasmInitialized) {
13385                         throw new Error("initializeWasm() must be awaited first!");
13386                 }
13387                 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
13388                 return nativeResponseValue;
13389         }
13390         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
13391         export function ChannelReestablish_write(obj: number): Uint8Array {
13392                 if(!isWasmInitialized) {
13393                         throw new Error("initializeWasm() must be awaited first!");
13394                 }
13395                 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
13396                 return decodeArray(nativeResponseValue);
13397         }
13398         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
13399         export function ChannelReestablish_read(ser: Uint8Array): number {
13400                 if(!isWasmInitialized) {
13401                         throw new Error("initializeWasm() must be awaited first!");
13402                 }
13403                 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
13404                 return nativeResponseValue;
13405         }
13406         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
13407         export function ClosingSigned_write(obj: number): Uint8Array {
13408                 if(!isWasmInitialized) {
13409                         throw new Error("initializeWasm() must be awaited first!");
13410                 }
13411                 const nativeResponseValue = wasm.ClosingSigned_write(obj);
13412                 return decodeArray(nativeResponseValue);
13413         }
13414         // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
13415         export function ClosingSigned_read(ser: Uint8Array): number {
13416                 if(!isWasmInitialized) {
13417                         throw new Error("initializeWasm() must be awaited first!");
13418                 }
13419                 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
13420                 return nativeResponseValue;
13421         }
13422         // struct LDKCVec_u8Z ClosingSignedFeeRange_write(const struct LDKClosingSignedFeeRange *NONNULL_PTR obj);
13423         export function ClosingSignedFeeRange_write(obj: number): Uint8Array {
13424                 if(!isWasmInitialized) {
13425                         throw new Error("initializeWasm() must be awaited first!");
13426                 }
13427                 const nativeResponseValue = wasm.ClosingSignedFeeRange_write(obj);
13428                 return decodeArray(nativeResponseValue);
13429         }
13430         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ ClosingSignedFeeRange_read(struct LDKu8slice ser);
13431         export function ClosingSignedFeeRange_read(ser: Uint8Array): number {
13432                 if(!isWasmInitialized) {
13433                         throw new Error("initializeWasm() must be awaited first!");
13434                 }
13435                 const nativeResponseValue = wasm.ClosingSignedFeeRange_read(encodeArray(ser));
13436                 return nativeResponseValue;
13437         }
13438         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
13439         export function CommitmentSigned_write(obj: number): Uint8Array {
13440                 if(!isWasmInitialized) {
13441                         throw new Error("initializeWasm() must be awaited first!");
13442                 }
13443                 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
13444                 return decodeArray(nativeResponseValue);
13445         }
13446         // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
13447         export function CommitmentSigned_read(ser: Uint8Array): number {
13448                 if(!isWasmInitialized) {
13449                         throw new Error("initializeWasm() must be awaited first!");
13450                 }
13451                 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
13452                 return nativeResponseValue;
13453         }
13454         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
13455         export function FundingCreated_write(obj: number): Uint8Array {
13456                 if(!isWasmInitialized) {
13457                         throw new Error("initializeWasm() must be awaited first!");
13458                 }
13459                 const nativeResponseValue = wasm.FundingCreated_write(obj);
13460                 return decodeArray(nativeResponseValue);
13461         }
13462         // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
13463         export function FundingCreated_read(ser: Uint8Array): number {
13464                 if(!isWasmInitialized) {
13465                         throw new Error("initializeWasm() must be awaited first!");
13466                 }
13467                 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
13468                 return nativeResponseValue;
13469         }
13470         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
13471         export function FundingSigned_write(obj: number): Uint8Array {
13472                 if(!isWasmInitialized) {
13473                         throw new Error("initializeWasm() must be awaited first!");
13474                 }
13475                 const nativeResponseValue = wasm.FundingSigned_write(obj);
13476                 return decodeArray(nativeResponseValue);
13477         }
13478         // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
13479         export function FundingSigned_read(ser: Uint8Array): number {
13480                 if(!isWasmInitialized) {
13481                         throw new Error("initializeWasm() must be awaited first!");
13482                 }
13483                 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
13484                 return nativeResponseValue;
13485         }
13486         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
13487         export function FundingLocked_write(obj: number): Uint8Array {
13488                 if(!isWasmInitialized) {
13489                         throw new Error("initializeWasm() must be awaited first!");
13490                 }
13491                 const nativeResponseValue = wasm.FundingLocked_write(obj);
13492                 return decodeArray(nativeResponseValue);
13493         }
13494         // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
13495         export function FundingLocked_read(ser: Uint8Array): number {
13496                 if(!isWasmInitialized) {
13497                         throw new Error("initializeWasm() must be awaited first!");
13498                 }
13499                 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
13500                 return nativeResponseValue;
13501         }
13502         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
13503         export function Init_write(obj: number): Uint8Array {
13504                 if(!isWasmInitialized) {
13505                         throw new Error("initializeWasm() must be awaited first!");
13506                 }
13507                 const nativeResponseValue = wasm.Init_write(obj);
13508                 return decodeArray(nativeResponseValue);
13509         }
13510         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
13511         export function Init_read(ser: Uint8Array): number {
13512                 if(!isWasmInitialized) {
13513                         throw new Error("initializeWasm() must be awaited first!");
13514                 }
13515                 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
13516                 return nativeResponseValue;
13517         }
13518         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
13519         export function OpenChannel_write(obj: number): Uint8Array {
13520                 if(!isWasmInitialized) {
13521                         throw new Error("initializeWasm() must be awaited first!");
13522                 }
13523                 const nativeResponseValue = wasm.OpenChannel_write(obj);
13524                 return decodeArray(nativeResponseValue);
13525         }
13526         // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
13527         export function OpenChannel_read(ser: Uint8Array): number {
13528                 if(!isWasmInitialized) {
13529                         throw new Error("initializeWasm() must be awaited first!");
13530                 }
13531                 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
13532                 return nativeResponseValue;
13533         }
13534         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
13535         export function RevokeAndACK_write(obj: number): Uint8Array {
13536                 if(!isWasmInitialized) {
13537                         throw new Error("initializeWasm() must be awaited first!");
13538                 }
13539                 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
13540                 return decodeArray(nativeResponseValue);
13541         }
13542         // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
13543         export function RevokeAndACK_read(ser: Uint8Array): number {
13544                 if(!isWasmInitialized) {
13545                         throw new Error("initializeWasm() must be awaited first!");
13546                 }
13547                 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
13548                 return nativeResponseValue;
13549         }
13550         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
13551         export function Shutdown_write(obj: number): Uint8Array {
13552                 if(!isWasmInitialized) {
13553                         throw new Error("initializeWasm() must be awaited first!");
13554                 }
13555                 const nativeResponseValue = wasm.Shutdown_write(obj);
13556                 return decodeArray(nativeResponseValue);
13557         }
13558         // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
13559         export function Shutdown_read(ser: Uint8Array): number {
13560                 if(!isWasmInitialized) {
13561                         throw new Error("initializeWasm() must be awaited first!");
13562                 }
13563                 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
13564                 return nativeResponseValue;
13565         }
13566         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
13567         export function UpdateFailHTLC_write(obj: number): Uint8Array {
13568                 if(!isWasmInitialized) {
13569                         throw new Error("initializeWasm() must be awaited first!");
13570                 }
13571                 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
13572                 return decodeArray(nativeResponseValue);
13573         }
13574         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
13575         export function UpdateFailHTLC_read(ser: Uint8Array): number {
13576                 if(!isWasmInitialized) {
13577                         throw new Error("initializeWasm() must be awaited first!");
13578                 }
13579                 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
13580                 return nativeResponseValue;
13581         }
13582         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
13583         export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
13584                 if(!isWasmInitialized) {
13585                         throw new Error("initializeWasm() must be awaited first!");
13586                 }
13587                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
13588                 return decodeArray(nativeResponseValue);
13589         }
13590         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
13591         export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
13592                 if(!isWasmInitialized) {
13593                         throw new Error("initializeWasm() must be awaited first!");
13594                 }
13595                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
13596                 return nativeResponseValue;
13597         }
13598         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
13599         export function UpdateFee_write(obj: number): Uint8Array {
13600                 if(!isWasmInitialized) {
13601                         throw new Error("initializeWasm() must be awaited first!");
13602                 }
13603                 const nativeResponseValue = wasm.UpdateFee_write(obj);
13604                 return decodeArray(nativeResponseValue);
13605         }
13606         // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
13607         export function UpdateFee_read(ser: Uint8Array): number {
13608                 if(!isWasmInitialized) {
13609                         throw new Error("initializeWasm() must be awaited first!");
13610                 }
13611                 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
13612                 return nativeResponseValue;
13613         }
13614         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
13615         export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
13616                 if(!isWasmInitialized) {
13617                         throw new Error("initializeWasm() must be awaited first!");
13618                 }
13619                 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
13620                 return decodeArray(nativeResponseValue);
13621         }
13622         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
13623         export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
13624                 if(!isWasmInitialized) {
13625                         throw new Error("initializeWasm() must be awaited first!");
13626                 }
13627                 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
13628                 return nativeResponseValue;
13629         }
13630         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
13631         export function UpdateAddHTLC_write(obj: number): Uint8Array {
13632                 if(!isWasmInitialized) {
13633                         throw new Error("initializeWasm() must be awaited first!");
13634                 }
13635                 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
13636                 return decodeArray(nativeResponseValue);
13637         }
13638         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
13639         export function UpdateAddHTLC_read(ser: Uint8Array): number {
13640                 if(!isWasmInitialized) {
13641                         throw new Error("initializeWasm() must be awaited first!");
13642                 }
13643                 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
13644                 return nativeResponseValue;
13645         }
13646         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
13647         export function Ping_write(obj: number): Uint8Array {
13648                 if(!isWasmInitialized) {
13649                         throw new Error("initializeWasm() must be awaited first!");
13650                 }
13651                 const nativeResponseValue = wasm.Ping_write(obj);
13652                 return decodeArray(nativeResponseValue);
13653         }
13654         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
13655         export function Ping_read(ser: Uint8Array): number {
13656                 if(!isWasmInitialized) {
13657                         throw new Error("initializeWasm() must be awaited first!");
13658                 }
13659                 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
13660                 return nativeResponseValue;
13661         }
13662         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
13663         export function Pong_write(obj: number): Uint8Array {
13664                 if(!isWasmInitialized) {
13665                         throw new Error("initializeWasm() must be awaited first!");
13666                 }
13667                 const nativeResponseValue = wasm.Pong_write(obj);
13668                 return decodeArray(nativeResponseValue);
13669         }
13670         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
13671         export function Pong_read(ser: Uint8Array): number {
13672                 if(!isWasmInitialized) {
13673                         throw new Error("initializeWasm() must be awaited first!");
13674                 }
13675                 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
13676                 return nativeResponseValue;
13677         }
13678         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
13679         export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
13680                 if(!isWasmInitialized) {
13681                         throw new Error("initializeWasm() must be awaited first!");
13682                 }
13683                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
13684                 return decodeArray(nativeResponseValue);
13685         }
13686         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
13687         export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
13688                 if(!isWasmInitialized) {
13689                         throw new Error("initializeWasm() must be awaited first!");
13690                 }
13691                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
13692                 return nativeResponseValue;
13693         }
13694         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
13695         export function ChannelAnnouncement_write(obj: number): Uint8Array {
13696                 if(!isWasmInitialized) {
13697                         throw new Error("initializeWasm() must be awaited first!");
13698                 }
13699                 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
13700                 return decodeArray(nativeResponseValue);
13701         }
13702         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
13703         export function ChannelAnnouncement_read(ser: Uint8Array): number {
13704                 if(!isWasmInitialized) {
13705                         throw new Error("initializeWasm() must be awaited first!");
13706                 }
13707                 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
13708                 return nativeResponseValue;
13709         }
13710         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
13711         export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
13712                 if(!isWasmInitialized) {
13713                         throw new Error("initializeWasm() must be awaited first!");
13714                 }
13715                 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
13716                 return decodeArray(nativeResponseValue);
13717         }
13718         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
13719         export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
13720                 if(!isWasmInitialized) {
13721                         throw new Error("initializeWasm() must be awaited first!");
13722                 }
13723                 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
13724                 return nativeResponseValue;
13725         }
13726         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
13727         export function ChannelUpdate_write(obj: number): Uint8Array {
13728                 if(!isWasmInitialized) {
13729                         throw new Error("initializeWasm() must be awaited first!");
13730                 }
13731                 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
13732                 return decodeArray(nativeResponseValue);
13733         }
13734         // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
13735         export function ChannelUpdate_read(ser: Uint8Array): number {
13736                 if(!isWasmInitialized) {
13737                         throw new Error("initializeWasm() must be awaited first!");
13738                 }
13739                 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
13740                 return nativeResponseValue;
13741         }
13742         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
13743         export function ErrorMessage_write(obj: number): Uint8Array {
13744                 if(!isWasmInitialized) {
13745                         throw new Error("initializeWasm() must be awaited first!");
13746                 }
13747                 const nativeResponseValue = wasm.ErrorMessage_write(obj);
13748                 return decodeArray(nativeResponseValue);
13749         }
13750         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
13751         export function ErrorMessage_read(ser: Uint8Array): number {
13752                 if(!isWasmInitialized) {
13753                         throw new Error("initializeWasm() must be awaited first!");
13754                 }
13755                 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
13756                 return nativeResponseValue;
13757         }
13758         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
13759         export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
13760                 if(!isWasmInitialized) {
13761                         throw new Error("initializeWasm() must be awaited first!");
13762                 }
13763                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
13764                 return decodeArray(nativeResponseValue);
13765         }
13766         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
13767         export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
13768                 if(!isWasmInitialized) {
13769                         throw new Error("initializeWasm() must be awaited first!");
13770                 }
13771                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
13772                 return nativeResponseValue;
13773         }
13774         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
13775         export function NodeAnnouncement_write(obj: number): Uint8Array {
13776                 if(!isWasmInitialized) {
13777                         throw new Error("initializeWasm() must be awaited first!");
13778                 }
13779                 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
13780                 return decodeArray(nativeResponseValue);
13781         }
13782         // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
13783         export function NodeAnnouncement_read(ser: Uint8Array): number {
13784                 if(!isWasmInitialized) {
13785                         throw new Error("initializeWasm() must be awaited first!");
13786                 }
13787                 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
13788                 return nativeResponseValue;
13789         }
13790         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
13791         export function QueryShortChannelIds_read(ser: Uint8Array): number {
13792                 if(!isWasmInitialized) {
13793                         throw new Error("initializeWasm() must be awaited first!");
13794                 }
13795                 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
13796                 return nativeResponseValue;
13797         }
13798         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
13799         export function QueryShortChannelIds_write(obj: number): Uint8Array {
13800                 if(!isWasmInitialized) {
13801                         throw new Error("initializeWasm() must be awaited first!");
13802                 }
13803                 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
13804                 return decodeArray(nativeResponseValue);
13805         }
13806         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
13807         export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
13808                 if(!isWasmInitialized) {
13809                         throw new Error("initializeWasm() must be awaited first!");
13810                 }
13811                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
13812                 return decodeArray(nativeResponseValue);
13813         }
13814         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
13815         export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
13816                 if(!isWasmInitialized) {
13817                         throw new Error("initializeWasm() must be awaited first!");
13818                 }
13819                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
13820                 return nativeResponseValue;
13821         }
13822         // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
13823         export function QueryChannelRange_end_blocknum(this_arg: number): number {
13824                 if(!isWasmInitialized) {
13825                         throw new Error("initializeWasm() must be awaited first!");
13826                 }
13827                 const nativeResponseValue = wasm.QueryChannelRange_end_blocknum(this_arg);
13828                 return nativeResponseValue;
13829         }
13830         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
13831         export function QueryChannelRange_write(obj: number): Uint8Array {
13832                 if(!isWasmInitialized) {
13833                         throw new Error("initializeWasm() must be awaited first!");
13834                 }
13835                 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
13836                 return decodeArray(nativeResponseValue);
13837         }
13838         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
13839         export function QueryChannelRange_read(ser: Uint8Array): number {
13840                 if(!isWasmInitialized) {
13841                         throw new Error("initializeWasm() must be awaited first!");
13842                 }
13843                 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
13844                 return nativeResponseValue;
13845         }
13846         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
13847         export function ReplyChannelRange_read(ser: Uint8Array): number {
13848                 if(!isWasmInitialized) {
13849                         throw new Error("initializeWasm() must be awaited first!");
13850                 }
13851                 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
13852                 return nativeResponseValue;
13853         }
13854         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
13855         export function ReplyChannelRange_write(obj: number): Uint8Array {
13856                 if(!isWasmInitialized) {
13857                         throw new Error("initializeWasm() must be awaited first!");
13858                 }
13859                 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
13860                 return decodeArray(nativeResponseValue);
13861         }
13862         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
13863         export function GossipTimestampFilter_write(obj: number): Uint8Array {
13864                 if(!isWasmInitialized) {
13865                         throw new Error("initializeWasm() must be awaited first!");
13866                 }
13867                 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
13868                 return decodeArray(nativeResponseValue);
13869         }
13870         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
13871         export function GossipTimestampFilter_read(ser: Uint8Array): number {
13872                 if(!isWasmInitialized) {
13873                         throw new Error("initializeWasm() must be awaited first!");
13874                 }
13875                 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
13876                 return nativeResponseValue;
13877         }
13878         // void CustomMessageHandler_free(struct LDKCustomMessageHandler this_ptr);
13879         export function CustomMessageHandler_free(this_ptr: number): void {
13880                 if(!isWasmInitialized) {
13881                         throw new Error("initializeWasm() must be awaited first!");
13882                 }
13883                 const nativeResponseValue = wasm.CustomMessageHandler_free(this_ptr);
13884                 // debug statements here
13885         }
13886         // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
13887         export function IgnoringMessageHandler_free(this_obj: number): void {
13888                 if(!isWasmInitialized) {
13889                         throw new Error("initializeWasm() must be awaited first!");
13890                 }
13891                 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
13892                 // debug statements here
13893         }
13894         // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
13895         export function IgnoringMessageHandler_new(): number {
13896                 if(!isWasmInitialized) {
13897                         throw new Error("initializeWasm() must be awaited first!");
13898                 }
13899                 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
13900                 return nativeResponseValue;
13901         }
13902         // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
13903         export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
13904                 if(!isWasmInitialized) {
13905                         throw new Error("initializeWasm() must be awaited first!");
13906                 }
13907                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
13908                 return nativeResponseValue;
13909         }
13910         // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
13911         export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
13912                 if(!isWasmInitialized) {
13913                         throw new Error("initializeWasm() must be awaited first!");
13914                 }
13915                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
13916                 return nativeResponseValue;
13917         }
13918         // struct LDKCustomMessageReader IgnoringMessageHandler_as_CustomMessageReader(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
13919         export function IgnoringMessageHandler_as_CustomMessageReader(this_arg: number): number {
13920                 if(!isWasmInitialized) {
13921                         throw new Error("initializeWasm() must be awaited first!");
13922                 }
13923                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_CustomMessageReader(this_arg);
13924                 return nativeResponseValue;
13925         }
13926         // struct LDKCustomMessageHandler IgnoringMessageHandler_as_CustomMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
13927         export function IgnoringMessageHandler_as_CustomMessageHandler(this_arg: number): number {
13928                 if(!isWasmInitialized) {
13929                         throw new Error("initializeWasm() must be awaited first!");
13930                 }
13931                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_CustomMessageHandler(this_arg);
13932                 return nativeResponseValue;
13933         }
13934         // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
13935         export function ErroringMessageHandler_free(this_obj: number): void {
13936                 if(!isWasmInitialized) {
13937                         throw new Error("initializeWasm() must be awaited first!");
13938                 }
13939                 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
13940                 // debug statements here
13941         }
13942         // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
13943         export function ErroringMessageHandler_new(): number {
13944                 if(!isWasmInitialized) {
13945                         throw new Error("initializeWasm() must be awaited first!");
13946                 }
13947                 const nativeResponseValue = wasm.ErroringMessageHandler_new();
13948                 return nativeResponseValue;
13949         }
13950         // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
13951         export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
13952                 if(!isWasmInitialized) {
13953                         throw new Error("initializeWasm() must be awaited first!");
13954                 }
13955                 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
13956                 return nativeResponseValue;
13957         }
13958         // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
13959         export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
13960                 if(!isWasmInitialized) {
13961                         throw new Error("initializeWasm() must be awaited first!");
13962                 }
13963                 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
13964                 return nativeResponseValue;
13965         }
13966         // void MessageHandler_free(struct LDKMessageHandler this_obj);
13967         export function MessageHandler_free(this_obj: number): void {
13968                 if(!isWasmInitialized) {
13969                         throw new Error("initializeWasm() must be awaited first!");
13970                 }
13971                 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
13972                 // debug statements here
13973         }
13974         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
13975         export function MessageHandler_get_chan_handler(this_ptr: number): number {
13976                 if(!isWasmInitialized) {
13977                         throw new Error("initializeWasm() must be awaited first!");
13978                 }
13979                 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
13980                 return nativeResponseValue;
13981         }
13982         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
13983         export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
13984                 if(!isWasmInitialized) {
13985                         throw new Error("initializeWasm() must be awaited first!");
13986                 }
13987                 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
13988                 // debug statements here
13989         }
13990         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
13991         export function MessageHandler_get_route_handler(this_ptr: number): number {
13992                 if(!isWasmInitialized) {
13993                         throw new Error("initializeWasm() must be awaited first!");
13994                 }
13995                 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
13996                 return nativeResponseValue;
13997         }
13998         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
13999         export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
14000                 if(!isWasmInitialized) {
14001                         throw new Error("initializeWasm() must be awaited first!");
14002                 }
14003                 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
14004                 // debug statements here
14005         }
14006         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
14007         export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
14008                 if(!isWasmInitialized) {
14009                         throw new Error("initializeWasm() must be awaited first!");
14010                 }
14011                 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
14012                 return nativeResponseValue;
14013         }
14014         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
14015         export function SocketDescriptor_clone(orig: number): number {
14016                 if(!isWasmInitialized) {
14017                         throw new Error("initializeWasm() must be awaited first!");
14018                 }
14019                 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
14020                 return nativeResponseValue;
14021         }
14022         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
14023         export function SocketDescriptor_free(this_ptr: number): void {
14024                 if(!isWasmInitialized) {
14025                         throw new Error("initializeWasm() must be awaited first!");
14026                 }
14027                 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
14028                 // debug statements here
14029         }
14030         // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
14031         export function PeerHandleError_free(this_obj: number): void {
14032                 if(!isWasmInitialized) {
14033                         throw new Error("initializeWasm() must be awaited first!");
14034                 }
14035                 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
14036                 // debug statements here
14037         }
14038         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
14039         export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
14040                 if(!isWasmInitialized) {
14041                         throw new Error("initializeWasm() must be awaited first!");
14042                 }
14043                 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
14044                 return nativeResponseValue;
14045         }
14046         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
14047         export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
14048                 if(!isWasmInitialized) {
14049                         throw new Error("initializeWasm() must be awaited first!");
14050                 }
14051                 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
14052                 // debug statements here
14053         }
14054         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
14055         export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
14056                 if(!isWasmInitialized) {
14057                         throw new Error("initializeWasm() must be awaited first!");
14058                 }
14059                 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
14060                 return nativeResponseValue;
14061         }
14062         // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
14063         export function PeerHandleError_clone(orig: number): number {
14064                 if(!isWasmInitialized) {
14065                         throw new Error("initializeWasm() must be awaited first!");
14066                 }
14067                 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
14068                 return nativeResponseValue;
14069         }
14070         // void PeerManager_free(struct LDKPeerManager this_obj);
14071         export function PeerManager_free(this_obj: number): void {
14072                 if(!isWasmInitialized) {
14073                         throw new Error("initializeWasm() must be awaited first!");
14074                 }
14075                 const nativeResponseValue = wasm.PeerManager_free(this_obj);
14076                 // debug statements here
14077         }
14078         // 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);
14079         export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number, custom_message_handler: number): number {
14080                 if(!isWasmInitialized) {
14081                         throw new Error("initializeWasm() must be awaited first!");
14082                 }
14083                 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger, custom_message_handler);
14084                 return nativeResponseValue;
14085         }
14086         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
14087         export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
14088                 if(!isWasmInitialized) {
14089                         throw new Error("initializeWasm() must be awaited first!");
14090                 }
14091                 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
14092                 return nativeResponseValue;
14093         }
14094         // 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);
14095         export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
14096                 if(!isWasmInitialized) {
14097                         throw new Error("initializeWasm() must be awaited first!");
14098                 }
14099                 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
14100                 return nativeResponseValue;
14101         }
14102         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
14103         export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
14104                 if(!isWasmInitialized) {
14105                         throw new Error("initializeWasm() must be awaited first!");
14106                 }
14107                 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
14108                 return nativeResponseValue;
14109         }
14110         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
14111         export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
14112                 if(!isWasmInitialized) {
14113                         throw new Error("initializeWasm() must be awaited first!");
14114                 }
14115                 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
14116                 return nativeResponseValue;
14117         }
14118         // 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);
14119         export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
14120                 if(!isWasmInitialized) {
14121                         throw new Error("initializeWasm() must be awaited first!");
14122                 }
14123                 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
14124                 return nativeResponseValue;
14125         }
14126         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
14127         export function PeerManager_process_events(this_arg: number): void {
14128                 if(!isWasmInitialized) {
14129                         throw new Error("initializeWasm() must be awaited first!");
14130                 }
14131                 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
14132                 // debug statements here
14133         }
14134         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
14135         export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
14136                 if(!isWasmInitialized) {
14137                         throw new Error("initializeWasm() must be awaited first!");
14138                 }
14139                 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
14140                 // debug statements here
14141         }
14142         // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
14143         export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
14144                 if(!isWasmInitialized) {
14145                         throw new Error("initializeWasm() must be awaited first!");
14146                 }
14147                 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
14148                 // debug statements here
14149         }
14150         // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
14151         export function PeerManager_timer_tick_occurred(this_arg: number): void {
14152                 if(!isWasmInitialized) {
14153                         throw new Error("initializeWasm() must be awaited first!");
14154                 }
14155                 const nativeResponseValue = wasm.PeerManager_timer_tick_occurred(this_arg);
14156                 // debug statements here
14157         }
14158         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
14159         export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
14160                 if(!isWasmInitialized) {
14161                         throw new Error("initializeWasm() must be awaited first!");
14162                 }
14163                 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
14164                 return decodeArray(nativeResponseValue);
14165         }
14166         // 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);
14167         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 {
14168                 if(!isWasmInitialized) {
14169                         throw new Error("initializeWasm() must be awaited first!");
14170                 }
14171                 const nativeResponseValue = wasm.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, encodeArray(to_holder_script), encodeArray(to_counterparty_script), funding_outpoint);
14172                 return decodeArray(nativeResponseValue);
14173         }
14174         // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
14175         export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
14176                 if(!isWasmInitialized) {
14177                         throw new Error("initializeWasm() must be awaited first!");
14178                 }
14179                 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
14180                 return nativeResponseValue;
14181         }
14182         // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
14183         export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
14184                 if(!isWasmInitialized) {
14185                         throw new Error("initializeWasm() must be awaited first!");
14186                 }
14187                 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
14188                 return nativeResponseValue;
14189         }
14190         // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
14191         export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
14192                 if(!isWasmInitialized) {
14193                         throw new Error("initializeWasm() must be awaited first!");
14194                 }
14195                 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
14196                 return nativeResponseValue;
14197         }
14198         // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
14199         export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
14200                 if(!isWasmInitialized) {
14201                         throw new Error("initializeWasm() must be awaited first!");
14202                 }
14203                 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
14204                 return nativeResponseValue;
14205         }
14206         // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
14207         export function TxCreationKeys_free(this_obj: number): void {
14208                 if(!isWasmInitialized) {
14209                         throw new Error("initializeWasm() must be awaited first!");
14210                 }
14211                 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
14212                 // debug statements here
14213         }
14214         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
14215         export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
14216                 if(!isWasmInitialized) {
14217                         throw new Error("initializeWasm() must be awaited first!");
14218                 }
14219                 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
14220                 return decodeArray(nativeResponseValue);
14221         }
14222         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14223         export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
14224                 if(!isWasmInitialized) {
14225                         throw new Error("initializeWasm() must be awaited first!");
14226                 }
14227                 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
14228                 // debug statements here
14229         }
14230         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
14231         export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
14232                 if(!isWasmInitialized) {
14233                         throw new Error("initializeWasm() must be awaited first!");
14234                 }
14235                 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
14236                 return decodeArray(nativeResponseValue);
14237         }
14238         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14239         export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
14240                 if(!isWasmInitialized) {
14241                         throw new Error("initializeWasm() must be awaited first!");
14242                 }
14243                 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
14244                 // debug statements here
14245         }
14246         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
14247         export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
14248                 if(!isWasmInitialized) {
14249                         throw new Error("initializeWasm() must be awaited first!");
14250                 }
14251                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
14252                 return decodeArray(nativeResponseValue);
14253         }
14254         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14255         export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
14256                 if(!isWasmInitialized) {
14257                         throw new Error("initializeWasm() must be awaited first!");
14258                 }
14259                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
14260                 // debug statements here
14261         }
14262         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
14263         export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
14264                 if(!isWasmInitialized) {
14265                         throw new Error("initializeWasm() must be awaited first!");
14266                 }
14267                 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
14268                 return decodeArray(nativeResponseValue);
14269         }
14270         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14271         export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
14272                 if(!isWasmInitialized) {
14273                         throw new Error("initializeWasm() must be awaited first!");
14274                 }
14275                 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
14276                 // debug statements here
14277         }
14278         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
14279         export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
14280                 if(!isWasmInitialized) {
14281                         throw new Error("initializeWasm() must be awaited first!");
14282                 }
14283                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
14284                 return decodeArray(nativeResponseValue);
14285         }
14286         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14287         export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
14288                 if(!isWasmInitialized) {
14289                         throw new Error("initializeWasm() must be awaited first!");
14290                 }
14291                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
14292                 // debug statements here
14293         }
14294         // 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);
14295         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 {
14296                 if(!isWasmInitialized) {
14297                         throw new Error("initializeWasm() must be awaited first!");
14298                 }
14299                 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));
14300                 return nativeResponseValue;
14301         }
14302         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
14303         export function TxCreationKeys_clone(orig: number): number {
14304                 if(!isWasmInitialized) {
14305                         throw new Error("initializeWasm() must be awaited first!");
14306                 }
14307                 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
14308                 return nativeResponseValue;
14309         }
14310         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
14311         export function TxCreationKeys_write(obj: number): Uint8Array {
14312                 if(!isWasmInitialized) {
14313                         throw new Error("initializeWasm() must be awaited first!");
14314                 }
14315                 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
14316                 return decodeArray(nativeResponseValue);
14317         }
14318         // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
14319         export function TxCreationKeys_read(ser: Uint8Array): number {
14320                 if(!isWasmInitialized) {
14321                         throw new Error("initializeWasm() must be awaited first!");
14322                 }
14323                 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
14324                 return nativeResponseValue;
14325         }
14326         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
14327         export function ChannelPublicKeys_free(this_obj: number): void {
14328                 if(!isWasmInitialized) {
14329                         throw new Error("initializeWasm() must be awaited first!");
14330                 }
14331                 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
14332                 // debug statements here
14333         }
14334         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
14335         export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
14336                 if(!isWasmInitialized) {
14337                         throw new Error("initializeWasm() must be awaited first!");
14338                 }
14339                 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
14340                 return decodeArray(nativeResponseValue);
14341         }
14342         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14343         export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
14344                 if(!isWasmInitialized) {
14345                         throw new Error("initializeWasm() must be awaited first!");
14346                 }
14347                 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
14348                 // debug statements here
14349         }
14350         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
14351         export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
14352                 if(!isWasmInitialized) {
14353                         throw new Error("initializeWasm() must be awaited first!");
14354                 }
14355                 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
14356                 return decodeArray(nativeResponseValue);
14357         }
14358         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14359         export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
14360                 if(!isWasmInitialized) {
14361                         throw new Error("initializeWasm() must be awaited first!");
14362                 }
14363                 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
14364                 // debug statements here
14365         }
14366         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
14367         export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
14368                 if(!isWasmInitialized) {
14369                         throw new Error("initializeWasm() must be awaited first!");
14370                 }
14371                 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
14372                 return decodeArray(nativeResponseValue);
14373         }
14374         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14375         export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
14376                 if(!isWasmInitialized) {
14377                         throw new Error("initializeWasm() must be awaited first!");
14378                 }
14379                 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
14380                 // debug statements here
14381         }
14382         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
14383         export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
14384                 if(!isWasmInitialized) {
14385                         throw new Error("initializeWasm() must be awaited first!");
14386                 }
14387                 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
14388                 return decodeArray(nativeResponseValue);
14389         }
14390         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14391         export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
14392                 if(!isWasmInitialized) {
14393                         throw new Error("initializeWasm() must be awaited first!");
14394                 }
14395                 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
14396                 // debug statements here
14397         }
14398         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
14399         export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
14400                 if(!isWasmInitialized) {
14401                         throw new Error("initializeWasm() must be awaited first!");
14402                 }
14403                 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
14404                 return decodeArray(nativeResponseValue);
14405         }
14406         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14407         export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
14408                 if(!isWasmInitialized) {
14409                         throw new Error("initializeWasm() must be awaited first!");
14410                 }
14411                 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
14412                 // debug statements here
14413         }
14414         // 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);
14415         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 {
14416                 if(!isWasmInitialized) {
14417                         throw new Error("initializeWasm() must be awaited first!");
14418                 }
14419                 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));
14420                 return nativeResponseValue;
14421         }
14422         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
14423         export function ChannelPublicKeys_clone(orig: number): number {
14424                 if(!isWasmInitialized) {
14425                         throw new Error("initializeWasm() must be awaited first!");
14426                 }
14427                 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
14428                 return nativeResponseValue;
14429         }
14430         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
14431         export function ChannelPublicKeys_write(obj: number): Uint8Array {
14432                 if(!isWasmInitialized) {
14433                         throw new Error("initializeWasm() must be awaited first!");
14434                 }
14435                 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
14436                 return decodeArray(nativeResponseValue);
14437         }
14438         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
14439         export function ChannelPublicKeys_read(ser: Uint8Array): number {
14440                 if(!isWasmInitialized) {
14441                         throw new Error("initializeWasm() must be awaited first!");
14442                 }
14443                 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
14444                 return nativeResponseValue;
14445         }
14446         // 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);
14447         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 {
14448                 if(!isWasmInitialized) {
14449                         throw new Error("initializeWasm() must be awaited first!");
14450                 }
14451                 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));
14452                 return nativeResponseValue;
14453         }
14454         // 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);
14455         export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
14456                 if(!isWasmInitialized) {
14457                         throw new Error("initializeWasm() must be awaited first!");
14458                 }
14459                 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
14460                 return nativeResponseValue;
14461         }
14462         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
14463         export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
14464                 if(!isWasmInitialized) {
14465                         throw new Error("initializeWasm() must be awaited first!");
14466                 }
14467                 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
14468                 return decodeArray(nativeResponseValue);
14469         }
14470         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
14471         export function HTLCOutputInCommitment_free(this_obj: number): void {
14472                 if(!isWasmInitialized) {
14473                         throw new Error("initializeWasm() must be awaited first!");
14474                 }
14475                 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
14476                 // debug statements here
14477         }
14478         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
14479         export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
14480                 if(!isWasmInitialized) {
14481                         throw new Error("initializeWasm() must be awaited first!");
14482                 }
14483                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
14484                 return nativeResponseValue;
14485         }
14486         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
14487         export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
14488                 if(!isWasmInitialized) {
14489                         throw new Error("initializeWasm() must be awaited first!");
14490                 }
14491                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
14492                 // debug statements here
14493         }
14494         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
14495         export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
14496                 if(!isWasmInitialized) {
14497                         throw new Error("initializeWasm() must be awaited first!");
14498                 }
14499                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
14500                 return nativeResponseValue;
14501         }
14502         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
14503         export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
14504                 if(!isWasmInitialized) {
14505                         throw new Error("initializeWasm() must be awaited first!");
14506                 }
14507                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
14508                 // debug statements here
14509         }
14510         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
14511         export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
14512                 if(!isWasmInitialized) {
14513                         throw new Error("initializeWasm() must be awaited first!");
14514                 }
14515                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
14516                 return nativeResponseValue;
14517         }
14518         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
14519         export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
14520                 if(!isWasmInitialized) {
14521                         throw new Error("initializeWasm() must be awaited first!");
14522                 }
14523                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
14524                 // debug statements here
14525         }
14526         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
14527         export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
14528                 if(!isWasmInitialized) {
14529                         throw new Error("initializeWasm() must be awaited first!");
14530                 }
14531                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
14532                 return decodeArray(nativeResponseValue);
14533         }
14534         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14535         export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
14536                 if(!isWasmInitialized) {
14537                         throw new Error("initializeWasm() must be awaited first!");
14538                 }
14539                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
14540                 // debug statements here
14541         }
14542         // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
14543         export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
14544                 if(!isWasmInitialized) {
14545                         throw new Error("initializeWasm() must be awaited first!");
14546                 }
14547                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
14548                 return nativeResponseValue;
14549         }
14550         // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
14551         export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
14552                 if(!isWasmInitialized) {
14553                         throw new Error("initializeWasm() must be awaited first!");
14554                 }
14555                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
14556                 // debug statements here
14557         }
14558         // 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);
14559         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 {
14560                 if(!isWasmInitialized) {
14561                         throw new Error("initializeWasm() must be awaited first!");
14562                 }
14563                 const nativeResponseValue = wasm.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeArray(payment_hash_arg), transaction_output_index_arg);
14564                 return nativeResponseValue;
14565         }
14566         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
14567         export function HTLCOutputInCommitment_clone(orig: number): number {
14568                 if(!isWasmInitialized) {
14569                         throw new Error("initializeWasm() must be awaited first!");
14570                 }
14571                 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
14572                 return nativeResponseValue;
14573         }
14574         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
14575         export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
14576                 if(!isWasmInitialized) {
14577                         throw new Error("initializeWasm() must be awaited first!");
14578                 }
14579                 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
14580                 return decodeArray(nativeResponseValue);
14581         }
14582         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
14583         export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
14584                 if(!isWasmInitialized) {
14585                         throw new Error("initializeWasm() must be awaited first!");
14586                 }
14587                 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
14588                 return nativeResponseValue;
14589         }
14590         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
14591         export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
14592                 if(!isWasmInitialized) {
14593                         throw new Error("initializeWasm() must be awaited first!");
14594                 }
14595                 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
14596                 return decodeArray(nativeResponseValue);
14597         }
14598         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
14599         export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
14600                 if(!isWasmInitialized) {
14601                         throw new Error("initializeWasm() must be awaited first!");
14602                 }
14603                 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
14604                 return decodeArray(nativeResponseValue);
14605         }
14606         // 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);
14607         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 {
14608                 if(!isWasmInitialized) {
14609                         throw new Error("initializeWasm() must be awaited first!");
14610                 }
14611                 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(commitment_txid), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
14612                 return decodeArray(nativeResponseValue);
14613         }
14614         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
14615         export function ChannelTransactionParameters_free(this_obj: number): void {
14616                 if(!isWasmInitialized) {
14617                         throw new Error("initializeWasm() must be awaited first!");
14618                 }
14619                 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
14620                 // debug statements here
14621         }
14622         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14623         export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
14624                 if(!isWasmInitialized) {
14625                         throw new Error("initializeWasm() must be awaited first!");
14626                 }
14627                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
14628                 return nativeResponseValue;
14629         }
14630         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
14631         export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
14632                 if(!isWasmInitialized) {
14633                         throw new Error("initializeWasm() must be awaited first!");
14634                 }
14635                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
14636                 // debug statements here
14637         }
14638         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14639         export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
14640                 if(!isWasmInitialized) {
14641                         throw new Error("initializeWasm() must be awaited first!");
14642                 }
14643                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
14644                 return nativeResponseValue;
14645         }
14646         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
14647         export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
14648                 if(!isWasmInitialized) {
14649                         throw new Error("initializeWasm() must be awaited first!");
14650                 }
14651                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
14652                 // debug statements here
14653         }
14654         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14655         export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
14656                 if(!isWasmInitialized) {
14657                         throw new Error("initializeWasm() must be awaited first!");
14658                 }
14659                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
14660                 return nativeResponseValue;
14661         }
14662         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
14663         export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
14664                 if(!isWasmInitialized) {
14665                         throw new Error("initializeWasm() must be awaited first!");
14666                 }
14667                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
14668                 // debug statements here
14669         }
14670         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14671         export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
14672                 if(!isWasmInitialized) {
14673                         throw new Error("initializeWasm() must be awaited first!");
14674                 }
14675                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
14676                 return nativeResponseValue;
14677         }
14678         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
14679         export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
14680                 if(!isWasmInitialized) {
14681                         throw new Error("initializeWasm() must be awaited first!");
14682                 }
14683                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
14684                 // debug statements here
14685         }
14686         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14687         export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
14688                 if(!isWasmInitialized) {
14689                         throw new Error("initializeWasm() must be awaited first!");
14690                 }
14691                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
14692                 return nativeResponseValue;
14693         }
14694         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
14695         export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
14696                 if(!isWasmInitialized) {
14697                         throw new Error("initializeWasm() must be awaited first!");
14698                 }
14699                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
14700                 // debug statements here
14701         }
14702         // 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);
14703         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 {
14704                 if(!isWasmInitialized) {
14705                         throw new Error("initializeWasm() must be awaited first!");
14706                 }
14707                 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
14708                 return nativeResponseValue;
14709         }
14710         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
14711         export function ChannelTransactionParameters_clone(orig: number): number {
14712                 if(!isWasmInitialized) {
14713                         throw new Error("initializeWasm() must be awaited first!");
14714                 }
14715                 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
14716                 return nativeResponseValue;
14717         }
14718         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
14719         export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
14720                 if(!isWasmInitialized) {
14721                         throw new Error("initializeWasm() must be awaited first!");
14722                 }
14723                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
14724                 // debug statements here
14725         }
14726         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
14727         export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
14728                 if(!isWasmInitialized) {
14729                         throw new Error("initializeWasm() must be awaited first!");
14730                 }
14731                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
14732                 return nativeResponseValue;
14733         }
14734         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
14735         export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
14736                 if(!isWasmInitialized) {
14737                         throw new Error("initializeWasm() must be awaited first!");
14738                 }
14739                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
14740                 // debug statements here
14741         }
14742         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
14743         export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
14744                 if(!isWasmInitialized) {
14745                         throw new Error("initializeWasm() must be awaited first!");
14746                 }
14747                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
14748                 return nativeResponseValue;
14749         }
14750         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
14751         export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
14752                 if(!isWasmInitialized) {
14753                         throw new Error("initializeWasm() must be awaited first!");
14754                 }
14755                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
14756                 // debug statements here
14757         }
14758         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
14759         export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
14760                 if(!isWasmInitialized) {
14761                         throw new Error("initializeWasm() must be awaited first!");
14762                 }
14763                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
14764                 return nativeResponseValue;
14765         }
14766         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
14767         export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
14768                 if(!isWasmInitialized) {
14769                         throw new Error("initializeWasm() must be awaited first!");
14770                 }
14771                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
14772                 return nativeResponseValue;
14773         }
14774         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
14775         export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
14776                 if(!isWasmInitialized) {
14777                         throw new Error("initializeWasm() must be awaited first!");
14778                 }
14779                 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
14780                 return nativeResponseValue;
14781         }
14782         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
14783         export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
14784                 if(!isWasmInitialized) {
14785                         throw new Error("initializeWasm() must be awaited first!");
14786                 }
14787                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
14788                 return nativeResponseValue;
14789         }
14790         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
14791         export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
14792                 if(!isWasmInitialized) {
14793                         throw new Error("initializeWasm() must be awaited first!");
14794                 }
14795                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
14796                 return nativeResponseValue;
14797         }
14798         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
14799         export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
14800                 if(!isWasmInitialized) {
14801                         throw new Error("initializeWasm() must be awaited first!");
14802                 }
14803                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
14804                 return decodeArray(nativeResponseValue);
14805         }
14806         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
14807         export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
14808                 if(!isWasmInitialized) {
14809                         throw new Error("initializeWasm() must be awaited first!");
14810                 }
14811                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
14812                 return nativeResponseValue;
14813         }
14814         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
14815         export function ChannelTransactionParameters_write(obj: number): Uint8Array {
14816                 if(!isWasmInitialized) {
14817                         throw new Error("initializeWasm() must be awaited first!");
14818                 }
14819                 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
14820                 return decodeArray(nativeResponseValue);
14821         }
14822         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
14823         export function ChannelTransactionParameters_read(ser: Uint8Array): number {
14824                 if(!isWasmInitialized) {
14825                         throw new Error("initializeWasm() must be awaited first!");
14826                 }
14827                 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
14828                 return nativeResponseValue;
14829         }
14830         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
14831         export function DirectedChannelTransactionParameters_free(this_obj: number): void {
14832                 if(!isWasmInitialized) {
14833                         throw new Error("initializeWasm() must be awaited first!");
14834                 }
14835                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
14836                 // debug statements here
14837         }
14838         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14839         export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
14840                 if(!isWasmInitialized) {
14841                         throw new Error("initializeWasm() must be awaited first!");
14842                 }
14843                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
14844                 return nativeResponseValue;
14845         }
14846         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14847         export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
14848                 if(!isWasmInitialized) {
14849                         throw new Error("initializeWasm() must be awaited first!");
14850                 }
14851                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
14852                 return nativeResponseValue;
14853         }
14854         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14855         export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
14856                 if(!isWasmInitialized) {
14857                         throw new Error("initializeWasm() must be awaited first!");
14858                 }
14859                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
14860                 return nativeResponseValue;
14861         }
14862         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14863         export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
14864                 if(!isWasmInitialized) {
14865                         throw new Error("initializeWasm() must be awaited first!");
14866                 }
14867                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
14868                 return nativeResponseValue;
14869         }
14870         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14871         export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
14872                 if(!isWasmInitialized) {
14873                         throw new Error("initializeWasm() must be awaited first!");
14874                 }
14875                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
14876                 return nativeResponseValue;
14877         }
14878         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
14879         export function HolderCommitmentTransaction_free(this_obj: number): void {
14880                 if(!isWasmInitialized) {
14881                         throw new Error("initializeWasm() must be awaited first!");
14882                 }
14883                 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
14884                 // debug statements here
14885         }
14886         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
14887         export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
14888                 if(!isWasmInitialized) {
14889                         throw new Error("initializeWasm() must be awaited first!");
14890                 }
14891                 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
14892                 return decodeArray(nativeResponseValue);
14893         }
14894         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
14895         export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
14896                 if(!isWasmInitialized) {
14897                         throw new Error("initializeWasm() must be awaited first!");
14898                 }
14899                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
14900                 // debug statements here
14901         }
14902         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
14903         export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
14904                 if(!isWasmInitialized) {
14905                         throw new Error("initializeWasm() must be awaited first!");
14906                 }
14907                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
14908                 // debug statements here
14909         }
14910         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
14911         export function HolderCommitmentTransaction_clone(orig: number): number {
14912                 if(!isWasmInitialized) {
14913                         throw new Error("initializeWasm() must be awaited first!");
14914                 }
14915                 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
14916                 return nativeResponseValue;
14917         }
14918         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
14919         export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
14920                 if(!isWasmInitialized) {
14921                         throw new Error("initializeWasm() must be awaited first!");
14922                 }
14923                 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
14924                 return decodeArray(nativeResponseValue);
14925         }
14926         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
14927         export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
14928                 if(!isWasmInitialized) {
14929                         throw new Error("initializeWasm() must be awaited first!");
14930                 }
14931                 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
14932                 return nativeResponseValue;
14933         }
14934         // 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);
14935         export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
14936                 if(!isWasmInitialized) {
14937                         throw new Error("initializeWasm() must be awaited first!");
14938                 }
14939                 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
14940                 return nativeResponseValue;
14941         }
14942         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
14943         export function BuiltCommitmentTransaction_free(this_obj: number): void {
14944                 if(!isWasmInitialized) {
14945                         throw new Error("initializeWasm() must be awaited first!");
14946                 }
14947                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
14948                 // debug statements here
14949         }
14950         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
14951         export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
14952                 if(!isWasmInitialized) {
14953                         throw new Error("initializeWasm() must be awaited first!");
14954                 }
14955                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
14956                 return decodeArray(nativeResponseValue);
14957         }
14958         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
14959         export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
14960                 if(!isWasmInitialized) {
14961                         throw new Error("initializeWasm() must be awaited first!");
14962                 }
14963                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
14964                 // debug statements here
14965         }
14966         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
14967         export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
14968                 if(!isWasmInitialized) {
14969                         throw new Error("initializeWasm() must be awaited first!");
14970                 }
14971                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
14972                 return decodeArray(nativeResponseValue);
14973         }
14974         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14975         export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
14976                 if(!isWasmInitialized) {
14977                         throw new Error("initializeWasm() must be awaited first!");
14978                 }
14979                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
14980                 // debug statements here
14981         }
14982         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
14983         export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
14984                 if(!isWasmInitialized) {
14985                         throw new Error("initializeWasm() must be awaited first!");
14986                 }
14987                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
14988                 return nativeResponseValue;
14989         }
14990         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
14991         export function BuiltCommitmentTransaction_clone(orig: number): number {
14992                 if(!isWasmInitialized) {
14993                         throw new Error("initializeWasm() must be awaited first!");
14994                 }
14995                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
14996                 return nativeResponseValue;
14997         }
14998         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
14999         export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
15000                 if(!isWasmInitialized) {
15001                         throw new Error("initializeWasm() must be awaited first!");
15002                 }
15003                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
15004                 return decodeArray(nativeResponseValue);
15005         }
15006         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
15007         export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
15008                 if(!isWasmInitialized) {
15009                         throw new Error("initializeWasm() must be awaited first!");
15010                 }
15011                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
15012                 return nativeResponseValue;
15013         }
15014         // 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);
15015         export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
15016                 if(!isWasmInitialized) {
15017                         throw new Error("initializeWasm() must be awaited first!");
15018                 }
15019                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
15020                 return decodeArray(nativeResponseValue);
15021         }
15022         // 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);
15023         export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
15024                 if(!isWasmInitialized) {
15025                         throw new Error("initializeWasm() must be awaited first!");
15026                 }
15027                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
15028                 return decodeArray(nativeResponseValue);
15029         }
15030         // void ClosingTransaction_free(struct LDKClosingTransaction this_obj);
15031         export function ClosingTransaction_free(this_obj: number): void {
15032                 if(!isWasmInitialized) {
15033                         throw new Error("initializeWasm() must be awaited first!");
15034                 }
15035                 const nativeResponseValue = wasm.ClosingTransaction_free(this_obj);
15036                 // debug statements here
15037         }
15038         // 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);
15039         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 {
15040                 if(!isWasmInitialized) {
15041                         throw new Error("initializeWasm() must be awaited first!");
15042                 }
15043                 const nativeResponseValue = wasm.ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, encodeArray(to_holder_script), encodeArray(to_counterparty_script), funding_outpoint);
15044                 return nativeResponseValue;
15045         }
15046         // MUST_USE_RES struct LDKTrustedClosingTransaction ClosingTransaction_trust(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
15047         export function ClosingTransaction_trust(this_arg: number): number {
15048                 if(!isWasmInitialized) {
15049                         throw new Error("initializeWasm() must be awaited first!");
15050                 }
15051                 const nativeResponseValue = wasm.ClosingTransaction_trust(this_arg);
15052                 return nativeResponseValue;
15053         }
15054         // MUST_USE_RES struct LDKCResult_TrustedClosingTransactionNoneZ ClosingTransaction_verify(const struct LDKClosingTransaction *NONNULL_PTR this_arg, struct LDKOutPoint funding_outpoint);
15055         export function ClosingTransaction_verify(this_arg: number, funding_outpoint: number): number {
15056                 if(!isWasmInitialized) {
15057                         throw new Error("initializeWasm() must be awaited first!");
15058                 }
15059                 const nativeResponseValue = wasm.ClosingTransaction_verify(this_arg, funding_outpoint);
15060                 return nativeResponseValue;
15061         }
15062         // MUST_USE_RES uint64_t ClosingTransaction_to_holder_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
15063         export function ClosingTransaction_to_holder_value_sat(this_arg: number): number {
15064                 if(!isWasmInitialized) {
15065                         throw new Error("initializeWasm() must be awaited first!");
15066                 }
15067                 const nativeResponseValue = wasm.ClosingTransaction_to_holder_value_sat(this_arg);
15068                 return nativeResponseValue;
15069         }
15070         // MUST_USE_RES uint64_t ClosingTransaction_to_counterparty_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
15071         export function ClosingTransaction_to_counterparty_value_sat(this_arg: number): number {
15072                 if(!isWasmInitialized) {
15073                         throw new Error("initializeWasm() must be awaited first!");
15074                 }
15075                 const nativeResponseValue = wasm.ClosingTransaction_to_counterparty_value_sat(this_arg);
15076                 return nativeResponseValue;
15077         }
15078         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_holder_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
15079         export function ClosingTransaction_to_holder_script(this_arg: number): Uint8Array {
15080                 if(!isWasmInitialized) {
15081                         throw new Error("initializeWasm() must be awaited first!");
15082                 }
15083                 const nativeResponseValue = wasm.ClosingTransaction_to_holder_script(this_arg);
15084                 return decodeArray(nativeResponseValue);
15085         }
15086         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_counterparty_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
15087         export function ClosingTransaction_to_counterparty_script(this_arg: number): Uint8Array {
15088                 if(!isWasmInitialized) {
15089                         throw new Error("initializeWasm() must be awaited first!");
15090                 }
15091                 const nativeResponseValue = wasm.ClosingTransaction_to_counterparty_script(this_arg);
15092                 return decodeArray(nativeResponseValue);
15093         }
15094         // void TrustedClosingTransaction_free(struct LDKTrustedClosingTransaction this_obj);
15095         export function TrustedClosingTransaction_free(this_obj: number): void {
15096                 if(!isWasmInitialized) {
15097                         throw new Error("initializeWasm() must be awaited first!");
15098                 }
15099                 const nativeResponseValue = wasm.TrustedClosingTransaction_free(this_obj);
15100                 // debug statements here
15101         }
15102         // MUST_USE_RES struct LDKTransaction TrustedClosingTransaction_built_transaction(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg);
15103         export function TrustedClosingTransaction_built_transaction(this_arg: number): Uint8Array {
15104                 if(!isWasmInitialized) {
15105                         throw new Error("initializeWasm() must be awaited first!");
15106                 }
15107                 const nativeResponseValue = wasm.TrustedClosingTransaction_built_transaction(this_arg);
15108                 return decodeArray(nativeResponseValue);
15109         }
15110         // 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);
15111         export function TrustedClosingTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
15112                 if(!isWasmInitialized) {
15113                         throw new Error("initializeWasm() must be awaited first!");
15114                 }
15115                 const nativeResponseValue = wasm.TrustedClosingTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
15116                 return decodeArray(nativeResponseValue);
15117         }
15118         // 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);
15119         export function TrustedClosingTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
15120                 if(!isWasmInitialized) {
15121                         throw new Error("initializeWasm() must be awaited first!");
15122                 }
15123                 const nativeResponseValue = wasm.TrustedClosingTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
15124                 return decodeArray(nativeResponseValue);
15125         }
15126         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
15127         export function CommitmentTransaction_free(this_obj: number): void {
15128                 if(!isWasmInitialized) {
15129                         throw new Error("initializeWasm() must be awaited first!");
15130                 }
15131                 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
15132                 // debug statements here
15133         }
15134         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
15135         export function CommitmentTransaction_clone(orig: number): number {
15136                 if(!isWasmInitialized) {
15137                         throw new Error("initializeWasm() must be awaited first!");
15138                 }
15139                 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
15140                 return nativeResponseValue;
15141         }
15142         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
15143         export function CommitmentTransaction_write(obj: number): Uint8Array {
15144                 if(!isWasmInitialized) {
15145                         throw new Error("initializeWasm() must be awaited first!");
15146                 }
15147                 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
15148                 return decodeArray(nativeResponseValue);
15149         }
15150         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
15151         export function CommitmentTransaction_read(ser: Uint8Array): number {
15152                 if(!isWasmInitialized) {
15153                         throw new Error("initializeWasm() must be awaited first!");
15154                 }
15155                 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
15156                 return nativeResponseValue;
15157         }
15158         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
15159         export function CommitmentTransaction_commitment_number(this_arg: number): number {
15160                 if(!isWasmInitialized) {
15161                         throw new Error("initializeWasm() must be awaited first!");
15162                 }
15163                 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
15164                 return nativeResponseValue;
15165         }
15166         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
15167         export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
15168                 if(!isWasmInitialized) {
15169                         throw new Error("initializeWasm() must be awaited first!");
15170                 }
15171                 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
15172                 return nativeResponseValue;
15173         }
15174         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
15175         export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
15176                 if(!isWasmInitialized) {
15177                         throw new Error("initializeWasm() must be awaited first!");
15178                 }
15179                 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
15180                 return nativeResponseValue;
15181         }
15182         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
15183         export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
15184                 if(!isWasmInitialized) {
15185                         throw new Error("initializeWasm() must be awaited first!");
15186                 }
15187                 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
15188                 return nativeResponseValue;
15189         }
15190         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
15191         export function CommitmentTransaction_trust(this_arg: number): number {
15192                 if(!isWasmInitialized) {
15193                         throw new Error("initializeWasm() must be awaited first!");
15194                 }
15195                 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
15196                 return nativeResponseValue;
15197         }
15198         // 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);
15199         export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
15200                 if(!isWasmInitialized) {
15201                         throw new Error("initializeWasm() must be awaited first!");
15202                 }
15203                 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
15204                 return nativeResponseValue;
15205         }
15206         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
15207         export function TrustedCommitmentTransaction_free(this_obj: number): void {
15208                 if(!isWasmInitialized) {
15209                         throw new Error("initializeWasm() must be awaited first!");
15210                 }
15211                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
15212                 // debug statements here
15213         }
15214         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
15215         export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
15216                 if(!isWasmInitialized) {
15217                         throw new Error("initializeWasm() must be awaited first!");
15218                 }
15219                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
15220                 return decodeArray(nativeResponseValue);
15221         }
15222         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
15223         export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
15224                 if(!isWasmInitialized) {
15225                         throw new Error("initializeWasm() must be awaited first!");
15226                 }
15227                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
15228                 return nativeResponseValue;
15229         }
15230         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
15231         export function TrustedCommitmentTransaction_keys(this_arg: number): number {
15232                 if(!isWasmInitialized) {
15233                         throw new Error("initializeWasm() must be awaited first!");
15234                 }
15235                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
15236                 return nativeResponseValue;
15237         }
15238         // 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);
15239         export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
15240                 if(!isWasmInitialized) {
15241                         throw new Error("initializeWasm() must be awaited first!");
15242                 }
15243                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
15244                 return nativeResponseValue;
15245         }
15246         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
15247         export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
15248                 if(!isWasmInitialized) {
15249                         throw new Error("initializeWasm() must be awaited first!");
15250                 }
15251                 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
15252                 return nativeResponseValue;
15253         }
15254         // bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b);
15255         export function InitFeatures_eq(a: number, b: number): boolean {
15256                 if(!isWasmInitialized) {
15257                         throw new Error("initializeWasm() must be awaited first!");
15258                 }
15259                 const nativeResponseValue = wasm.InitFeatures_eq(a, b);
15260                 return nativeResponseValue;
15261         }
15262         // bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b);
15263         export function NodeFeatures_eq(a: number, b: number): boolean {
15264                 if(!isWasmInitialized) {
15265                         throw new Error("initializeWasm() must be awaited first!");
15266                 }
15267                 const nativeResponseValue = wasm.NodeFeatures_eq(a, b);
15268                 return nativeResponseValue;
15269         }
15270         // bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b);
15271         export function ChannelFeatures_eq(a: number, b: number): boolean {
15272                 if(!isWasmInitialized) {
15273                         throw new Error("initializeWasm() must be awaited first!");
15274                 }
15275                 const nativeResponseValue = wasm.ChannelFeatures_eq(a, b);
15276                 return nativeResponseValue;
15277         }
15278         // bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b);
15279         export function InvoiceFeatures_eq(a: number, b: number): boolean {
15280                 if(!isWasmInitialized) {
15281                         throw new Error("initializeWasm() must be awaited first!");
15282                 }
15283                 const nativeResponseValue = wasm.InvoiceFeatures_eq(a, b);
15284                 return nativeResponseValue;
15285         }
15286         // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
15287         export function InitFeatures_clone(orig: number): number {
15288                 if(!isWasmInitialized) {
15289                         throw new Error("initializeWasm() must be awaited first!");
15290                 }
15291                 const nativeResponseValue = wasm.InitFeatures_clone(orig);
15292                 return nativeResponseValue;
15293         }
15294         // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
15295         export function NodeFeatures_clone(orig: number): number {
15296                 if(!isWasmInitialized) {
15297                         throw new Error("initializeWasm() must be awaited first!");
15298                 }
15299                 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
15300                 return nativeResponseValue;
15301         }
15302         // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
15303         export function ChannelFeatures_clone(orig: number): number {
15304                 if(!isWasmInitialized) {
15305                         throw new Error("initializeWasm() must be awaited first!");
15306                 }
15307                 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
15308                 return nativeResponseValue;
15309         }
15310         // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
15311         export function InvoiceFeatures_clone(orig: number): number {
15312                 if(!isWasmInitialized) {
15313                         throw new Error("initializeWasm() must be awaited first!");
15314                 }
15315                 const nativeResponseValue = wasm.InvoiceFeatures_clone(orig);
15316                 return nativeResponseValue;
15317         }
15318         // void InitFeatures_free(struct LDKInitFeatures this_obj);
15319         export function InitFeatures_free(this_obj: number): void {
15320                 if(!isWasmInitialized) {
15321                         throw new Error("initializeWasm() must be awaited first!");
15322                 }
15323                 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
15324                 // debug statements here
15325         }
15326         // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
15327         export function NodeFeatures_free(this_obj: number): void {
15328                 if(!isWasmInitialized) {
15329                         throw new Error("initializeWasm() must be awaited first!");
15330                 }
15331                 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
15332                 // debug statements here
15333         }
15334         // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
15335         export function ChannelFeatures_free(this_obj: number): void {
15336                 if(!isWasmInitialized) {
15337                         throw new Error("initializeWasm() must be awaited first!");
15338                 }
15339                 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
15340                 // debug statements here
15341         }
15342         // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
15343         export function InvoiceFeatures_free(this_obj: number): void {
15344                 if(!isWasmInitialized) {
15345                         throw new Error("initializeWasm() must be awaited first!");
15346                 }
15347                 const nativeResponseValue = wasm.InvoiceFeatures_free(this_obj);
15348                 // debug statements here
15349         }
15350         // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
15351         export function InitFeatures_empty(): number {
15352                 if(!isWasmInitialized) {
15353                         throw new Error("initializeWasm() must be awaited first!");
15354                 }
15355                 const nativeResponseValue = wasm.InitFeatures_empty();
15356                 return nativeResponseValue;
15357         }
15358         // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
15359         export function InitFeatures_known(): number {
15360                 if(!isWasmInitialized) {
15361                         throw new Error("initializeWasm() must be awaited first!");
15362                 }
15363                 const nativeResponseValue = wasm.InitFeatures_known();
15364                 return nativeResponseValue;
15365         }
15366         // MUST_USE_RES bool InitFeatures_requires_unknown_bits(const struct LDKInitFeatures *NONNULL_PTR this_arg);
15367         export function InitFeatures_requires_unknown_bits(this_arg: number): boolean {
15368                 if(!isWasmInitialized) {
15369                         throw new Error("initializeWasm() must be awaited first!");
15370                 }
15371                 const nativeResponseValue = wasm.InitFeatures_requires_unknown_bits(this_arg);
15372                 return nativeResponseValue;
15373         }
15374         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
15375         export function NodeFeatures_empty(): number {
15376                 if(!isWasmInitialized) {
15377                         throw new Error("initializeWasm() must be awaited first!");
15378                 }
15379                 const nativeResponseValue = wasm.NodeFeatures_empty();
15380                 return nativeResponseValue;
15381         }
15382         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
15383         export function NodeFeatures_known(): number {
15384                 if(!isWasmInitialized) {
15385                         throw new Error("initializeWasm() must be awaited first!");
15386                 }
15387                 const nativeResponseValue = wasm.NodeFeatures_known();
15388                 return nativeResponseValue;
15389         }
15390         // MUST_USE_RES bool NodeFeatures_requires_unknown_bits(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
15391         export function NodeFeatures_requires_unknown_bits(this_arg: number): boolean {
15392                 if(!isWasmInitialized) {
15393                         throw new Error("initializeWasm() must be awaited first!");
15394                 }
15395                 const nativeResponseValue = wasm.NodeFeatures_requires_unknown_bits(this_arg);
15396                 return nativeResponseValue;
15397         }
15398         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
15399         export function ChannelFeatures_empty(): number {
15400                 if(!isWasmInitialized) {
15401                         throw new Error("initializeWasm() must be awaited first!");
15402                 }
15403                 const nativeResponseValue = wasm.ChannelFeatures_empty();
15404                 return nativeResponseValue;
15405         }
15406         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
15407         export function ChannelFeatures_known(): number {
15408                 if(!isWasmInitialized) {
15409                         throw new Error("initializeWasm() must be awaited first!");
15410                 }
15411                 const nativeResponseValue = wasm.ChannelFeatures_known();
15412                 return nativeResponseValue;
15413         }
15414         // MUST_USE_RES bool ChannelFeatures_requires_unknown_bits(const struct LDKChannelFeatures *NONNULL_PTR this_arg);
15415         export function ChannelFeatures_requires_unknown_bits(this_arg: number): boolean {
15416                 if(!isWasmInitialized) {
15417                         throw new Error("initializeWasm() must be awaited first!");
15418                 }
15419                 const nativeResponseValue = wasm.ChannelFeatures_requires_unknown_bits(this_arg);
15420                 return nativeResponseValue;
15421         }
15422         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
15423         export function InvoiceFeatures_empty(): number {
15424                 if(!isWasmInitialized) {
15425                         throw new Error("initializeWasm() must be awaited first!");
15426                 }
15427                 const nativeResponseValue = wasm.InvoiceFeatures_empty();
15428                 return nativeResponseValue;
15429         }
15430         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
15431         export function InvoiceFeatures_known(): number {
15432                 if(!isWasmInitialized) {
15433                         throw new Error("initializeWasm() must be awaited first!");
15434                 }
15435                 const nativeResponseValue = wasm.InvoiceFeatures_known();
15436                 return nativeResponseValue;
15437         }
15438         // MUST_USE_RES bool InvoiceFeatures_requires_unknown_bits(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
15439         export function InvoiceFeatures_requires_unknown_bits(this_arg: number): boolean {
15440                 if(!isWasmInitialized) {
15441                         throw new Error("initializeWasm() must be awaited first!");
15442                 }
15443                 const nativeResponseValue = wasm.InvoiceFeatures_requires_unknown_bits(this_arg);
15444                 return nativeResponseValue;
15445         }
15446         // MUST_USE_RES bool InitFeatures_supports_payment_secret(const struct LDKInitFeatures *NONNULL_PTR this_arg);
15447         export function InitFeatures_supports_payment_secret(this_arg: number): boolean {
15448                 if(!isWasmInitialized) {
15449                         throw new Error("initializeWasm() must be awaited first!");
15450                 }
15451                 const nativeResponseValue = wasm.InitFeatures_supports_payment_secret(this_arg);
15452                 return nativeResponseValue;
15453         }
15454         // MUST_USE_RES bool NodeFeatures_supports_payment_secret(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
15455         export function NodeFeatures_supports_payment_secret(this_arg: number): boolean {
15456                 if(!isWasmInitialized) {
15457                         throw new Error("initializeWasm() must be awaited first!");
15458                 }
15459                 const nativeResponseValue = wasm.NodeFeatures_supports_payment_secret(this_arg);
15460                 return nativeResponseValue;
15461         }
15462         // MUST_USE_RES bool InvoiceFeatures_supports_payment_secret(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
15463         export function InvoiceFeatures_supports_payment_secret(this_arg: number): boolean {
15464                 if(!isWasmInitialized) {
15465                         throw new Error("initializeWasm() must be awaited first!");
15466                 }
15467                 const nativeResponseValue = wasm.InvoiceFeatures_supports_payment_secret(this_arg);
15468                 return nativeResponseValue;
15469         }
15470         // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
15471         export function InitFeatures_write(obj: number): Uint8Array {
15472                 if(!isWasmInitialized) {
15473                         throw new Error("initializeWasm() must be awaited first!");
15474                 }
15475                 const nativeResponseValue = wasm.InitFeatures_write(obj);
15476                 return decodeArray(nativeResponseValue);
15477         }
15478         // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
15479         export function NodeFeatures_write(obj: number): Uint8Array {
15480                 if(!isWasmInitialized) {
15481                         throw new Error("initializeWasm() must be awaited first!");
15482                 }
15483                 const nativeResponseValue = wasm.NodeFeatures_write(obj);
15484                 return decodeArray(nativeResponseValue);
15485         }
15486         // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
15487         export function ChannelFeatures_write(obj: number): Uint8Array {
15488                 if(!isWasmInitialized) {
15489                         throw new Error("initializeWasm() must be awaited first!");
15490                 }
15491                 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
15492                 return decodeArray(nativeResponseValue);
15493         }
15494         // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
15495         export function InvoiceFeatures_write(obj: number): Uint8Array {
15496                 if(!isWasmInitialized) {
15497                         throw new Error("initializeWasm() must be awaited first!");
15498                 }
15499                 const nativeResponseValue = wasm.InvoiceFeatures_write(obj);
15500                 return decodeArray(nativeResponseValue);
15501         }
15502         // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
15503         export function InitFeatures_read(ser: Uint8Array): number {
15504                 if(!isWasmInitialized) {
15505                         throw new Error("initializeWasm() must be awaited first!");
15506                 }
15507                 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
15508                 return nativeResponseValue;
15509         }
15510         // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
15511         export function NodeFeatures_read(ser: Uint8Array): number {
15512                 if(!isWasmInitialized) {
15513                         throw new Error("initializeWasm() must be awaited first!");
15514                 }
15515                 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
15516                 return nativeResponseValue;
15517         }
15518         // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
15519         export function ChannelFeatures_read(ser: Uint8Array): number {
15520                 if(!isWasmInitialized) {
15521                         throw new Error("initializeWasm() must be awaited first!");
15522                 }
15523                 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
15524                 return nativeResponseValue;
15525         }
15526         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
15527         export function InvoiceFeatures_read(ser: Uint8Array): number {
15528                 if(!isWasmInitialized) {
15529                         throw new Error("initializeWasm() must be awaited first!");
15530                 }
15531                 const nativeResponseValue = wasm.InvoiceFeatures_read(encodeArray(ser));
15532                 return nativeResponseValue;
15533         }
15534         // void ShutdownScript_free(struct LDKShutdownScript this_obj);
15535         export function ShutdownScript_free(this_obj: number): void {
15536                 if(!isWasmInitialized) {
15537                         throw new Error("initializeWasm() must be awaited first!");
15538                 }
15539                 const nativeResponseValue = wasm.ShutdownScript_free(this_obj);
15540                 // debug statements here
15541         }
15542         // struct LDKShutdownScript ShutdownScript_clone(const struct LDKShutdownScript *NONNULL_PTR orig);
15543         export function ShutdownScript_clone(orig: number): number {
15544                 if(!isWasmInitialized) {
15545                         throw new Error("initializeWasm() must be awaited first!");
15546                 }
15547                 const nativeResponseValue = wasm.ShutdownScript_clone(orig);
15548                 return nativeResponseValue;
15549         }
15550         // void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
15551         export function InvalidShutdownScript_free(this_obj: number): void {
15552                 if(!isWasmInitialized) {
15553                         throw new Error("initializeWasm() must be awaited first!");
15554                 }
15555                 const nativeResponseValue = wasm.InvalidShutdownScript_free(this_obj);
15556                 // debug statements here
15557         }
15558         // struct LDKu8slice InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
15559         export function InvalidShutdownScript_get_script(this_ptr: number): Uint8Array {
15560                 if(!isWasmInitialized) {
15561                         throw new Error("initializeWasm() must be awaited first!");
15562                 }
15563                 const nativeResponseValue = wasm.InvalidShutdownScript_get_script(this_ptr);
15564                 return decodeArray(nativeResponseValue);
15565         }
15566         // void InvalidShutdownScript_set_script(struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
15567         export function InvalidShutdownScript_set_script(this_ptr: number, val: Uint8Array): void {
15568                 if(!isWasmInitialized) {
15569                         throw new Error("initializeWasm() must be awaited first!");
15570                 }
15571                 const nativeResponseValue = wasm.InvalidShutdownScript_set_script(this_ptr, encodeArray(val));
15572                 // debug statements here
15573         }
15574         // MUST_USE_RES struct LDKInvalidShutdownScript InvalidShutdownScript_new(struct LDKCVec_u8Z script_arg);
15575         export function InvalidShutdownScript_new(script_arg: Uint8Array): number {
15576                 if(!isWasmInitialized) {
15577                         throw new Error("initializeWasm() must be awaited first!");
15578                 }
15579                 const nativeResponseValue = wasm.InvalidShutdownScript_new(encodeArray(script_arg));
15580                 return nativeResponseValue;
15581         }
15582         // struct LDKCVec_u8Z ShutdownScript_write(const struct LDKShutdownScript *NONNULL_PTR obj);
15583         export function ShutdownScript_write(obj: number): Uint8Array {
15584                 if(!isWasmInitialized) {
15585                         throw new Error("initializeWasm() must be awaited first!");
15586                 }
15587                 const nativeResponseValue = wasm.ShutdownScript_write(obj);
15588                 return decodeArray(nativeResponseValue);
15589         }
15590         // struct LDKCResult_ShutdownScriptDecodeErrorZ ShutdownScript_read(struct LDKu8slice ser);
15591         export function ShutdownScript_read(ser: Uint8Array): number {
15592                 if(!isWasmInitialized) {
15593                         throw new Error("initializeWasm() must be awaited first!");
15594                 }
15595                 const nativeResponseValue = wasm.ShutdownScript_read(encodeArray(ser));
15596                 return nativeResponseValue;
15597         }
15598         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wpkh(const uint8_t (*pubkey_hash)[20]);
15599         export function ShutdownScript_new_p2wpkh(pubkey_hash: Uint8Array): number {
15600                 if(!isWasmInitialized) {
15601                         throw new Error("initializeWasm() must be awaited first!");
15602                 }
15603                 const nativeResponseValue = wasm.ShutdownScript_new_p2wpkh(encodeArray(pubkey_hash));
15604                 return nativeResponseValue;
15605         }
15606         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wsh(const uint8_t (*script_hash)[32]);
15607         export function ShutdownScript_new_p2wsh(script_hash: Uint8Array): number {
15608                 if(!isWasmInitialized) {
15609                         throw new Error("initializeWasm() must be awaited first!");
15610                 }
15611                 const nativeResponseValue = wasm.ShutdownScript_new_p2wsh(encodeArray(script_hash));
15612                 return nativeResponseValue;
15613         }
15614         // MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(uint8_t version, struct LDKu8slice program);
15615         export function ShutdownScript_new_witness_program(version: number, program: Uint8Array): number {
15616                 if(!isWasmInitialized) {
15617                         throw new Error("initializeWasm() must be awaited first!");
15618                 }
15619                 const nativeResponseValue = wasm.ShutdownScript_new_witness_program(version, encodeArray(program));
15620                 return nativeResponseValue;
15621         }
15622         // MUST_USE_RES struct LDKCVec_u8Z ShutdownScript_into_inner(struct LDKShutdownScript this_arg);
15623         export function ShutdownScript_into_inner(this_arg: number): Uint8Array {
15624                 if(!isWasmInitialized) {
15625                         throw new Error("initializeWasm() must be awaited first!");
15626                 }
15627                 const nativeResponseValue = wasm.ShutdownScript_into_inner(this_arg);
15628                 return decodeArray(nativeResponseValue);
15629         }
15630         // MUST_USE_RES struct LDKPublicKey ShutdownScript_as_legacy_pubkey(const struct LDKShutdownScript *NONNULL_PTR this_arg);
15631         export function ShutdownScript_as_legacy_pubkey(this_arg: number): Uint8Array {
15632                 if(!isWasmInitialized) {
15633                         throw new Error("initializeWasm() must be awaited first!");
15634                 }
15635                 const nativeResponseValue = wasm.ShutdownScript_as_legacy_pubkey(this_arg);
15636                 return decodeArray(nativeResponseValue);
15637         }
15638         // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
15639         export function ShutdownScript_is_compatible(this_arg: number, features: number): boolean {
15640                 if(!isWasmInitialized) {
15641                         throw new Error("initializeWasm() must be awaited first!");
15642                 }
15643                 const nativeResponseValue = wasm.ShutdownScript_is_compatible(this_arg, features);
15644                 return nativeResponseValue;
15645         }
15646         // void CustomMessageReader_free(struct LDKCustomMessageReader this_ptr);
15647         export function CustomMessageReader_free(this_ptr: number): void {
15648                 if(!isWasmInitialized) {
15649                         throw new Error("initializeWasm() must be awaited first!");
15650                 }
15651                 const nativeResponseValue = wasm.CustomMessageReader_free(this_ptr);
15652                 // debug statements here
15653         }
15654         // struct LDKType Type_clone(const struct LDKType *NONNULL_PTR orig);
15655         export function Type_clone(orig: number): number {
15656                 if(!isWasmInitialized) {
15657                         throw new Error("initializeWasm() must be awaited first!");
15658                 }
15659                 const nativeResponseValue = wasm.Type_clone(orig);
15660                 return nativeResponseValue;
15661         }
15662         // void Type_free(struct LDKType this_ptr);
15663         export function Type_free(this_ptr: number): void {
15664                 if(!isWasmInitialized) {
15665                         throw new Error("initializeWasm() must be awaited first!");
15666                 }
15667                 const nativeResponseValue = wasm.Type_free(this_ptr);
15668                 // debug statements here
15669         }
15670         // void Score_free(struct LDKScore this_ptr);
15671         export function Score_free(this_ptr: number): void {
15672                 if(!isWasmInitialized) {
15673                         throw new Error("initializeWasm() must be awaited first!");
15674                 }
15675                 const nativeResponseValue = wasm.Score_free(this_ptr);
15676                 // debug statements here
15677         }
15678         // void NodeId_free(struct LDKNodeId this_obj);
15679         export function NodeId_free(this_obj: number): void {
15680                 if(!isWasmInitialized) {
15681                         throw new Error("initializeWasm() must be awaited first!");
15682                 }
15683                 const nativeResponseValue = wasm.NodeId_free(this_obj);
15684                 // debug statements here
15685         }
15686         // struct LDKNodeId NodeId_clone(const struct LDKNodeId *NONNULL_PTR orig);
15687         export function NodeId_clone(orig: number): number {
15688                 if(!isWasmInitialized) {
15689                         throw new Error("initializeWasm() must be awaited first!");
15690                 }
15691                 const nativeResponseValue = wasm.NodeId_clone(orig);
15692                 return nativeResponseValue;
15693         }
15694         // MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey);
15695         export function NodeId_from_pubkey(pubkey: Uint8Array): number {
15696                 if(!isWasmInitialized) {
15697                         throw new Error("initializeWasm() must be awaited first!");
15698                 }
15699                 const nativeResponseValue = wasm.NodeId_from_pubkey(encodeArray(pubkey));
15700                 return nativeResponseValue;
15701         }
15702         // MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg);
15703         export function NodeId_as_slice(this_arg: number): Uint8Array {
15704                 if(!isWasmInitialized) {
15705                         throw new Error("initializeWasm() must be awaited first!");
15706                 }
15707                 const nativeResponseValue = wasm.NodeId_as_slice(this_arg);
15708                 return decodeArray(nativeResponseValue);
15709         }
15710         // uint64_t NodeId_hash(const struct LDKNodeId *NONNULL_PTR o);
15711         export function NodeId_hash(o: number): number {
15712                 if(!isWasmInitialized) {
15713                         throw new Error("initializeWasm() must be awaited first!");
15714                 }
15715                 const nativeResponseValue = wasm.NodeId_hash(o);
15716                 return nativeResponseValue;
15717         }
15718         // struct LDKCVec_u8Z NodeId_write(const struct LDKNodeId *NONNULL_PTR obj);
15719         export function NodeId_write(obj: number): Uint8Array {
15720                 if(!isWasmInitialized) {
15721                         throw new Error("initializeWasm() must be awaited first!");
15722                 }
15723                 const nativeResponseValue = wasm.NodeId_write(obj);
15724                 return decodeArray(nativeResponseValue);
15725         }
15726         // struct LDKCResult_NodeIdDecodeErrorZ NodeId_read(struct LDKu8slice ser);
15727         export function NodeId_read(ser: Uint8Array): number {
15728                 if(!isWasmInitialized) {
15729                         throw new Error("initializeWasm() must be awaited first!");
15730                 }
15731                 const nativeResponseValue = wasm.NodeId_read(encodeArray(ser));
15732                 return nativeResponseValue;
15733         }
15734         // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
15735         export function NetworkGraph_free(this_obj: number): void {
15736                 if(!isWasmInitialized) {
15737                         throw new Error("initializeWasm() must be awaited first!");
15738                 }
15739                 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
15740                 // debug statements here
15741         }
15742         // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
15743         export function NetworkGraph_clone(orig: number): number {
15744                 if(!isWasmInitialized) {
15745                         throw new Error("initializeWasm() must be awaited first!");
15746                 }
15747                 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
15748                 return nativeResponseValue;
15749         }
15750         // void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
15751         export function ReadOnlyNetworkGraph_free(this_obj: number): void {
15752                 if(!isWasmInitialized) {
15753                         throw new Error("initializeWasm() must be awaited first!");
15754                 }
15755                 const nativeResponseValue = wasm.ReadOnlyNetworkGraph_free(this_obj);
15756                 // debug statements here
15757         }
15758         // void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
15759         export function NetworkUpdate_free(this_ptr: number): void {
15760                 if(!isWasmInitialized) {
15761                         throw new Error("initializeWasm() must be awaited first!");
15762                 }
15763                 const nativeResponseValue = wasm.NetworkUpdate_free(this_ptr);
15764                 // debug statements here
15765         }
15766         // struct LDKNetworkUpdate NetworkUpdate_clone(const struct LDKNetworkUpdate *NONNULL_PTR orig);
15767         export function NetworkUpdate_clone(orig: number): number {
15768                 if(!isWasmInitialized) {
15769                         throw new Error("initializeWasm() must be awaited first!");
15770                 }
15771                 const nativeResponseValue = wasm.NetworkUpdate_clone(orig);
15772                 return nativeResponseValue;
15773         }
15774         // struct LDKNetworkUpdate NetworkUpdate_channel_update_message(struct LDKChannelUpdate msg);
15775         export function NetworkUpdate_channel_update_message(msg: number): number {
15776                 if(!isWasmInitialized) {
15777                         throw new Error("initializeWasm() must be awaited first!");
15778                 }
15779                 const nativeResponseValue = wasm.NetworkUpdate_channel_update_message(msg);
15780                 return nativeResponseValue;
15781         }
15782         // struct LDKNetworkUpdate NetworkUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
15783         export function NetworkUpdate_channel_closed(short_channel_id: number, is_permanent: boolean): number {
15784                 if(!isWasmInitialized) {
15785                         throw new Error("initializeWasm() must be awaited first!");
15786                 }
15787                 const nativeResponseValue = wasm.NetworkUpdate_channel_closed(short_channel_id, is_permanent);
15788                 return nativeResponseValue;
15789         }
15790         // struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
15791         export function NetworkUpdate_node_failure(node_id: Uint8Array, is_permanent: boolean): number {
15792                 if(!isWasmInitialized) {
15793                         throw new Error("initializeWasm() must be awaited first!");
15794                 }
15795                 const nativeResponseValue = wasm.NetworkUpdate_node_failure(encodeArray(node_id), is_permanent);
15796                 return nativeResponseValue;
15797         }
15798         // struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
15799         export function NetworkUpdate_write(obj: number): Uint8Array {
15800                 if(!isWasmInitialized) {
15801                         throw new Error("initializeWasm() must be awaited first!");
15802                 }
15803                 const nativeResponseValue = wasm.NetworkUpdate_write(obj);
15804                 return decodeArray(nativeResponseValue);
15805         }
15806         // struct LDKEventHandler NetGraphMsgHandler_as_EventHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
15807         export function NetGraphMsgHandler_as_EventHandler(this_arg: number): number {
15808                 if(!isWasmInitialized) {
15809                         throw new Error("initializeWasm() must be awaited first!");
15810                 }
15811                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_EventHandler(this_arg);
15812                 return nativeResponseValue;
15813         }
15814         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
15815         export function NetGraphMsgHandler_free(this_obj: number): void {
15816                 if(!isWasmInitialized) {
15817                         throw new Error("initializeWasm() must be awaited first!");
15818                 }
15819                 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
15820                 // debug statements here
15821         }
15822         // struct LDKNetworkGraph NetGraphMsgHandler_get_network_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_ptr);
15823         export function NetGraphMsgHandler_get_network_graph(this_ptr: number): number {
15824                 if(!isWasmInitialized) {
15825                         throw new Error("initializeWasm() must be awaited first!");
15826                 }
15827                 const nativeResponseValue = wasm.NetGraphMsgHandler_get_network_graph(this_ptr);
15828                 return nativeResponseValue;
15829         }
15830         // void NetGraphMsgHandler_set_network_graph(struct LDKNetGraphMsgHandler *NONNULL_PTR this_ptr, struct LDKNetworkGraph val);
15831         export function NetGraphMsgHandler_set_network_graph(this_ptr: number, val: number): void {
15832                 if(!isWasmInitialized) {
15833                         throw new Error("initializeWasm() must be awaited first!");
15834                 }
15835                 const nativeResponseValue = wasm.NetGraphMsgHandler_set_network_graph(this_ptr, val);
15836                 // debug statements here
15837         }
15838         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKNetworkGraph network_graph, struct LDKCOption_AccessZ chain_access, struct LDKLogger logger);
15839         export function NetGraphMsgHandler_new(network_graph: number, chain_access: number, logger: number): number {
15840                 if(!isWasmInitialized) {
15841                         throw new Error("initializeWasm() must be awaited first!");
15842                 }
15843                 const nativeResponseValue = wasm.NetGraphMsgHandler_new(network_graph, chain_access, logger);
15844                 return nativeResponseValue;
15845         }
15846         // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKCOption_AccessZ chain_access);
15847         export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
15848                 if(!isWasmInitialized) {
15849                         throw new Error("initializeWasm() must be awaited first!");
15850                 }
15851                 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
15852                 // debug statements here
15853         }
15854         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
15855         export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
15856                 if(!isWasmInitialized) {
15857                         throw new Error("initializeWasm() must be awaited first!");
15858                 }
15859                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
15860                 return nativeResponseValue;
15861         }
15862         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
15863         export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
15864                 if(!isWasmInitialized) {
15865                         throw new Error("initializeWasm() must be awaited first!");
15866                 }
15867                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
15868                 return nativeResponseValue;
15869         }
15870         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
15871         export function DirectionalChannelInfo_free(this_obj: number): void {
15872                 if(!isWasmInitialized) {
15873                         throw new Error("initializeWasm() must be awaited first!");
15874                 }
15875                 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
15876                 // debug statements here
15877         }
15878         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15879         export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
15880                 if(!isWasmInitialized) {
15881                         throw new Error("initializeWasm() must be awaited first!");
15882                 }
15883                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
15884                 return nativeResponseValue;
15885         }
15886         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
15887         export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
15888                 if(!isWasmInitialized) {
15889                         throw new Error("initializeWasm() must be awaited first!");
15890                 }
15891                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
15892                 // debug statements here
15893         }
15894         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15895         export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
15896                 if(!isWasmInitialized) {
15897                         throw new Error("initializeWasm() must be awaited first!");
15898                 }
15899                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
15900                 return nativeResponseValue;
15901         }
15902         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
15903         export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
15904                 if(!isWasmInitialized) {
15905                         throw new Error("initializeWasm() must be awaited first!");
15906                 }
15907                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
15908                 // debug statements here
15909         }
15910         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15911         export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
15912                 if(!isWasmInitialized) {
15913                         throw new Error("initializeWasm() must be awaited first!");
15914                 }
15915                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
15916                 return nativeResponseValue;
15917         }
15918         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
15919         export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
15920                 if(!isWasmInitialized) {
15921                         throw new Error("initializeWasm() must be awaited first!");
15922                 }
15923                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
15924                 // debug statements here
15925         }
15926         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15927         export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
15928                 if(!isWasmInitialized) {
15929                         throw new Error("initializeWasm() must be awaited first!");
15930                 }
15931                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
15932                 return nativeResponseValue;
15933         }
15934         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
15935         export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
15936                 if(!isWasmInitialized) {
15937                         throw new Error("initializeWasm() must be awaited first!");
15938                 }
15939                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
15940                 // debug statements here
15941         }
15942         // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15943         export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
15944                 if(!isWasmInitialized) {
15945                         throw new Error("initializeWasm() must be awaited first!");
15946                 }
15947                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
15948                 return nativeResponseValue;
15949         }
15950         // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
15951         export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
15952                 if(!isWasmInitialized) {
15953                         throw new Error("initializeWasm() must be awaited first!");
15954                 }
15955                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
15956                 // debug statements here
15957         }
15958         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15959         export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
15960                 if(!isWasmInitialized) {
15961                         throw new Error("initializeWasm() must be awaited first!");
15962                 }
15963                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
15964                 return nativeResponseValue;
15965         }
15966         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
15967         export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
15968                 if(!isWasmInitialized) {
15969                         throw new Error("initializeWasm() must be awaited first!");
15970                 }
15971                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
15972                 // debug statements here
15973         }
15974         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15975         export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
15976                 if(!isWasmInitialized) {
15977                         throw new Error("initializeWasm() must be awaited first!");
15978                 }
15979                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
15980                 return nativeResponseValue;
15981         }
15982         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
15983         export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
15984                 if(!isWasmInitialized) {
15985                         throw new Error("initializeWasm() must be awaited first!");
15986                 }
15987                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
15988                 // debug statements here
15989         }
15990         // 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);
15991         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 {
15992                 if(!isWasmInitialized) {
15993                         throw new Error("initializeWasm() must be awaited first!");
15994                 }
15995                 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);
15996                 return nativeResponseValue;
15997         }
15998         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
15999         export function DirectionalChannelInfo_clone(orig: number): number {
16000                 if(!isWasmInitialized) {
16001                         throw new Error("initializeWasm() must be awaited first!");
16002                 }
16003                 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
16004                 return nativeResponseValue;
16005         }
16006         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
16007         export function DirectionalChannelInfo_write(obj: number): Uint8Array {
16008                 if(!isWasmInitialized) {
16009                         throw new Error("initializeWasm() must be awaited first!");
16010                 }
16011                 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
16012                 return decodeArray(nativeResponseValue);
16013         }
16014         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
16015         export function DirectionalChannelInfo_read(ser: Uint8Array): number {
16016                 if(!isWasmInitialized) {
16017                         throw new Error("initializeWasm() must be awaited first!");
16018                 }
16019                 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
16020                 return nativeResponseValue;
16021         }
16022         // void ChannelInfo_free(struct LDKChannelInfo this_obj);
16023         export function ChannelInfo_free(this_obj: number): void {
16024                 if(!isWasmInitialized) {
16025                         throw new Error("initializeWasm() must be awaited first!");
16026                 }
16027                 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
16028                 // debug statements here
16029         }
16030         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16031         export function ChannelInfo_get_features(this_ptr: number): number {
16032                 if(!isWasmInitialized) {
16033                         throw new Error("initializeWasm() must be awaited first!");
16034                 }
16035                 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
16036                 return nativeResponseValue;
16037         }
16038         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
16039         export function ChannelInfo_set_features(this_ptr: number, val: number): void {
16040                 if(!isWasmInitialized) {
16041                         throw new Error("initializeWasm() must be awaited first!");
16042                 }
16043                 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
16044                 // debug statements here
16045         }
16046         // struct LDKNodeId ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16047         export function ChannelInfo_get_node_one(this_ptr: number): number {
16048                 if(!isWasmInitialized) {
16049                         throw new Error("initializeWasm() must be awaited first!");
16050                 }
16051                 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
16052                 return nativeResponseValue;
16053         }
16054         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
16055         export function ChannelInfo_set_node_one(this_ptr: number, val: number): void {
16056                 if(!isWasmInitialized) {
16057                         throw new Error("initializeWasm() must be awaited first!");
16058                 }
16059                 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, val);
16060                 // debug statements here
16061         }
16062         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16063         export function ChannelInfo_get_one_to_two(this_ptr: number): number {
16064                 if(!isWasmInitialized) {
16065                         throw new Error("initializeWasm() must be awaited first!");
16066                 }
16067                 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
16068                 return nativeResponseValue;
16069         }
16070         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
16071         export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
16072                 if(!isWasmInitialized) {
16073                         throw new Error("initializeWasm() must be awaited first!");
16074                 }
16075                 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
16076                 // debug statements here
16077         }
16078         // struct LDKNodeId ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16079         export function ChannelInfo_get_node_two(this_ptr: number): number {
16080                 if(!isWasmInitialized) {
16081                         throw new Error("initializeWasm() must be awaited first!");
16082                 }
16083                 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
16084                 return nativeResponseValue;
16085         }
16086         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
16087         export function ChannelInfo_set_node_two(this_ptr: number, val: number): void {
16088                 if(!isWasmInitialized) {
16089                         throw new Error("initializeWasm() must be awaited first!");
16090                 }
16091                 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, val);
16092                 // debug statements here
16093         }
16094         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16095         export function ChannelInfo_get_two_to_one(this_ptr: number): number {
16096                 if(!isWasmInitialized) {
16097                         throw new Error("initializeWasm() must be awaited first!");
16098                 }
16099                 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
16100                 return nativeResponseValue;
16101         }
16102         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
16103         export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
16104                 if(!isWasmInitialized) {
16105                         throw new Error("initializeWasm() must be awaited first!");
16106                 }
16107                 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
16108                 // debug statements here
16109         }
16110         // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16111         export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
16112                 if(!isWasmInitialized) {
16113                         throw new Error("initializeWasm() must be awaited first!");
16114                 }
16115                 const nativeResponseValue = wasm.ChannelInfo_get_capacity_sats(this_ptr);
16116                 return nativeResponseValue;
16117         }
16118         // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
16119         export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
16120                 if(!isWasmInitialized) {
16121                         throw new Error("initializeWasm() must be awaited first!");
16122                 }
16123                 const nativeResponseValue = wasm.ChannelInfo_set_capacity_sats(this_ptr, val);
16124                 // debug statements here
16125         }
16126         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16127         export function ChannelInfo_get_announcement_message(this_ptr: number): number {
16128                 if(!isWasmInitialized) {
16129                         throw new Error("initializeWasm() must be awaited first!");
16130                 }
16131                 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
16132                 return nativeResponseValue;
16133         }
16134         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
16135         export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
16136                 if(!isWasmInitialized) {
16137                         throw new Error("initializeWasm() must be awaited first!");
16138                 }
16139                 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
16140                 // debug statements here
16141         }
16142         // MUST_USE_RES struct LDKChannelInfo ChannelInfo_new(struct LDKChannelFeatures features_arg, struct LDKNodeId node_one_arg, struct LDKDirectionalChannelInfo one_to_two_arg, struct LDKNodeId node_two_arg, struct LDKDirectionalChannelInfo two_to_one_arg, struct LDKCOption_u64Z capacity_sats_arg, struct LDKChannelAnnouncement announcement_message_arg);
16143         export function ChannelInfo_new(features_arg: number, node_one_arg: number, one_to_two_arg: number, node_two_arg: number, two_to_one_arg: number, capacity_sats_arg: number, announcement_message_arg: number): number {
16144                 if(!isWasmInitialized) {
16145                         throw new Error("initializeWasm() must be awaited first!");
16146                 }
16147                 const nativeResponseValue = wasm.ChannelInfo_new(features_arg, node_one_arg, one_to_two_arg, node_two_arg, two_to_one_arg, capacity_sats_arg, announcement_message_arg);
16148                 return nativeResponseValue;
16149         }
16150         // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
16151         export function ChannelInfo_clone(orig: number): number {
16152                 if(!isWasmInitialized) {
16153                         throw new Error("initializeWasm() must be awaited first!");
16154                 }
16155                 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
16156                 return nativeResponseValue;
16157         }
16158         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
16159         export function ChannelInfo_write(obj: number): Uint8Array {
16160                 if(!isWasmInitialized) {
16161                         throw new Error("initializeWasm() must be awaited first!");
16162                 }
16163                 const nativeResponseValue = wasm.ChannelInfo_write(obj);
16164                 return decodeArray(nativeResponseValue);
16165         }
16166         // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
16167         export function ChannelInfo_read(ser: Uint8Array): number {
16168                 if(!isWasmInitialized) {
16169                         throw new Error("initializeWasm() must be awaited first!");
16170                 }
16171                 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
16172                 return nativeResponseValue;
16173         }
16174         // void RoutingFees_free(struct LDKRoutingFees this_obj);
16175         export function RoutingFees_free(this_obj: number): void {
16176                 if(!isWasmInitialized) {
16177                         throw new Error("initializeWasm() must be awaited first!");
16178                 }
16179                 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
16180                 // debug statements here
16181         }
16182         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
16183         export function RoutingFees_get_base_msat(this_ptr: number): number {
16184                 if(!isWasmInitialized) {
16185                         throw new Error("initializeWasm() must be awaited first!");
16186                 }
16187                 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
16188                 return nativeResponseValue;
16189         }
16190         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
16191         export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
16192                 if(!isWasmInitialized) {
16193                         throw new Error("initializeWasm() must be awaited first!");
16194                 }
16195                 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
16196                 // debug statements here
16197         }
16198         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
16199         export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
16200                 if(!isWasmInitialized) {
16201                         throw new Error("initializeWasm() must be awaited first!");
16202                 }
16203                 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
16204                 return nativeResponseValue;
16205         }
16206         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
16207         export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
16208                 if(!isWasmInitialized) {
16209                         throw new Error("initializeWasm() must be awaited first!");
16210                 }
16211                 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
16212                 // debug statements here
16213         }
16214         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
16215         export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
16216                 if(!isWasmInitialized) {
16217                         throw new Error("initializeWasm() must be awaited first!");
16218                 }
16219                 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
16220                 return nativeResponseValue;
16221         }
16222         // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
16223         export function RoutingFees_eq(a: number, b: number): boolean {
16224                 if(!isWasmInitialized) {
16225                         throw new Error("initializeWasm() must be awaited first!");
16226                 }
16227                 const nativeResponseValue = wasm.RoutingFees_eq(a, b);
16228                 return nativeResponseValue;
16229         }
16230         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
16231         export function RoutingFees_clone(orig: number): number {
16232                 if(!isWasmInitialized) {
16233                         throw new Error("initializeWasm() must be awaited first!");
16234                 }
16235                 const nativeResponseValue = wasm.RoutingFees_clone(orig);
16236                 return nativeResponseValue;
16237         }
16238         // uint64_t RoutingFees_hash(const struct LDKRoutingFees *NONNULL_PTR o);
16239         export function RoutingFees_hash(o: number): number {
16240                 if(!isWasmInitialized) {
16241                         throw new Error("initializeWasm() must be awaited first!");
16242                 }
16243                 const nativeResponseValue = wasm.RoutingFees_hash(o);
16244                 return nativeResponseValue;
16245         }
16246         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
16247         export function RoutingFees_write(obj: number): Uint8Array {
16248                 if(!isWasmInitialized) {
16249                         throw new Error("initializeWasm() must be awaited first!");
16250                 }
16251                 const nativeResponseValue = wasm.RoutingFees_write(obj);
16252                 return decodeArray(nativeResponseValue);
16253         }
16254         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
16255         export function RoutingFees_read(ser: Uint8Array): number {
16256                 if(!isWasmInitialized) {
16257                         throw new Error("initializeWasm() must be awaited first!");
16258                 }
16259                 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
16260                 return nativeResponseValue;
16261         }
16262         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
16263         export function NodeAnnouncementInfo_free(this_obj: number): void {
16264                 if(!isWasmInitialized) {
16265                         throw new Error("initializeWasm() must be awaited first!");
16266                 }
16267                 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
16268                 // debug statements here
16269         }
16270         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
16271         export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
16272                 if(!isWasmInitialized) {
16273                         throw new Error("initializeWasm() must be awaited first!");
16274                 }
16275                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
16276                 return nativeResponseValue;
16277         }
16278         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
16279         export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
16280                 if(!isWasmInitialized) {
16281                         throw new Error("initializeWasm() must be awaited first!");
16282                 }
16283                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
16284                 // debug statements here
16285         }
16286         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
16287         export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
16288                 if(!isWasmInitialized) {
16289                         throw new Error("initializeWasm() must be awaited first!");
16290                 }
16291                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
16292                 return nativeResponseValue;
16293         }
16294         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
16295         export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
16296                 if(!isWasmInitialized) {
16297                         throw new Error("initializeWasm() must be awaited first!");
16298                 }
16299                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
16300                 // debug statements here
16301         }
16302         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
16303         export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
16304                 if(!isWasmInitialized) {
16305                         throw new Error("initializeWasm() must be awaited first!");
16306                 }
16307                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
16308                 return decodeArray(nativeResponseValue);
16309         }
16310         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
16311         export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
16312                 if(!isWasmInitialized) {
16313                         throw new Error("initializeWasm() must be awaited first!");
16314                 }
16315                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
16316                 // debug statements here
16317         }
16318         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
16319         export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
16320                 if(!isWasmInitialized) {
16321                         throw new Error("initializeWasm() must be awaited first!");
16322                 }
16323                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
16324                 return decodeArray(nativeResponseValue);
16325         }
16326         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16327         export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
16328                 if(!isWasmInitialized) {
16329                         throw new Error("initializeWasm() must be awaited first!");
16330                 }
16331                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
16332                 // debug statements here
16333         }
16334         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
16335         export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
16336                 if(!isWasmInitialized) {
16337                         throw new Error("initializeWasm() must be awaited first!");
16338                 }
16339                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
16340                 // debug statements here
16341         }
16342         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
16343         export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
16344                 if(!isWasmInitialized) {
16345                         throw new Error("initializeWasm() must be awaited first!");
16346                 }
16347                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
16348                 return nativeResponseValue;
16349         }
16350         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
16351         export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
16352                 if(!isWasmInitialized) {
16353                         throw new Error("initializeWasm() must be awaited first!");
16354                 }
16355                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
16356                 // debug statements here
16357         }
16358         // 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);
16359         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 {
16360                 if(!isWasmInitialized) {
16361                         throw new Error("initializeWasm() must be awaited first!");
16362                 }
16363                 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
16364                 return nativeResponseValue;
16365         }
16366         // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
16367         export function NodeAnnouncementInfo_clone(orig: number): number {
16368                 if(!isWasmInitialized) {
16369                         throw new Error("initializeWasm() must be awaited first!");
16370                 }
16371                 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
16372                 return nativeResponseValue;
16373         }
16374         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
16375         export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
16376                 if(!isWasmInitialized) {
16377                         throw new Error("initializeWasm() must be awaited first!");
16378                 }
16379                 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
16380                 return decodeArray(nativeResponseValue);
16381         }
16382         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
16383         export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
16384                 if(!isWasmInitialized) {
16385                         throw new Error("initializeWasm() must be awaited first!");
16386                 }
16387                 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
16388                 return nativeResponseValue;
16389         }
16390         // void NodeInfo_free(struct LDKNodeInfo this_obj);
16391         export function NodeInfo_free(this_obj: number): void {
16392                 if(!isWasmInitialized) {
16393                         throw new Error("initializeWasm() must be awaited first!");
16394                 }
16395                 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
16396                 // debug statements here
16397         }
16398         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
16399         export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
16400                 if(!isWasmInitialized) {
16401                         throw new Error("initializeWasm() must be awaited first!");
16402                 }
16403                 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
16404                 // debug statements here
16405         }
16406         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
16407         export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
16408                 if(!isWasmInitialized) {
16409                         throw new Error("initializeWasm() must be awaited first!");
16410                 }
16411                 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
16412                 return nativeResponseValue;
16413         }
16414         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
16415         export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
16416                 if(!isWasmInitialized) {
16417                         throw new Error("initializeWasm() must be awaited first!");
16418                 }
16419                 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
16420                 // debug statements here
16421         }
16422         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
16423         export function NodeInfo_get_announcement_info(this_ptr: number): number {
16424                 if(!isWasmInitialized) {
16425                         throw new Error("initializeWasm() must be awaited first!");
16426                 }
16427                 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
16428                 return nativeResponseValue;
16429         }
16430         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
16431         export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
16432                 if(!isWasmInitialized) {
16433                         throw new Error("initializeWasm() must be awaited first!");
16434                 }
16435                 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
16436                 // debug statements here
16437         }
16438         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
16439         export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
16440                 if(!isWasmInitialized) {
16441                         throw new Error("initializeWasm() must be awaited first!");
16442                 }
16443                 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
16444                 return nativeResponseValue;
16445         }
16446         // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
16447         export function NodeInfo_clone(orig: number): number {
16448                 if(!isWasmInitialized) {
16449                         throw new Error("initializeWasm() must be awaited first!");
16450                 }
16451                 const nativeResponseValue = wasm.NodeInfo_clone(orig);
16452                 return nativeResponseValue;
16453         }
16454         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
16455         export function NodeInfo_write(obj: number): Uint8Array {
16456                 if(!isWasmInitialized) {
16457                         throw new Error("initializeWasm() must be awaited first!");
16458                 }
16459                 const nativeResponseValue = wasm.NodeInfo_write(obj);
16460                 return decodeArray(nativeResponseValue);
16461         }
16462         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
16463         export function NodeInfo_read(ser: Uint8Array): number {
16464                 if(!isWasmInitialized) {
16465                         throw new Error("initializeWasm() must be awaited first!");
16466                 }
16467                 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
16468                 return nativeResponseValue;
16469         }
16470         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
16471         export function NetworkGraph_write(obj: number): Uint8Array {
16472                 if(!isWasmInitialized) {
16473                         throw new Error("initializeWasm() must be awaited first!");
16474                 }
16475                 const nativeResponseValue = wasm.NetworkGraph_write(obj);
16476                 return decodeArray(nativeResponseValue);
16477         }
16478         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
16479         export function NetworkGraph_read(ser: Uint8Array): number {
16480                 if(!isWasmInitialized) {
16481                         throw new Error("initializeWasm() must be awaited first!");
16482                 }
16483                 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
16484                 return nativeResponseValue;
16485         }
16486         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
16487         export function NetworkGraph_new(genesis_hash: Uint8Array): number {
16488                 if(!isWasmInitialized) {
16489                         throw new Error("initializeWasm() must be awaited first!");
16490                 }
16491                 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
16492                 return nativeResponseValue;
16493         }
16494         // MUST_USE_RES struct LDKReadOnlyNetworkGraph NetworkGraph_read_only(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
16495         export function NetworkGraph_read_only(this_arg: number): number {
16496                 if(!isWasmInitialized) {
16497                         throw new Error("initializeWasm() must be awaited first!");
16498                 }
16499                 const nativeResponseValue = wasm.NetworkGraph_read_only(this_arg);
16500                 return nativeResponseValue;
16501         }
16502         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
16503         export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
16504                 if(!isWasmInitialized) {
16505                         throw new Error("initializeWasm() must be awaited first!");
16506                 }
16507                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
16508                 return nativeResponseValue;
16509         }
16510         // 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);
16511         export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
16512                 if(!isWasmInitialized) {
16513                         throw new Error("initializeWasm() must be awaited first!");
16514                 }
16515                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
16516                 return nativeResponseValue;
16517         }
16518         // 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);
16519         export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
16520                 if(!isWasmInitialized) {
16521                         throw new Error("initializeWasm() must be awaited first!");
16522                 }
16523                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
16524                 return nativeResponseValue;
16525         }
16526         // 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);
16527         export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
16528                 if(!isWasmInitialized) {
16529                         throw new Error("initializeWasm() must be awaited first!");
16530                 }
16531                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
16532                 return nativeResponseValue;
16533         }
16534         // void NetworkGraph_close_channel_from_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
16535         export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
16536                 if(!isWasmInitialized) {
16537                         throw new Error("initializeWasm() must be awaited first!");
16538                 }
16539                 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
16540                 // debug statements here
16541         }
16542         // void NetworkGraph_fail_node(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey _node_id, bool is_permanent);
16543         export function NetworkGraph_fail_node(this_arg: number, _node_id: Uint8Array, is_permanent: boolean): void {
16544                 if(!isWasmInitialized) {
16545                         throw new Error("initializeWasm() must be awaited first!");
16546                 }
16547                 const nativeResponseValue = wasm.NetworkGraph_fail_node(this_arg, encodeArray(_node_id), is_permanent);
16548                 // debug statements here
16549         }
16550         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
16551         export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
16552                 if(!isWasmInitialized) {
16553                         throw new Error("initializeWasm() must be awaited first!");
16554                 }
16555                 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
16556                 return nativeResponseValue;
16557         }
16558         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
16559         export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
16560                 if(!isWasmInitialized) {
16561                         throw new Error("initializeWasm() must be awaited first!");
16562                 }
16563                 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
16564                 return nativeResponseValue;
16565         }
16566         // MUST_USE_RES struct LDKCOption_CVec_NetAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
16567         export function ReadOnlyNetworkGraph_get_addresses(this_arg: number, pubkey: Uint8Array): number {
16568                 if(!isWasmInitialized) {
16569                         throw new Error("initializeWasm() must be awaited first!");
16570                 }
16571                 const nativeResponseValue = wasm.ReadOnlyNetworkGraph_get_addresses(this_arg, encodeArray(pubkey));
16572                 return nativeResponseValue;
16573         }
16574         // void RouteHop_free(struct LDKRouteHop this_obj);
16575         export function RouteHop_free(this_obj: number): void {
16576                 if(!isWasmInitialized) {
16577                         throw new Error("initializeWasm() must be awaited first!");
16578                 }
16579                 const nativeResponseValue = wasm.RouteHop_free(this_obj);
16580                 // debug statements here
16581         }
16582         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
16583         export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
16584                 if(!isWasmInitialized) {
16585                         throw new Error("initializeWasm() must be awaited first!");
16586                 }
16587                 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
16588                 return decodeArray(nativeResponseValue);
16589         }
16590         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16591         export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
16592                 if(!isWasmInitialized) {
16593                         throw new Error("initializeWasm() must be awaited first!");
16594                 }
16595                 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
16596                 // debug statements here
16597         }
16598         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
16599         export function RouteHop_get_node_features(this_ptr: number): number {
16600                 if(!isWasmInitialized) {
16601                         throw new Error("initializeWasm() must be awaited first!");
16602                 }
16603                 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
16604                 return nativeResponseValue;
16605         }
16606         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
16607         export function RouteHop_set_node_features(this_ptr: number, val: number): void {
16608                 if(!isWasmInitialized) {
16609                         throw new Error("initializeWasm() must be awaited first!");
16610                 }
16611                 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
16612                 // debug statements here
16613         }
16614         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
16615         export function RouteHop_get_short_channel_id(this_ptr: number): number {
16616                 if(!isWasmInitialized) {
16617                         throw new Error("initializeWasm() must be awaited first!");
16618                 }
16619                 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
16620                 return nativeResponseValue;
16621         }
16622         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
16623         export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
16624                 if(!isWasmInitialized) {
16625                         throw new Error("initializeWasm() must be awaited first!");
16626                 }
16627                 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
16628                 // debug statements here
16629         }
16630         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
16631         export function RouteHop_get_channel_features(this_ptr: number): number {
16632                 if(!isWasmInitialized) {
16633                         throw new Error("initializeWasm() must be awaited first!");
16634                 }
16635                 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
16636                 return nativeResponseValue;
16637         }
16638         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
16639         export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
16640                 if(!isWasmInitialized) {
16641                         throw new Error("initializeWasm() must be awaited first!");
16642                 }
16643                 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
16644                 // debug statements here
16645         }
16646         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
16647         export function RouteHop_get_fee_msat(this_ptr: number): number {
16648                 if(!isWasmInitialized) {
16649                         throw new Error("initializeWasm() must be awaited first!");
16650                 }
16651                 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
16652                 return nativeResponseValue;
16653         }
16654         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
16655         export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
16656                 if(!isWasmInitialized) {
16657                         throw new Error("initializeWasm() must be awaited first!");
16658                 }
16659                 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
16660                 // debug statements here
16661         }
16662         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
16663         export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
16664                 if(!isWasmInitialized) {
16665                         throw new Error("initializeWasm() must be awaited first!");
16666                 }
16667                 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
16668                 return nativeResponseValue;
16669         }
16670         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
16671         export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
16672                 if(!isWasmInitialized) {
16673                         throw new Error("initializeWasm() must be awaited first!");
16674                 }
16675                 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
16676                 // debug statements here
16677         }
16678         // 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);
16679         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 {
16680                 if(!isWasmInitialized) {
16681                         throw new Error("initializeWasm() must be awaited first!");
16682                 }
16683                 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);
16684                 return nativeResponseValue;
16685         }
16686         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
16687         export function RouteHop_clone(orig: number): number {
16688                 if(!isWasmInitialized) {
16689                         throw new Error("initializeWasm() must be awaited first!");
16690                 }
16691                 const nativeResponseValue = wasm.RouteHop_clone(orig);
16692                 return nativeResponseValue;
16693         }
16694         // uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
16695         export function RouteHop_hash(o: number): number {
16696                 if(!isWasmInitialized) {
16697                         throw new Error("initializeWasm() must be awaited first!");
16698                 }
16699                 const nativeResponseValue = wasm.RouteHop_hash(o);
16700                 return nativeResponseValue;
16701         }
16702         // bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
16703         export function RouteHop_eq(a: number, b: number): boolean {
16704                 if(!isWasmInitialized) {
16705                         throw new Error("initializeWasm() must be awaited first!");
16706                 }
16707                 const nativeResponseValue = wasm.RouteHop_eq(a, b);
16708                 return nativeResponseValue;
16709         }
16710         // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
16711         export function RouteHop_write(obj: number): Uint8Array {
16712                 if(!isWasmInitialized) {
16713                         throw new Error("initializeWasm() must be awaited first!");
16714                 }
16715                 const nativeResponseValue = wasm.RouteHop_write(obj);
16716                 return decodeArray(nativeResponseValue);
16717         }
16718         // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
16719         export function RouteHop_read(ser: Uint8Array): number {
16720                 if(!isWasmInitialized) {
16721                         throw new Error("initializeWasm() must be awaited first!");
16722                 }
16723                 const nativeResponseValue = wasm.RouteHop_read(encodeArray(ser));
16724                 return nativeResponseValue;
16725         }
16726         // void Route_free(struct LDKRoute this_obj);
16727         export function Route_free(this_obj: number): void {
16728                 if(!isWasmInitialized) {
16729                         throw new Error("initializeWasm() must be awaited first!");
16730                 }
16731                 const nativeResponseValue = wasm.Route_free(this_obj);
16732                 // debug statements here
16733         }
16734         // struct LDKCVec_CVec_RouteHopZZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
16735         export function Route_get_paths(this_ptr: number): number[][] {
16736                 if(!isWasmInitialized) {
16737                         throw new Error("initializeWasm() must be awaited first!");
16738                 }
16739                 const nativeResponseValue = wasm.Route_get_paths(this_ptr);
16740                 return nativeResponseValue;
16741         }
16742         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
16743         export function Route_set_paths(this_ptr: number, val: number[][]): void {
16744                 if(!isWasmInitialized) {
16745                         throw new Error("initializeWasm() must be awaited first!");
16746                 }
16747                 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
16748                 // debug statements here
16749         }
16750         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
16751         export function Route_new(paths_arg: number[][]): number {
16752                 if(!isWasmInitialized) {
16753                         throw new Error("initializeWasm() must be awaited first!");
16754                 }
16755                 const nativeResponseValue = wasm.Route_new(paths_arg);
16756                 return nativeResponseValue;
16757         }
16758         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
16759         export function Route_clone(orig: number): number {
16760                 if(!isWasmInitialized) {
16761                         throw new Error("initializeWasm() must be awaited first!");
16762                 }
16763                 const nativeResponseValue = wasm.Route_clone(orig);
16764                 return nativeResponseValue;
16765         }
16766         // uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
16767         export function Route_hash(o: number): number {
16768                 if(!isWasmInitialized) {
16769                         throw new Error("initializeWasm() must be awaited first!");
16770                 }
16771                 const nativeResponseValue = wasm.Route_hash(o);
16772                 return nativeResponseValue;
16773         }
16774         // bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
16775         export function Route_eq(a: number, b: number): boolean {
16776                 if(!isWasmInitialized) {
16777                         throw new Error("initializeWasm() must be awaited first!");
16778                 }
16779                 const nativeResponseValue = wasm.Route_eq(a, b);
16780                 return nativeResponseValue;
16781         }
16782         // MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
16783         export function Route_get_total_fees(this_arg: number): number {
16784                 if(!isWasmInitialized) {
16785                         throw new Error("initializeWasm() must be awaited first!");
16786                 }
16787                 const nativeResponseValue = wasm.Route_get_total_fees(this_arg);
16788                 return nativeResponseValue;
16789         }
16790         // MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
16791         export function Route_get_total_amount(this_arg: number): number {
16792                 if(!isWasmInitialized) {
16793                         throw new Error("initializeWasm() must be awaited first!");
16794                 }
16795                 const nativeResponseValue = wasm.Route_get_total_amount(this_arg);
16796                 return nativeResponseValue;
16797         }
16798         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
16799         export function Route_write(obj: number): Uint8Array {
16800                 if(!isWasmInitialized) {
16801                         throw new Error("initializeWasm() must be awaited first!");
16802                 }
16803                 const nativeResponseValue = wasm.Route_write(obj);
16804                 return decodeArray(nativeResponseValue);
16805         }
16806         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
16807         export function Route_read(ser: Uint8Array): number {
16808                 if(!isWasmInitialized) {
16809                         throw new Error("initializeWasm() must be awaited first!");
16810                 }
16811                 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
16812                 return nativeResponseValue;
16813         }
16814         // void RouteHint_free(struct LDKRouteHint this_obj);
16815         export function RouteHint_free(this_obj: number): void {
16816                 if(!isWasmInitialized) {
16817                         throw new Error("initializeWasm() must be awaited first!");
16818                 }
16819                 const nativeResponseValue = wasm.RouteHint_free(this_obj);
16820                 // debug statements here
16821         }
16822         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
16823         export function RouteHint_clone(orig: number): number {
16824                 if(!isWasmInitialized) {
16825                         throw new Error("initializeWasm() must be awaited first!");
16826                 }
16827                 const nativeResponseValue = wasm.RouteHint_clone(orig);
16828                 return nativeResponseValue;
16829         }
16830         // uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
16831         export function RouteHint_hash(o: number): number {
16832                 if(!isWasmInitialized) {
16833                         throw new Error("initializeWasm() must be awaited first!");
16834                 }
16835                 const nativeResponseValue = wasm.RouteHint_hash(o);
16836                 return nativeResponseValue;
16837         }
16838         // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
16839         export function RouteHint_eq(a: number, b: number): boolean {
16840                 if(!isWasmInitialized) {
16841                         throw new Error("initializeWasm() must be awaited first!");
16842                 }
16843                 const nativeResponseValue = wasm.RouteHint_eq(a, b);
16844                 return nativeResponseValue;
16845         }
16846         // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
16847         export function RouteHintHop_free(this_obj: number): void {
16848                 if(!isWasmInitialized) {
16849                         throw new Error("initializeWasm() must be awaited first!");
16850                 }
16851                 const nativeResponseValue = wasm.RouteHintHop_free(this_obj);
16852                 // debug statements here
16853         }
16854         // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
16855         export function RouteHintHop_get_src_node_id(this_ptr: number): Uint8Array {
16856                 if(!isWasmInitialized) {
16857                         throw new Error("initializeWasm() must be awaited first!");
16858                 }
16859                 const nativeResponseValue = wasm.RouteHintHop_get_src_node_id(this_ptr);
16860                 return decodeArray(nativeResponseValue);
16861         }
16862         // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16863         export function RouteHintHop_set_src_node_id(this_ptr: number, val: Uint8Array): void {
16864                 if(!isWasmInitialized) {
16865                         throw new Error("initializeWasm() must be awaited first!");
16866                 }
16867                 const nativeResponseValue = wasm.RouteHintHop_set_src_node_id(this_ptr, encodeArray(val));
16868                 // debug statements here
16869         }
16870         // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
16871         export function RouteHintHop_get_short_channel_id(this_ptr: number): number {
16872                 if(!isWasmInitialized) {
16873                         throw new Error("initializeWasm() must be awaited first!");
16874                 }
16875                 const nativeResponseValue = wasm.RouteHintHop_get_short_channel_id(this_ptr);
16876                 return nativeResponseValue;
16877         }
16878         // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
16879         export function RouteHintHop_set_short_channel_id(this_ptr: number, val: number): void {
16880                 if(!isWasmInitialized) {
16881                         throw new Error("initializeWasm() must be awaited first!");
16882                 }
16883                 const nativeResponseValue = wasm.RouteHintHop_set_short_channel_id(this_ptr, val);
16884                 // debug statements here
16885         }
16886         // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
16887         export function RouteHintHop_get_fees(this_ptr: number): number {
16888                 if(!isWasmInitialized) {
16889                         throw new Error("initializeWasm() must be awaited first!");
16890                 }
16891                 const nativeResponseValue = wasm.RouteHintHop_get_fees(this_ptr);
16892                 return nativeResponseValue;
16893         }
16894         // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
16895         export function RouteHintHop_set_fees(this_ptr: number, val: number): void {
16896                 if(!isWasmInitialized) {
16897                         throw new Error("initializeWasm() must be awaited first!");
16898                 }
16899                 const nativeResponseValue = wasm.RouteHintHop_set_fees(this_ptr, val);
16900                 // debug statements here
16901         }
16902         // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
16903         export function RouteHintHop_get_cltv_expiry_delta(this_ptr: number): number {
16904                 if(!isWasmInitialized) {
16905                         throw new Error("initializeWasm() must be awaited first!");
16906                 }
16907                 const nativeResponseValue = wasm.RouteHintHop_get_cltv_expiry_delta(this_ptr);
16908                 return nativeResponseValue;
16909         }
16910         // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
16911         export function RouteHintHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
16912                 if(!isWasmInitialized) {
16913                         throw new Error("initializeWasm() must be awaited first!");
16914                 }
16915                 const nativeResponseValue = wasm.RouteHintHop_set_cltv_expiry_delta(this_ptr, val);
16916                 // debug statements here
16917         }
16918         // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
16919         export function RouteHintHop_get_htlc_minimum_msat(this_ptr: number): number {
16920                 if(!isWasmInitialized) {
16921                         throw new Error("initializeWasm() must be awaited first!");
16922                 }
16923                 const nativeResponseValue = wasm.RouteHintHop_get_htlc_minimum_msat(this_ptr);
16924                 return nativeResponseValue;
16925         }
16926         // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
16927         export function RouteHintHop_set_htlc_minimum_msat(this_ptr: number, val: number): void {
16928                 if(!isWasmInitialized) {
16929                         throw new Error("initializeWasm() must be awaited first!");
16930                 }
16931                 const nativeResponseValue = wasm.RouteHintHop_set_htlc_minimum_msat(this_ptr, val);
16932                 // debug statements here
16933         }
16934         // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
16935         export function RouteHintHop_get_htlc_maximum_msat(this_ptr: number): number {
16936                 if(!isWasmInitialized) {
16937                         throw new Error("initializeWasm() must be awaited first!");
16938                 }
16939                 const nativeResponseValue = wasm.RouteHintHop_get_htlc_maximum_msat(this_ptr);
16940                 return nativeResponseValue;
16941         }
16942         // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
16943         export function RouteHintHop_set_htlc_maximum_msat(this_ptr: number, val: number): void {
16944                 if(!isWasmInitialized) {
16945                         throw new Error("initializeWasm() must be awaited first!");
16946                 }
16947                 const nativeResponseValue = wasm.RouteHintHop_set_htlc_maximum_msat(this_ptr, val);
16948                 // debug statements here
16949         }
16950         // 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);
16951         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 {
16952                 if(!isWasmInitialized) {
16953                         throw new Error("initializeWasm() must be awaited first!");
16954                 }
16955                 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);
16956                 return nativeResponseValue;
16957         }
16958         // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
16959         export function RouteHintHop_clone(orig: number): number {
16960                 if(!isWasmInitialized) {
16961                         throw new Error("initializeWasm() must be awaited first!");
16962                 }
16963                 const nativeResponseValue = wasm.RouteHintHop_clone(orig);
16964                 return nativeResponseValue;
16965         }
16966         // uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
16967         export function RouteHintHop_hash(o: number): number {
16968                 if(!isWasmInitialized) {
16969                         throw new Error("initializeWasm() must be awaited first!");
16970                 }
16971                 const nativeResponseValue = wasm.RouteHintHop_hash(o);
16972                 return nativeResponseValue;
16973         }
16974         // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
16975         export function RouteHintHop_eq(a: number, b: number): boolean {
16976                 if(!isWasmInitialized) {
16977                         throw new Error("initializeWasm() must be awaited first!");
16978                 }
16979                 const nativeResponseValue = wasm.RouteHintHop_eq(a, b);
16980                 return nativeResponseValue;
16981         }
16982         // struct LDKCResult_RouteLightningErrorZ get_keysend_route(struct LDKPublicKey our_node_pubkey, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger, const struct LDKScore *NONNULL_PTR scorer);
16983         export function get_keysend_route(our_node_pubkey: Uint8Array, network: number, payee: Uint8Array, first_hops: number[], last_hops: number[], final_value_msat: number, final_cltv: number, logger: number, scorer: number): number {
16984                 if(!isWasmInitialized) {
16985                         throw new Error("initializeWasm() must be awaited first!");
16986                 }
16987                 const nativeResponseValue = wasm.get_keysend_route(encodeArray(our_node_pubkey), network, encodeArray(payee), first_hops, last_hops, final_value_msat, final_cltv, logger, scorer);
16988                 return nativeResponseValue;
16989         }
16990         // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_pubkey, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKInvoiceFeatures payee_features, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger, const struct LDKScore *NONNULL_PTR scorer);
16991         export function get_route(our_node_pubkey: Uint8Array, network: number, payee: Uint8Array, payee_features: number, first_hops: number[], last_hops: number[], final_value_msat: number, final_cltv: number, logger: number, scorer: number): number {
16992                 if(!isWasmInitialized) {
16993                         throw new Error("initializeWasm() must be awaited first!");
16994                 }
16995                 const nativeResponseValue = wasm.get_route(encodeArray(our_node_pubkey), network, encodeArray(payee), payee_features, first_hops, last_hops, final_value_msat, final_cltv, logger, scorer);
16996                 return nativeResponseValue;
16997         }
16998         // void Scorer_free(struct LDKScorer this_obj);
16999         export function Scorer_free(this_obj: number): void {
17000                 if(!isWasmInitialized) {
17001                         throw new Error("initializeWasm() must be awaited first!");
17002                 }
17003                 const nativeResponseValue = wasm.Scorer_free(this_obj);
17004                 // debug statements here
17005         }
17006         // MUST_USE_RES struct LDKScorer Scorer_new(uint64_t base_penalty_msat);
17007         export function Scorer_new(base_penalty_msat: number): number {
17008                 if(!isWasmInitialized) {
17009                         throw new Error("initializeWasm() must be awaited first!");
17010                 }
17011                 const nativeResponseValue = wasm.Scorer_new(base_penalty_msat);
17012                 return nativeResponseValue;
17013         }
17014         // MUST_USE_RES struct LDKScorer Scorer_default(void);
17015         export function Scorer_default(): number {
17016                 if(!isWasmInitialized) {
17017                         throw new Error("initializeWasm() must be awaited first!");
17018                 }
17019                 const nativeResponseValue = wasm.Scorer_default();
17020                 return nativeResponseValue;
17021         }
17022         // struct LDKScore Scorer_as_Score(const struct LDKScorer *NONNULL_PTR this_arg);
17023         export function Scorer_as_Score(this_arg: number): number {
17024                 if(!isWasmInitialized) {
17025                         throw new Error("initializeWasm() must be awaited first!");
17026                 }
17027                 const nativeResponseValue = wasm.Scorer_as_Score(this_arg);
17028                 return nativeResponseValue;
17029         }
17030         // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
17031         export function FilesystemPersister_free(this_obj: number): void {
17032                 if(!isWasmInitialized) {
17033                         throw new Error("initializeWasm() must be awaited first!");
17034                 }
17035                 const nativeResponseValue = wasm.FilesystemPersister_free(this_obj);
17036                 // debug statements here
17037         }
17038         // MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKStr path_to_channel_data);
17039         export function FilesystemPersister_new(path_to_channel_data: String): number {
17040                 if(!isWasmInitialized) {
17041                         throw new Error("initializeWasm() must be awaited first!");
17042                 }
17043                 const nativeResponseValue = wasm.FilesystemPersister_new(path_to_channel_data);
17044                 return nativeResponseValue;
17045         }
17046         // MUST_USE_RES struct LDKStr FilesystemPersister_get_data_dir(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
17047         export function FilesystemPersister_get_data_dir(this_arg: number): String {
17048                 if(!isWasmInitialized) {
17049                         throw new Error("initializeWasm() must be awaited first!");
17050                 }
17051                 const nativeResponseValue = wasm.FilesystemPersister_get_data_dir(this_arg);
17052                 return nativeResponseValue;
17053         }
17054         // MUST_USE_RES struct LDKCResult_NoneErrorZ FilesystemPersister_persist_manager(struct LDKStr data_dir, const struct LDKChannelManager *NONNULL_PTR manager);
17055         export function FilesystemPersister_persist_manager(data_dir: String, manager: number): number {
17056                 if(!isWasmInitialized) {
17057                         throw new Error("initializeWasm() must be awaited first!");
17058                 }
17059                 const nativeResponseValue = wasm.FilesystemPersister_persist_manager(data_dir, manager);
17060                 return nativeResponseValue;
17061         }
17062         // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ FilesystemPersister_read_channelmonitors(const struct LDKFilesystemPersister *NONNULL_PTR this_arg, struct LDKKeysInterface keys_manager);
17063         export function FilesystemPersister_read_channelmonitors(this_arg: number, keys_manager: number): number {
17064                 if(!isWasmInitialized) {
17065                         throw new Error("initializeWasm() must be awaited first!");
17066                 }
17067                 const nativeResponseValue = wasm.FilesystemPersister_read_channelmonitors(this_arg, keys_manager);
17068                 return nativeResponseValue;
17069         }
17070         // struct LDKPersist FilesystemPersister_as_Persist(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
17071         export function FilesystemPersister_as_Persist(this_arg: number): number {
17072                 if(!isWasmInitialized) {
17073                         throw new Error("initializeWasm() must be awaited first!");
17074                 }
17075                 const nativeResponseValue = wasm.FilesystemPersister_as_Persist(this_arg);
17076                 return nativeResponseValue;
17077         }
17078         // void BackgroundProcessor_free(struct LDKBackgroundProcessor this_obj);
17079         export function BackgroundProcessor_free(this_obj: number): void {
17080                 if(!isWasmInitialized) {
17081                         throw new Error("initializeWasm() must be awaited first!");
17082                 }
17083                 const nativeResponseValue = wasm.BackgroundProcessor_free(this_obj);
17084                 // debug statements here
17085         }
17086         // void ChannelManagerPersister_free(struct LDKChannelManagerPersister this_ptr);
17087         export function ChannelManagerPersister_free(this_ptr: number): void {
17088                 if(!isWasmInitialized) {
17089                         throw new Error("initializeWasm() must be awaited first!");
17090                 }
17091                 const nativeResponseValue = wasm.ChannelManagerPersister_free(this_ptr);
17092                 // debug statements here
17093         }
17094         // 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);
17095         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 {
17096                 if(!isWasmInitialized) {
17097                         throw new Error("initializeWasm() must be awaited first!");
17098                 }
17099                 const nativeResponseValue = wasm.BackgroundProcessor_start(persister, event_handler, chain_monitor, channel_manager, net_graph_msg_handler, peer_manager, logger);
17100                 return nativeResponseValue;
17101         }
17102         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_join(struct LDKBackgroundProcessor this_arg);
17103         export function BackgroundProcessor_join(this_arg: number): number {
17104                 if(!isWasmInitialized) {
17105                         throw new Error("initializeWasm() must be awaited first!");
17106                 }
17107                 const nativeResponseValue = wasm.BackgroundProcessor_join(this_arg);
17108                 return nativeResponseValue;
17109         }
17110         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg);
17111         export function BackgroundProcessor_stop(this_arg: number): number {
17112                 if(!isWasmInitialized) {
17113                         throw new Error("initializeWasm() must be awaited first!");
17114                 }
17115                 const nativeResponseValue = wasm.BackgroundProcessor_stop(this_arg);
17116                 return nativeResponseValue;
17117         }
17118         // void check_platform(void);
17119         export function check_platform(): void {
17120                 if(!isWasmInitialized) {
17121                         throw new Error("initializeWasm() must be awaited first!");
17122                 }
17123                 const nativeResponseValue = wasm.check_platform();
17124                 // debug statements here
17125         }
17126         // void Invoice_free(struct LDKInvoice this_obj);
17127         export function Invoice_free(this_obj: number): void {
17128                 if(!isWasmInitialized) {
17129                         throw new Error("initializeWasm() must be awaited first!");
17130                 }
17131                 const nativeResponseValue = wasm.Invoice_free(this_obj);
17132                 // debug statements here
17133         }
17134         // bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice *NONNULL_PTR b);
17135         export function Invoice_eq(a: number, b: number): boolean {
17136                 if(!isWasmInitialized) {
17137                         throw new Error("initializeWasm() must be awaited first!");
17138                 }
17139                 const nativeResponseValue = wasm.Invoice_eq(a, b);
17140                 return nativeResponseValue;
17141         }
17142         // struct LDKInvoice Invoice_clone(const struct LDKInvoice *NONNULL_PTR orig);
17143         export function Invoice_clone(orig: number): number {
17144                 if(!isWasmInitialized) {
17145                         throw new Error("initializeWasm() must be awaited first!");
17146                 }
17147                 const nativeResponseValue = wasm.Invoice_clone(orig);
17148                 return nativeResponseValue;
17149         }
17150         // void SignedRawInvoice_free(struct LDKSignedRawInvoice this_obj);
17151         export function SignedRawInvoice_free(this_obj: number): void {
17152                 if(!isWasmInitialized) {
17153                         throw new Error("initializeWasm() must be awaited first!");
17154                 }
17155                 const nativeResponseValue = wasm.SignedRawInvoice_free(this_obj);
17156                 // debug statements here
17157         }
17158         // bool SignedRawInvoice_eq(const struct LDKSignedRawInvoice *NONNULL_PTR a, const struct LDKSignedRawInvoice *NONNULL_PTR b);
17159         export function SignedRawInvoice_eq(a: number, b: number): boolean {
17160                 if(!isWasmInitialized) {
17161                         throw new Error("initializeWasm() must be awaited first!");
17162                 }
17163                 const nativeResponseValue = wasm.SignedRawInvoice_eq(a, b);
17164                 return nativeResponseValue;
17165         }
17166         // struct LDKSignedRawInvoice SignedRawInvoice_clone(const struct LDKSignedRawInvoice *NONNULL_PTR orig);
17167         export function SignedRawInvoice_clone(orig: number): number {
17168                 if(!isWasmInitialized) {
17169                         throw new Error("initializeWasm() must be awaited first!");
17170                 }
17171                 const nativeResponseValue = wasm.SignedRawInvoice_clone(orig);
17172                 return nativeResponseValue;
17173         }
17174         // void RawInvoice_free(struct LDKRawInvoice this_obj);
17175         export function RawInvoice_free(this_obj: number): void {
17176                 if(!isWasmInitialized) {
17177                         throw new Error("initializeWasm() must be awaited first!");
17178                 }
17179                 const nativeResponseValue = wasm.RawInvoice_free(this_obj);
17180                 // debug statements here
17181         }
17182         // struct LDKRawDataPart RawInvoice_get_data(const struct LDKRawInvoice *NONNULL_PTR this_ptr);
17183         export function RawInvoice_get_data(this_ptr: number): number {
17184                 if(!isWasmInitialized) {
17185                         throw new Error("initializeWasm() must be awaited first!");
17186                 }
17187                 const nativeResponseValue = wasm.RawInvoice_get_data(this_ptr);
17188                 return nativeResponseValue;
17189         }
17190         // void RawInvoice_set_data(struct LDKRawInvoice *NONNULL_PTR this_ptr, struct LDKRawDataPart val);
17191         export function RawInvoice_set_data(this_ptr: number, val: number): void {
17192                 if(!isWasmInitialized) {
17193                         throw new Error("initializeWasm() must be awaited first!");
17194                 }
17195                 const nativeResponseValue = wasm.RawInvoice_set_data(this_ptr, val);
17196                 // debug statements here
17197         }
17198         // bool RawInvoice_eq(const struct LDKRawInvoice *NONNULL_PTR a, const struct LDKRawInvoice *NONNULL_PTR b);
17199         export function RawInvoice_eq(a: number, b: number): boolean {
17200                 if(!isWasmInitialized) {
17201                         throw new Error("initializeWasm() must be awaited first!");
17202                 }
17203                 const nativeResponseValue = wasm.RawInvoice_eq(a, b);
17204                 return nativeResponseValue;
17205         }
17206         // struct LDKRawInvoice RawInvoice_clone(const struct LDKRawInvoice *NONNULL_PTR orig);
17207         export function RawInvoice_clone(orig: number): number {
17208                 if(!isWasmInitialized) {
17209                         throw new Error("initializeWasm() must be awaited first!");
17210                 }
17211                 const nativeResponseValue = wasm.RawInvoice_clone(orig);
17212                 return nativeResponseValue;
17213         }
17214         // void RawDataPart_free(struct LDKRawDataPart this_obj);
17215         export function RawDataPart_free(this_obj: number): void {
17216                 if(!isWasmInitialized) {
17217                         throw new Error("initializeWasm() must be awaited first!");
17218                 }
17219                 const nativeResponseValue = wasm.RawDataPart_free(this_obj);
17220                 // debug statements here
17221         }
17222         // struct LDKPositiveTimestamp RawDataPart_get_timestamp(const struct LDKRawDataPart *NONNULL_PTR this_ptr);
17223         export function RawDataPart_get_timestamp(this_ptr: number): number {
17224                 if(!isWasmInitialized) {
17225                         throw new Error("initializeWasm() must be awaited first!");
17226                 }
17227                 const nativeResponseValue = wasm.RawDataPart_get_timestamp(this_ptr);
17228                 return nativeResponseValue;
17229         }
17230         // void RawDataPart_set_timestamp(struct LDKRawDataPart *NONNULL_PTR this_ptr, struct LDKPositiveTimestamp val);
17231         export function RawDataPart_set_timestamp(this_ptr: number, val: number): void {
17232                 if(!isWasmInitialized) {
17233                         throw new Error("initializeWasm() must be awaited first!");
17234                 }
17235                 const nativeResponseValue = wasm.RawDataPart_set_timestamp(this_ptr, val);
17236                 // debug statements here
17237         }
17238         // bool RawDataPart_eq(const struct LDKRawDataPart *NONNULL_PTR a, const struct LDKRawDataPart *NONNULL_PTR b);
17239         export function RawDataPart_eq(a: number, b: number): boolean {
17240                 if(!isWasmInitialized) {
17241                         throw new Error("initializeWasm() must be awaited first!");
17242                 }
17243                 const nativeResponseValue = wasm.RawDataPart_eq(a, b);
17244                 return nativeResponseValue;
17245         }
17246         // struct LDKRawDataPart RawDataPart_clone(const struct LDKRawDataPart *NONNULL_PTR orig);
17247         export function RawDataPart_clone(orig: number): number {
17248                 if(!isWasmInitialized) {
17249                         throw new Error("initializeWasm() must be awaited first!");
17250                 }
17251                 const nativeResponseValue = wasm.RawDataPart_clone(orig);
17252                 return nativeResponseValue;
17253         }
17254         // void PositiveTimestamp_free(struct LDKPositiveTimestamp this_obj);
17255         export function PositiveTimestamp_free(this_obj: number): void {
17256                 if(!isWasmInitialized) {
17257                         throw new Error("initializeWasm() must be awaited first!");
17258                 }
17259                 const nativeResponseValue = wasm.PositiveTimestamp_free(this_obj);
17260                 // debug statements here
17261         }
17262         // bool PositiveTimestamp_eq(const struct LDKPositiveTimestamp *NONNULL_PTR a, const struct LDKPositiveTimestamp *NONNULL_PTR b);
17263         export function PositiveTimestamp_eq(a: number, b: number): boolean {
17264                 if(!isWasmInitialized) {
17265                         throw new Error("initializeWasm() must be awaited first!");
17266                 }
17267                 const nativeResponseValue = wasm.PositiveTimestamp_eq(a, b);
17268                 return nativeResponseValue;
17269         }
17270         // struct LDKPositiveTimestamp PositiveTimestamp_clone(const struct LDKPositiveTimestamp *NONNULL_PTR orig);
17271         export function PositiveTimestamp_clone(orig: number): number {
17272                 if(!isWasmInitialized) {
17273                         throw new Error("initializeWasm() must be awaited first!");
17274                 }
17275                 const nativeResponseValue = wasm.PositiveTimestamp_clone(orig);
17276                 return nativeResponseValue;
17277         }
17278         // enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig);
17279         export function SiPrefix_clone(orig: number): SiPrefix {
17280                 if(!isWasmInitialized) {
17281                         throw new Error("initializeWasm() must be awaited first!");
17282                 }
17283                 const nativeResponseValue = wasm.SiPrefix_clone(orig);
17284                 return nativeResponseValue;
17285         }
17286         // enum LDKSiPrefix SiPrefix_milli(void);
17287         export function SiPrefix_milli(): SiPrefix {
17288                 if(!isWasmInitialized) {
17289                         throw new Error("initializeWasm() must be awaited first!");
17290                 }
17291                 const nativeResponseValue = wasm.SiPrefix_milli();
17292                 return nativeResponseValue;
17293         }
17294         // enum LDKSiPrefix SiPrefix_micro(void);
17295         export function SiPrefix_micro(): SiPrefix {
17296                 if(!isWasmInitialized) {
17297                         throw new Error("initializeWasm() must be awaited first!");
17298                 }
17299                 const nativeResponseValue = wasm.SiPrefix_micro();
17300                 return nativeResponseValue;
17301         }
17302         // enum LDKSiPrefix SiPrefix_nano(void);
17303         export function SiPrefix_nano(): SiPrefix {
17304                 if(!isWasmInitialized) {
17305                         throw new Error("initializeWasm() must be awaited first!");
17306                 }
17307                 const nativeResponseValue = wasm.SiPrefix_nano();
17308                 return nativeResponseValue;
17309         }
17310         // enum LDKSiPrefix SiPrefix_pico(void);
17311         export function SiPrefix_pico(): SiPrefix {
17312                 if(!isWasmInitialized) {
17313                         throw new Error("initializeWasm() must be awaited first!");
17314                 }
17315                 const nativeResponseValue = wasm.SiPrefix_pico();
17316                 return nativeResponseValue;
17317         }
17318         // bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b);
17319         export function SiPrefix_eq(a: number, b: number): boolean {
17320                 if(!isWasmInitialized) {
17321                         throw new Error("initializeWasm() must be awaited first!");
17322                 }
17323                 const nativeResponseValue = wasm.SiPrefix_eq(a, b);
17324                 return nativeResponseValue;
17325         }
17326         // MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR this_arg);
17327         export function SiPrefix_multiplier(this_arg: number): number {
17328                 if(!isWasmInitialized) {
17329                         throw new Error("initializeWasm() must be awaited first!");
17330                 }
17331                 const nativeResponseValue = wasm.SiPrefix_multiplier(this_arg);
17332                 return nativeResponseValue;
17333         }
17334         // enum LDKCurrency Currency_clone(const enum LDKCurrency *NONNULL_PTR orig);
17335         export function Currency_clone(orig: number): Currency {
17336                 if(!isWasmInitialized) {
17337                         throw new Error("initializeWasm() must be awaited first!");
17338                 }
17339                 const nativeResponseValue = wasm.Currency_clone(orig);
17340                 return nativeResponseValue;
17341         }
17342         // enum LDKCurrency Currency_bitcoin(void);
17343         export function Currency_bitcoin(): Currency {
17344                 if(!isWasmInitialized) {
17345                         throw new Error("initializeWasm() must be awaited first!");
17346                 }
17347                 const nativeResponseValue = wasm.Currency_bitcoin();
17348                 return nativeResponseValue;
17349         }
17350         // enum LDKCurrency Currency_bitcoin_testnet(void);
17351         export function Currency_bitcoin_testnet(): Currency {
17352                 if(!isWasmInitialized) {
17353                         throw new Error("initializeWasm() must be awaited first!");
17354                 }
17355                 const nativeResponseValue = wasm.Currency_bitcoin_testnet();
17356                 return nativeResponseValue;
17357         }
17358         // enum LDKCurrency Currency_regtest(void);
17359         export function Currency_regtest(): Currency {
17360                 if(!isWasmInitialized) {
17361                         throw new Error("initializeWasm() must be awaited first!");
17362                 }
17363                 const nativeResponseValue = wasm.Currency_regtest();
17364                 return nativeResponseValue;
17365         }
17366         // enum LDKCurrency Currency_simnet(void);
17367         export function Currency_simnet(): Currency {
17368                 if(!isWasmInitialized) {
17369                         throw new Error("initializeWasm() must be awaited first!");
17370                 }
17371                 const nativeResponseValue = wasm.Currency_simnet();
17372                 return nativeResponseValue;
17373         }
17374         // enum LDKCurrency Currency_signet(void);
17375         export function Currency_signet(): Currency {
17376                 if(!isWasmInitialized) {
17377                         throw new Error("initializeWasm() must be awaited first!");
17378                 }
17379                 const nativeResponseValue = wasm.Currency_signet();
17380                 return nativeResponseValue;
17381         }
17382         // uint64_t Currency_hash(const enum LDKCurrency *NONNULL_PTR o);
17383         export function Currency_hash(o: number): number {
17384                 if(!isWasmInitialized) {
17385                         throw new Error("initializeWasm() must be awaited first!");
17386                 }
17387                 const nativeResponseValue = wasm.Currency_hash(o);
17388                 return nativeResponseValue;
17389         }
17390         // bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b);
17391         export function Currency_eq(a: number, b: number): boolean {
17392                 if(!isWasmInitialized) {
17393                         throw new Error("initializeWasm() must be awaited first!");
17394                 }
17395                 const nativeResponseValue = wasm.Currency_eq(a, b);
17396                 return nativeResponseValue;
17397         }
17398         // void Sha256_free(struct LDKSha256 this_obj);
17399         export function Sha256_free(this_obj: number): void {
17400                 if(!isWasmInitialized) {
17401                         throw new Error("initializeWasm() must be awaited first!");
17402                 }
17403                 const nativeResponseValue = wasm.Sha256_free(this_obj);
17404                 // debug statements here
17405         }
17406         // struct LDKSha256 Sha256_clone(const struct LDKSha256 *NONNULL_PTR orig);
17407         export function Sha256_clone(orig: number): number {
17408                 if(!isWasmInitialized) {
17409                         throw new Error("initializeWasm() must be awaited first!");
17410                 }
17411                 const nativeResponseValue = wasm.Sha256_clone(orig);
17412                 return nativeResponseValue;
17413         }
17414         // uint64_t Sha256_hash(const struct LDKSha256 *NONNULL_PTR o);
17415         export function Sha256_hash(o: number): number {
17416                 if(!isWasmInitialized) {
17417                         throw new Error("initializeWasm() must be awaited first!");
17418                 }
17419                 const nativeResponseValue = wasm.Sha256_hash(o);
17420                 return nativeResponseValue;
17421         }
17422         // bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b);
17423         export function Sha256_eq(a: number, b: number): boolean {
17424                 if(!isWasmInitialized) {
17425                         throw new Error("initializeWasm() must be awaited first!");
17426                 }
17427                 const nativeResponseValue = wasm.Sha256_eq(a, b);
17428                 return nativeResponseValue;
17429         }
17430         // void Description_free(struct LDKDescription this_obj);
17431         export function Description_free(this_obj: number): void {
17432                 if(!isWasmInitialized) {
17433                         throw new Error("initializeWasm() must be awaited first!");
17434                 }
17435                 const nativeResponseValue = wasm.Description_free(this_obj);
17436                 // debug statements here
17437         }
17438         // struct LDKDescription Description_clone(const struct LDKDescription *NONNULL_PTR orig);
17439         export function Description_clone(orig: number): number {
17440                 if(!isWasmInitialized) {
17441                         throw new Error("initializeWasm() must be awaited first!");
17442                 }
17443                 const nativeResponseValue = wasm.Description_clone(orig);
17444                 return nativeResponseValue;
17445         }
17446         // uint64_t Description_hash(const struct LDKDescription *NONNULL_PTR o);
17447         export function Description_hash(o: number): number {
17448                 if(!isWasmInitialized) {
17449                         throw new Error("initializeWasm() must be awaited first!");
17450                 }
17451                 const nativeResponseValue = wasm.Description_hash(o);
17452                 return nativeResponseValue;
17453         }
17454         // bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b);
17455         export function Description_eq(a: number, b: number): boolean {
17456                 if(!isWasmInitialized) {
17457                         throw new Error("initializeWasm() must be awaited first!");
17458                 }
17459                 const nativeResponseValue = wasm.Description_eq(a, b);
17460                 return nativeResponseValue;
17461         }
17462         // void PayeePubKey_free(struct LDKPayeePubKey this_obj);
17463         export function PayeePubKey_free(this_obj: number): void {
17464                 if(!isWasmInitialized) {
17465                         throw new Error("initializeWasm() must be awaited first!");
17466                 }
17467                 const nativeResponseValue = wasm.PayeePubKey_free(this_obj);
17468                 // debug statements here
17469         }
17470         // struct LDKPayeePubKey PayeePubKey_clone(const struct LDKPayeePubKey *NONNULL_PTR orig);
17471         export function PayeePubKey_clone(orig: number): number {
17472                 if(!isWasmInitialized) {
17473                         throw new Error("initializeWasm() must be awaited first!");
17474                 }
17475                 const nativeResponseValue = wasm.PayeePubKey_clone(orig);
17476                 return nativeResponseValue;
17477         }
17478         // uint64_t PayeePubKey_hash(const struct LDKPayeePubKey *NONNULL_PTR o);
17479         export function PayeePubKey_hash(o: number): number {
17480                 if(!isWasmInitialized) {
17481                         throw new Error("initializeWasm() must be awaited first!");
17482                 }
17483                 const nativeResponseValue = wasm.PayeePubKey_hash(o);
17484                 return nativeResponseValue;
17485         }
17486         // bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b);
17487         export function PayeePubKey_eq(a: number, b: number): boolean {
17488                 if(!isWasmInitialized) {
17489                         throw new Error("initializeWasm() must be awaited first!");
17490                 }
17491                 const nativeResponseValue = wasm.PayeePubKey_eq(a, b);
17492                 return nativeResponseValue;
17493         }
17494         // void ExpiryTime_free(struct LDKExpiryTime this_obj);
17495         export function ExpiryTime_free(this_obj: number): void {
17496                 if(!isWasmInitialized) {
17497                         throw new Error("initializeWasm() must be awaited first!");
17498                 }
17499                 const nativeResponseValue = wasm.ExpiryTime_free(this_obj);
17500                 // debug statements here
17501         }
17502         // struct LDKExpiryTime ExpiryTime_clone(const struct LDKExpiryTime *NONNULL_PTR orig);
17503         export function ExpiryTime_clone(orig: number): number {
17504                 if(!isWasmInitialized) {
17505                         throw new Error("initializeWasm() must be awaited first!");
17506                 }
17507                 const nativeResponseValue = wasm.ExpiryTime_clone(orig);
17508                 return nativeResponseValue;
17509         }
17510         // uint64_t ExpiryTime_hash(const struct LDKExpiryTime *NONNULL_PTR o);
17511         export function ExpiryTime_hash(o: number): number {
17512                 if(!isWasmInitialized) {
17513                         throw new Error("initializeWasm() must be awaited first!");
17514                 }
17515                 const nativeResponseValue = wasm.ExpiryTime_hash(o);
17516                 return nativeResponseValue;
17517         }
17518         // bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b);
17519         export function ExpiryTime_eq(a: number, b: number): boolean {
17520                 if(!isWasmInitialized) {
17521                         throw new Error("initializeWasm() must be awaited first!");
17522                 }
17523                 const nativeResponseValue = wasm.ExpiryTime_eq(a, b);
17524                 return nativeResponseValue;
17525         }
17526         // void MinFinalCltvExpiry_free(struct LDKMinFinalCltvExpiry this_obj);
17527         export function MinFinalCltvExpiry_free(this_obj: number): void {
17528                 if(!isWasmInitialized) {
17529                         throw new Error("initializeWasm() must be awaited first!");
17530                 }
17531                 const nativeResponseValue = wasm.MinFinalCltvExpiry_free(this_obj);
17532                 // debug statements here
17533         }
17534         // struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_clone(const struct LDKMinFinalCltvExpiry *NONNULL_PTR orig);
17535         export function MinFinalCltvExpiry_clone(orig: number): number {
17536                 if(!isWasmInitialized) {
17537                         throw new Error("initializeWasm() must be awaited first!");
17538                 }
17539                 const nativeResponseValue = wasm.MinFinalCltvExpiry_clone(orig);
17540                 return nativeResponseValue;
17541         }
17542         // uint64_t MinFinalCltvExpiry_hash(const struct LDKMinFinalCltvExpiry *NONNULL_PTR o);
17543         export function MinFinalCltvExpiry_hash(o: number): number {
17544                 if(!isWasmInitialized) {
17545                         throw new Error("initializeWasm() must be awaited first!");
17546                 }
17547                 const nativeResponseValue = wasm.MinFinalCltvExpiry_hash(o);
17548                 return nativeResponseValue;
17549         }
17550         // bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b);
17551         export function MinFinalCltvExpiry_eq(a: number, b: number): boolean {
17552                 if(!isWasmInitialized) {
17553                         throw new Error("initializeWasm() must be awaited first!");
17554                 }
17555                 const nativeResponseValue = wasm.MinFinalCltvExpiry_eq(a, b);
17556                 return nativeResponseValue;
17557         }
17558         // void Fallback_free(struct LDKFallback this_ptr);
17559         export function Fallback_free(this_ptr: number): void {
17560                 if(!isWasmInitialized) {
17561                         throw new Error("initializeWasm() must be awaited first!");
17562                 }
17563                 const nativeResponseValue = wasm.Fallback_free(this_ptr);
17564                 // debug statements here
17565         }
17566         // struct LDKFallback Fallback_clone(const struct LDKFallback *NONNULL_PTR orig);
17567         export function Fallback_clone(orig: number): number {
17568                 if(!isWasmInitialized) {
17569                         throw new Error("initializeWasm() must be awaited first!");
17570                 }
17571                 const nativeResponseValue = wasm.Fallback_clone(orig);
17572                 return nativeResponseValue;
17573         }
17574         // struct LDKFallback Fallback_seg_wit_program(struct LDKu5 version, struct LDKCVec_u8Z program);
17575         export function Fallback_seg_wit_program(version: number, program: Uint8Array): number {
17576                 if(!isWasmInitialized) {
17577                         throw new Error("initializeWasm() must be awaited first!");
17578                 }
17579                 const nativeResponseValue = wasm.Fallback_seg_wit_program(version, encodeArray(program));
17580                 return nativeResponseValue;
17581         }
17582         // struct LDKFallback Fallback_pub_key_hash(struct LDKTwentyBytes a);
17583         export function Fallback_pub_key_hash(a: Uint8Array): number {
17584                 if(!isWasmInitialized) {
17585                         throw new Error("initializeWasm() must be awaited first!");
17586                 }
17587                 const nativeResponseValue = wasm.Fallback_pub_key_hash(encodeArray(a));
17588                 return nativeResponseValue;
17589         }
17590         // struct LDKFallback Fallback_script_hash(struct LDKTwentyBytes a);
17591         export function Fallback_script_hash(a: Uint8Array): number {
17592                 if(!isWasmInitialized) {
17593                         throw new Error("initializeWasm() must be awaited first!");
17594                 }
17595                 const nativeResponseValue = wasm.Fallback_script_hash(encodeArray(a));
17596                 return nativeResponseValue;
17597         }
17598         // uint64_t Fallback_hash(const struct LDKFallback *NONNULL_PTR o);
17599         export function Fallback_hash(o: number): number {
17600                 if(!isWasmInitialized) {
17601                         throw new Error("initializeWasm() must be awaited first!");
17602                 }
17603                 const nativeResponseValue = wasm.Fallback_hash(o);
17604                 return nativeResponseValue;
17605         }
17606         // bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b);
17607         export function Fallback_eq(a: number, b: number): boolean {
17608                 if(!isWasmInitialized) {
17609                         throw new Error("initializeWasm() must be awaited first!");
17610                 }
17611                 const nativeResponseValue = wasm.Fallback_eq(a, b);
17612                 return nativeResponseValue;
17613         }
17614         // void InvoiceSignature_free(struct LDKInvoiceSignature this_obj);
17615         export function InvoiceSignature_free(this_obj: number): void {
17616                 if(!isWasmInitialized) {
17617                         throw new Error("initializeWasm() must be awaited first!");
17618                 }
17619                 const nativeResponseValue = wasm.InvoiceSignature_free(this_obj);
17620                 // debug statements here
17621         }
17622         // struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignature *NONNULL_PTR orig);
17623         export function InvoiceSignature_clone(orig: number): number {
17624                 if(!isWasmInitialized) {
17625                         throw new Error("initializeWasm() must be awaited first!");
17626                 }
17627                 const nativeResponseValue = wasm.InvoiceSignature_clone(orig);
17628                 return nativeResponseValue;
17629         }
17630         // bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b);
17631         export function InvoiceSignature_eq(a: number, b: number): boolean {
17632                 if(!isWasmInitialized) {
17633                         throw new Error("initializeWasm() must be awaited first!");
17634                 }
17635                 const nativeResponseValue = wasm.InvoiceSignature_eq(a, b);
17636                 return nativeResponseValue;
17637         }
17638         // void PrivateRoute_free(struct LDKPrivateRoute this_obj);
17639         export function PrivateRoute_free(this_obj: number): void {
17640                 if(!isWasmInitialized) {
17641                         throw new Error("initializeWasm() must be awaited first!");
17642                 }
17643                 const nativeResponseValue = wasm.PrivateRoute_free(this_obj);
17644                 // debug statements here
17645         }
17646         // struct LDKPrivateRoute PrivateRoute_clone(const struct LDKPrivateRoute *NONNULL_PTR orig);
17647         export function PrivateRoute_clone(orig: number): number {
17648                 if(!isWasmInitialized) {
17649                         throw new Error("initializeWasm() must be awaited first!");
17650                 }
17651                 const nativeResponseValue = wasm.PrivateRoute_clone(orig);
17652                 return nativeResponseValue;
17653         }
17654         // uint64_t PrivateRoute_hash(const struct LDKPrivateRoute *NONNULL_PTR o);
17655         export function PrivateRoute_hash(o: number): number {
17656                 if(!isWasmInitialized) {
17657                         throw new Error("initializeWasm() must be awaited first!");
17658                 }
17659                 const nativeResponseValue = wasm.PrivateRoute_hash(o);
17660                 return nativeResponseValue;
17661         }
17662         // bool PrivateRoute_eq(const struct LDKPrivateRoute *NONNULL_PTR a, const struct LDKPrivateRoute *NONNULL_PTR b);
17663         export function PrivateRoute_eq(a: number, b: number): boolean {
17664                 if(!isWasmInitialized) {
17665                         throw new Error("initializeWasm() must be awaited first!");
17666                 }
17667                 const nativeResponseValue = wasm.PrivateRoute_eq(a, b);
17668                 return nativeResponseValue;
17669         }
17670         // MUST_USE_RES struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ SignedRawInvoice_into_parts(struct LDKSignedRawInvoice this_arg);
17671         export function SignedRawInvoice_into_parts(this_arg: number): number {
17672                 if(!isWasmInitialized) {
17673                         throw new Error("initializeWasm() must be awaited first!");
17674                 }
17675                 const nativeResponseValue = wasm.SignedRawInvoice_into_parts(this_arg);
17676                 return nativeResponseValue;
17677         }
17678         // MUST_USE_RES struct LDKRawInvoice SignedRawInvoice_raw_invoice(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
17679         export function SignedRawInvoice_raw_invoice(this_arg: number): number {
17680                 if(!isWasmInitialized) {
17681                         throw new Error("initializeWasm() must be awaited first!");
17682                 }
17683                 const nativeResponseValue = wasm.SignedRawInvoice_raw_invoice(this_arg);
17684                 return nativeResponseValue;
17685         }
17686         // MUST_USE_RES const uint8_t (*SignedRawInvoice_hash(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg))[32];
17687         export function SignedRawInvoice_hash(this_arg: number): Uint8Array {
17688                 if(!isWasmInitialized) {
17689                         throw new Error("initializeWasm() must be awaited first!");
17690                 }
17691                 const nativeResponseValue = wasm.SignedRawInvoice_hash(this_arg);
17692                 return decodeArray(nativeResponseValue);
17693         }
17694         // MUST_USE_RES struct LDKInvoiceSignature SignedRawInvoice_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
17695         export function SignedRawInvoice_signature(this_arg: number): number {
17696                 if(!isWasmInitialized) {
17697                         throw new Error("initializeWasm() must be awaited first!");
17698                 }
17699                 const nativeResponseValue = wasm.SignedRawInvoice_signature(this_arg);
17700                 return nativeResponseValue;
17701         }
17702         // MUST_USE_RES struct LDKCResult_PayeePubKeyErrorZ SignedRawInvoice_recover_payee_pub_key(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
17703         export function SignedRawInvoice_recover_payee_pub_key(this_arg: number): number {
17704                 if(!isWasmInitialized) {
17705                         throw new Error("initializeWasm() must be awaited first!");
17706                 }
17707                 const nativeResponseValue = wasm.SignedRawInvoice_recover_payee_pub_key(this_arg);
17708                 return nativeResponseValue;
17709         }
17710         // MUST_USE_RES bool SignedRawInvoice_check_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
17711         export function SignedRawInvoice_check_signature(this_arg: number): boolean {
17712                 if(!isWasmInitialized) {
17713                         throw new Error("initializeWasm() must be awaited first!");
17714                 }
17715                 const nativeResponseValue = wasm.SignedRawInvoice_check_signature(this_arg);
17716                 return nativeResponseValue;
17717         }
17718         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17719         export function RawInvoice_hash(this_arg: number): Uint8Array {
17720                 if(!isWasmInitialized) {
17721                         throw new Error("initializeWasm() must be awaited first!");
17722                 }
17723                 const nativeResponseValue = wasm.RawInvoice_hash(this_arg);
17724                 return decodeArray(nativeResponseValue);
17725         }
17726         // MUST_USE_RES struct LDKSha256 RawInvoice_payment_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17727         export function RawInvoice_payment_hash(this_arg: number): number {
17728                 if(!isWasmInitialized) {
17729                         throw new Error("initializeWasm() must be awaited first!");
17730                 }
17731                 const nativeResponseValue = wasm.RawInvoice_payment_hash(this_arg);
17732                 return nativeResponseValue;
17733         }
17734         // MUST_USE_RES struct LDKDescription RawInvoice_description(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17735         export function RawInvoice_description(this_arg: number): number {
17736                 if(!isWasmInitialized) {
17737                         throw new Error("initializeWasm() must be awaited first!");
17738                 }
17739                 const nativeResponseValue = wasm.RawInvoice_description(this_arg);
17740                 return nativeResponseValue;
17741         }
17742         // MUST_USE_RES struct LDKPayeePubKey RawInvoice_payee_pub_key(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17743         export function RawInvoice_payee_pub_key(this_arg: number): number {
17744                 if(!isWasmInitialized) {
17745                         throw new Error("initializeWasm() must be awaited first!");
17746                 }
17747                 const nativeResponseValue = wasm.RawInvoice_payee_pub_key(this_arg);
17748                 return nativeResponseValue;
17749         }
17750         // MUST_USE_RES struct LDKSha256 RawInvoice_description_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17751         export function RawInvoice_description_hash(this_arg: number): number {
17752                 if(!isWasmInitialized) {
17753                         throw new Error("initializeWasm() must be awaited first!");
17754                 }
17755                 const nativeResponseValue = wasm.RawInvoice_description_hash(this_arg);
17756                 return nativeResponseValue;
17757         }
17758         // MUST_USE_RES struct LDKExpiryTime RawInvoice_expiry_time(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17759         export function RawInvoice_expiry_time(this_arg: number): number {
17760                 if(!isWasmInitialized) {
17761                         throw new Error("initializeWasm() must be awaited first!");
17762                 }
17763                 const nativeResponseValue = wasm.RawInvoice_expiry_time(this_arg);
17764                 return nativeResponseValue;
17765         }
17766         // MUST_USE_RES struct LDKMinFinalCltvExpiry RawInvoice_min_final_cltv_expiry(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17767         export function RawInvoice_min_final_cltv_expiry(this_arg: number): number {
17768                 if(!isWasmInitialized) {
17769                         throw new Error("initializeWasm() must be awaited first!");
17770                 }
17771                 const nativeResponseValue = wasm.RawInvoice_min_final_cltv_expiry(this_arg);
17772                 return nativeResponseValue;
17773         }
17774         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_payment_secret(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17775         export function RawInvoice_payment_secret(this_arg: number): Uint8Array {
17776                 if(!isWasmInitialized) {
17777                         throw new Error("initializeWasm() must be awaited first!");
17778                 }
17779                 const nativeResponseValue = wasm.RawInvoice_payment_secret(this_arg);
17780                 return decodeArray(nativeResponseValue);
17781         }
17782         // MUST_USE_RES struct LDKInvoiceFeatures RawInvoice_features(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17783         export function RawInvoice_features(this_arg: number): number {
17784                 if(!isWasmInitialized) {
17785                         throw new Error("initializeWasm() must be awaited first!");
17786                 }
17787                 const nativeResponseValue = wasm.RawInvoice_features(this_arg);
17788                 return nativeResponseValue;
17789         }
17790         // MUST_USE_RES struct LDKCVec_PrivateRouteZ RawInvoice_private_routes(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17791         export function RawInvoice_private_routes(this_arg: number): number[] {
17792                 if(!isWasmInitialized) {
17793                         throw new Error("initializeWasm() must be awaited first!");
17794                 }
17795                 const nativeResponseValue = wasm.RawInvoice_private_routes(this_arg);
17796                 return nativeResponseValue;
17797         }
17798         // MUST_USE_RES struct LDKCOption_u64Z RawInvoice_amount_pico_btc(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17799         export function RawInvoice_amount_pico_btc(this_arg: number): number {
17800                 if(!isWasmInitialized) {
17801                         throw new Error("initializeWasm() must be awaited first!");
17802                 }
17803                 const nativeResponseValue = wasm.RawInvoice_amount_pico_btc(this_arg);
17804                 return nativeResponseValue;
17805         }
17806         // MUST_USE_RES enum LDKCurrency RawInvoice_currency(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17807         export function RawInvoice_currency(this_arg: number): Currency {
17808                 if(!isWasmInitialized) {
17809                         throw new Error("initializeWasm() must be awaited first!");
17810                 }
17811                 const nativeResponseValue = wasm.RawInvoice_currency(this_arg);
17812                 return nativeResponseValue;
17813         }
17814         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_unix_timestamp(uint64_t unix_seconds);
17815         export function PositiveTimestamp_from_unix_timestamp(unix_seconds: number): number {
17816                 if(!isWasmInitialized) {
17817                         throw new Error("initializeWasm() must be awaited first!");
17818                 }
17819                 const nativeResponseValue = wasm.PositiveTimestamp_from_unix_timestamp(unix_seconds);
17820                 return nativeResponseValue;
17821         }
17822         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_system_time(uint64_t time);
17823         export function PositiveTimestamp_from_system_time(time: number): number {
17824                 if(!isWasmInitialized) {
17825                         throw new Error("initializeWasm() must be awaited first!");
17826                 }
17827                 const nativeResponseValue = wasm.PositiveTimestamp_from_system_time(time);
17828                 return nativeResponseValue;
17829         }
17830         // MUST_USE_RES uint64_t PositiveTimestamp_as_unix_timestamp(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
17831         export function PositiveTimestamp_as_unix_timestamp(this_arg: number): number {
17832                 if(!isWasmInitialized) {
17833                         throw new Error("initializeWasm() must be awaited first!");
17834                 }
17835                 const nativeResponseValue = wasm.PositiveTimestamp_as_unix_timestamp(this_arg);
17836                 return nativeResponseValue;
17837         }
17838         // MUST_USE_RES uint64_t PositiveTimestamp_as_time(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
17839         export function PositiveTimestamp_as_time(this_arg: number): number {
17840                 if(!isWasmInitialized) {
17841                         throw new Error("initializeWasm() must be awaited first!");
17842                 }
17843                 const nativeResponseValue = wasm.PositiveTimestamp_as_time(this_arg);
17844                 return nativeResponseValue;
17845         }
17846         // MUST_USE_RES struct LDKSignedRawInvoice Invoice_into_signed_raw(struct LDKInvoice this_arg);
17847         export function Invoice_into_signed_raw(this_arg: number): number {
17848                 if(!isWasmInitialized) {
17849                         throw new Error("initializeWasm() must be awaited first!");
17850                 }
17851                 const nativeResponseValue = wasm.Invoice_into_signed_raw(this_arg);
17852                 return nativeResponseValue;
17853         }
17854         // MUST_USE_RES struct LDKCResult_NoneSemanticErrorZ Invoice_check_signature(const struct LDKInvoice *NONNULL_PTR this_arg);
17855         export function Invoice_check_signature(this_arg: number): number {
17856                 if(!isWasmInitialized) {
17857                         throw new Error("initializeWasm() must be awaited first!");
17858                 }
17859                 const nativeResponseValue = wasm.Invoice_check_signature(this_arg);
17860                 return nativeResponseValue;
17861         }
17862         // MUST_USE_RES struct LDKCResult_InvoiceSemanticErrorZ Invoice_from_signed(struct LDKSignedRawInvoice signed_invoice);
17863         export function Invoice_from_signed(signed_invoice: number): number {
17864                 if(!isWasmInitialized) {
17865                         throw new Error("initializeWasm() must be awaited first!");
17866                 }
17867                 const nativeResponseValue = wasm.Invoice_from_signed(signed_invoice);
17868                 return nativeResponseValue;
17869         }
17870         // MUST_USE_RES uint64_t Invoice_timestamp(const struct LDKInvoice *NONNULL_PTR this_arg);
17871         export function Invoice_timestamp(this_arg: number): number {
17872                 if(!isWasmInitialized) {
17873                         throw new Error("initializeWasm() must be awaited first!");
17874                 }
17875                 const nativeResponseValue = wasm.Invoice_timestamp(this_arg);
17876                 return nativeResponseValue;
17877         }
17878         // MUST_USE_RES const uint8_t (*Invoice_payment_hash(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
17879         export function Invoice_payment_hash(this_arg: number): Uint8Array {
17880                 if(!isWasmInitialized) {
17881                         throw new Error("initializeWasm() must be awaited first!");
17882                 }
17883                 const nativeResponseValue = wasm.Invoice_payment_hash(this_arg);
17884                 return decodeArray(nativeResponseValue);
17885         }
17886         // MUST_USE_RES struct LDKPublicKey Invoice_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
17887         export function Invoice_payee_pub_key(this_arg: number): Uint8Array {
17888                 if(!isWasmInitialized) {
17889                         throw new Error("initializeWasm() must be awaited first!");
17890                 }
17891                 const nativeResponseValue = wasm.Invoice_payee_pub_key(this_arg);
17892                 return decodeArray(nativeResponseValue);
17893         }
17894         // MUST_USE_RES struct LDKThirtyTwoBytes Invoice_payment_secret(const struct LDKInvoice *NONNULL_PTR this_arg);
17895         export function Invoice_payment_secret(this_arg: number): Uint8Array {
17896                 if(!isWasmInitialized) {
17897                         throw new Error("initializeWasm() must be awaited first!");
17898                 }
17899                 const nativeResponseValue = wasm.Invoice_payment_secret(this_arg);
17900                 return decodeArray(nativeResponseValue);
17901         }
17902         // MUST_USE_RES struct LDKInvoiceFeatures Invoice_features(const struct LDKInvoice *NONNULL_PTR this_arg);
17903         export function Invoice_features(this_arg: number): number {
17904                 if(!isWasmInitialized) {
17905                         throw new Error("initializeWasm() must be awaited first!");
17906                 }
17907                 const nativeResponseValue = wasm.Invoice_features(this_arg);
17908                 return nativeResponseValue;
17909         }
17910         // MUST_USE_RES struct LDKPublicKey Invoice_recover_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
17911         export function Invoice_recover_payee_pub_key(this_arg: number): Uint8Array {
17912                 if(!isWasmInitialized) {
17913                         throw new Error("initializeWasm() must be awaited first!");
17914                 }
17915                 const nativeResponseValue = wasm.Invoice_recover_payee_pub_key(this_arg);
17916                 return decodeArray(nativeResponseValue);
17917         }
17918         // MUST_USE_RES uint64_t Invoice_expiry_time(const struct LDKInvoice *NONNULL_PTR this_arg);
17919         export function Invoice_expiry_time(this_arg: number): number {
17920                 if(!isWasmInitialized) {
17921                         throw new Error("initializeWasm() must be awaited first!");
17922                 }
17923                 const nativeResponseValue = wasm.Invoice_expiry_time(this_arg);
17924                 return nativeResponseValue;
17925         }
17926         // MUST_USE_RES uint64_t Invoice_min_final_cltv_expiry(const struct LDKInvoice *NONNULL_PTR this_arg);
17927         export function Invoice_min_final_cltv_expiry(this_arg: number): number {
17928                 if(!isWasmInitialized) {
17929                         throw new Error("initializeWasm() must be awaited first!");
17930                 }
17931                 const nativeResponseValue = wasm.Invoice_min_final_cltv_expiry(this_arg);
17932                 return nativeResponseValue;
17933         }
17934         // MUST_USE_RES struct LDKCVec_PrivateRouteZ Invoice_private_routes(const struct LDKInvoice *NONNULL_PTR this_arg);
17935         export function Invoice_private_routes(this_arg: number): number[] {
17936                 if(!isWasmInitialized) {
17937                         throw new Error("initializeWasm() must be awaited first!");
17938                 }
17939                 const nativeResponseValue = wasm.Invoice_private_routes(this_arg);
17940                 return nativeResponseValue;
17941         }
17942         // MUST_USE_RES struct LDKCVec_RouteHintZ Invoice_route_hints(const struct LDKInvoice *NONNULL_PTR this_arg);
17943         export function Invoice_route_hints(this_arg: number): number[] {
17944                 if(!isWasmInitialized) {
17945                         throw new Error("initializeWasm() must be awaited first!");
17946                 }
17947                 const nativeResponseValue = wasm.Invoice_route_hints(this_arg);
17948                 return nativeResponseValue;
17949         }
17950         // MUST_USE_RES enum LDKCurrency Invoice_currency(const struct LDKInvoice *NONNULL_PTR this_arg);
17951         export function Invoice_currency(this_arg: number): Currency {
17952                 if(!isWasmInitialized) {
17953                         throw new Error("initializeWasm() must be awaited first!");
17954                 }
17955                 const nativeResponseValue = wasm.Invoice_currency(this_arg);
17956                 return nativeResponseValue;
17957         }
17958         // MUST_USE_RES struct LDKCOption_u64Z Invoice_amount_pico_btc(const struct LDKInvoice *NONNULL_PTR this_arg);
17959         export function Invoice_amount_pico_btc(this_arg: number): number {
17960                 if(!isWasmInitialized) {
17961                         throw new Error("initializeWasm() must be awaited first!");
17962                 }
17963                 const nativeResponseValue = wasm.Invoice_amount_pico_btc(this_arg);
17964                 return nativeResponseValue;
17965         }
17966         // MUST_USE_RES struct LDKCResult_DescriptionCreationErrorZ Description_new(struct LDKStr description);
17967         export function Description_new(description: String): number {
17968                 if(!isWasmInitialized) {
17969                         throw new Error("initializeWasm() must be awaited first!");
17970                 }
17971                 const nativeResponseValue = wasm.Description_new(description);
17972                 return nativeResponseValue;
17973         }
17974         // MUST_USE_RES struct LDKStr Description_into_inner(struct LDKDescription this_arg);
17975         export function Description_into_inner(this_arg: number): String {
17976                 if(!isWasmInitialized) {
17977                         throw new Error("initializeWasm() must be awaited first!");
17978                 }
17979                 const nativeResponseValue = wasm.Description_into_inner(this_arg);
17980                 return nativeResponseValue;
17981         }
17982         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_seconds(uint64_t seconds);
17983         export function ExpiryTime_from_seconds(seconds: number): number {
17984                 if(!isWasmInitialized) {
17985                         throw new Error("initializeWasm() must be awaited first!");
17986                 }
17987                 const nativeResponseValue = wasm.ExpiryTime_from_seconds(seconds);
17988                 return nativeResponseValue;
17989         }
17990         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_duration(uint64_t duration);
17991         export function ExpiryTime_from_duration(duration: number): number {
17992                 if(!isWasmInitialized) {
17993                         throw new Error("initializeWasm() must be awaited first!");
17994                 }
17995                 const nativeResponseValue = wasm.ExpiryTime_from_duration(duration);
17996                 return nativeResponseValue;
17997         }
17998         // MUST_USE_RES uint64_t ExpiryTime_as_seconds(const struct LDKExpiryTime *NONNULL_PTR this_arg);
17999         export function ExpiryTime_as_seconds(this_arg: number): number {
18000                 if(!isWasmInitialized) {
18001                         throw new Error("initializeWasm() must be awaited first!");
18002                 }
18003                 const nativeResponseValue = wasm.ExpiryTime_as_seconds(this_arg);
18004                 return nativeResponseValue;
18005         }
18006         // MUST_USE_RES uint64_t ExpiryTime_as_duration(const struct LDKExpiryTime *NONNULL_PTR this_arg);
18007         export function ExpiryTime_as_duration(this_arg: number): number {
18008                 if(!isWasmInitialized) {
18009                         throw new Error("initializeWasm() must be awaited first!");
18010                 }
18011                 const nativeResponseValue = wasm.ExpiryTime_as_duration(this_arg);
18012                 return nativeResponseValue;
18013         }
18014         // MUST_USE_RES struct LDKCResult_PrivateRouteCreationErrorZ PrivateRoute_new(struct LDKRouteHint hops);
18015         export function PrivateRoute_new(hops: number): number {
18016                 if(!isWasmInitialized) {
18017                         throw new Error("initializeWasm() must be awaited first!");
18018                 }
18019                 const nativeResponseValue = wasm.PrivateRoute_new(hops);
18020                 return nativeResponseValue;
18021         }
18022         // MUST_USE_RES struct LDKRouteHint PrivateRoute_into_inner(struct LDKPrivateRoute this_arg);
18023         export function PrivateRoute_into_inner(this_arg: number): number {
18024                 if(!isWasmInitialized) {
18025                         throw new Error("initializeWasm() must be awaited first!");
18026                 }
18027                 const nativeResponseValue = wasm.PrivateRoute_into_inner(this_arg);
18028                 return nativeResponseValue;
18029         }
18030         // enum LDKCreationError CreationError_clone(const enum LDKCreationError *NONNULL_PTR orig);
18031         export function CreationError_clone(orig: number): CreationError {
18032                 if(!isWasmInitialized) {
18033                         throw new Error("initializeWasm() must be awaited first!");
18034                 }
18035                 const nativeResponseValue = wasm.CreationError_clone(orig);
18036                 return nativeResponseValue;
18037         }
18038         // enum LDKCreationError CreationError_description_too_long(void);
18039         export function CreationError_description_too_long(): CreationError {
18040                 if(!isWasmInitialized) {
18041                         throw new Error("initializeWasm() must be awaited first!");
18042                 }
18043                 const nativeResponseValue = wasm.CreationError_description_too_long();
18044                 return nativeResponseValue;
18045         }
18046         // enum LDKCreationError CreationError_route_too_long(void);
18047         export function CreationError_route_too_long(): CreationError {
18048                 if(!isWasmInitialized) {
18049                         throw new Error("initializeWasm() must be awaited first!");
18050                 }
18051                 const nativeResponseValue = wasm.CreationError_route_too_long();
18052                 return nativeResponseValue;
18053         }
18054         // enum LDKCreationError CreationError_timestamp_out_of_bounds(void);
18055         export function CreationError_timestamp_out_of_bounds(): CreationError {
18056                 if(!isWasmInitialized) {
18057                         throw new Error("initializeWasm() must be awaited first!");
18058                 }
18059                 const nativeResponseValue = wasm.CreationError_timestamp_out_of_bounds();
18060                 return nativeResponseValue;
18061         }
18062         // enum LDKCreationError CreationError_expiry_time_out_of_bounds(void);
18063         export function CreationError_expiry_time_out_of_bounds(): CreationError {
18064                 if(!isWasmInitialized) {
18065                         throw new Error("initializeWasm() must be awaited first!");
18066                 }
18067                 const nativeResponseValue = wasm.CreationError_expiry_time_out_of_bounds();
18068                 return nativeResponseValue;
18069         }
18070         // bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b);
18071         export function CreationError_eq(a: number, b: number): boolean {
18072                 if(!isWasmInitialized) {
18073                         throw new Error("initializeWasm() must be awaited first!");
18074                 }
18075                 const nativeResponseValue = wasm.CreationError_eq(a, b);
18076                 return nativeResponseValue;
18077         }
18078         // struct LDKStr CreationError_to_str(const enum LDKCreationError *NONNULL_PTR o);
18079         export function CreationError_to_str(o: number): String {
18080                 if(!isWasmInitialized) {
18081                         throw new Error("initializeWasm() must be awaited first!");
18082                 }
18083                 const nativeResponseValue = wasm.CreationError_to_str(o);
18084                 return nativeResponseValue;
18085         }
18086         // enum LDKSemanticError SemanticError_clone(const enum LDKSemanticError *NONNULL_PTR orig);
18087         export function SemanticError_clone(orig: number): SemanticError {
18088                 if(!isWasmInitialized) {
18089                         throw new Error("initializeWasm() must be awaited first!");
18090                 }
18091                 const nativeResponseValue = wasm.SemanticError_clone(orig);
18092                 return nativeResponseValue;
18093         }
18094         // enum LDKSemanticError SemanticError_no_payment_hash(void);
18095         export function SemanticError_no_payment_hash(): SemanticError {
18096                 if(!isWasmInitialized) {
18097                         throw new Error("initializeWasm() must be awaited first!");
18098                 }
18099                 const nativeResponseValue = wasm.SemanticError_no_payment_hash();
18100                 return nativeResponseValue;
18101         }
18102         // enum LDKSemanticError SemanticError_multiple_payment_hashes(void);
18103         export function SemanticError_multiple_payment_hashes(): SemanticError {
18104                 if(!isWasmInitialized) {
18105                         throw new Error("initializeWasm() must be awaited first!");
18106                 }
18107                 const nativeResponseValue = wasm.SemanticError_multiple_payment_hashes();
18108                 return nativeResponseValue;
18109         }
18110         // enum LDKSemanticError SemanticError_no_description(void);
18111         export function SemanticError_no_description(): SemanticError {
18112                 if(!isWasmInitialized) {
18113                         throw new Error("initializeWasm() must be awaited first!");
18114                 }
18115                 const nativeResponseValue = wasm.SemanticError_no_description();
18116                 return nativeResponseValue;
18117         }
18118         // enum LDKSemanticError SemanticError_multiple_descriptions(void);
18119         export function SemanticError_multiple_descriptions(): SemanticError {
18120                 if(!isWasmInitialized) {
18121                         throw new Error("initializeWasm() must be awaited first!");
18122                 }
18123                 const nativeResponseValue = wasm.SemanticError_multiple_descriptions();
18124                 return nativeResponseValue;
18125         }
18126         // enum LDKSemanticError SemanticError_no_payment_secret(void);
18127         export function SemanticError_no_payment_secret(): SemanticError {
18128                 if(!isWasmInitialized) {
18129                         throw new Error("initializeWasm() must be awaited first!");
18130                 }
18131                 const nativeResponseValue = wasm.SemanticError_no_payment_secret();
18132                 return nativeResponseValue;
18133         }
18134         // enum LDKSemanticError SemanticError_multiple_payment_secrets(void);
18135         export function SemanticError_multiple_payment_secrets(): SemanticError {
18136                 if(!isWasmInitialized) {
18137                         throw new Error("initializeWasm() must be awaited first!");
18138                 }
18139                 const nativeResponseValue = wasm.SemanticError_multiple_payment_secrets();
18140                 return nativeResponseValue;
18141         }
18142         // enum LDKSemanticError SemanticError_invalid_features(void);
18143         export function SemanticError_invalid_features(): SemanticError {
18144                 if(!isWasmInitialized) {
18145                         throw new Error("initializeWasm() must be awaited first!");
18146                 }
18147                 const nativeResponseValue = wasm.SemanticError_invalid_features();
18148                 return nativeResponseValue;
18149         }
18150         // enum LDKSemanticError SemanticError_invalid_recovery_id(void);
18151         export function SemanticError_invalid_recovery_id(): SemanticError {
18152                 if(!isWasmInitialized) {
18153                         throw new Error("initializeWasm() must be awaited first!");
18154                 }
18155                 const nativeResponseValue = wasm.SemanticError_invalid_recovery_id();
18156                 return nativeResponseValue;
18157         }
18158         // enum LDKSemanticError SemanticError_invalid_signature(void);
18159         export function SemanticError_invalid_signature(): SemanticError {
18160                 if(!isWasmInitialized) {
18161                         throw new Error("initializeWasm() must be awaited first!");
18162                 }
18163                 const nativeResponseValue = wasm.SemanticError_invalid_signature();
18164                 return nativeResponseValue;
18165         }
18166         // enum LDKSemanticError SemanticError_imprecise_amount(void);
18167         export function SemanticError_imprecise_amount(): SemanticError {
18168                 if(!isWasmInitialized) {
18169                         throw new Error("initializeWasm() must be awaited first!");
18170                 }
18171                 const nativeResponseValue = wasm.SemanticError_imprecise_amount();
18172                 return nativeResponseValue;
18173         }
18174         // bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b);
18175         export function SemanticError_eq(a: number, b: number): boolean {
18176                 if(!isWasmInitialized) {
18177                         throw new Error("initializeWasm() must be awaited first!");
18178                 }
18179                 const nativeResponseValue = wasm.SemanticError_eq(a, b);
18180                 return nativeResponseValue;
18181         }
18182         // struct LDKStr SemanticError_to_str(const enum LDKSemanticError *NONNULL_PTR o);
18183         export function SemanticError_to_str(o: number): String {
18184                 if(!isWasmInitialized) {
18185                         throw new Error("initializeWasm() must be awaited first!");
18186                 }
18187                 const nativeResponseValue = wasm.SemanticError_to_str(o);
18188                 return nativeResponseValue;
18189         }
18190         // void SignOrCreationError_free(struct LDKSignOrCreationError this_ptr);
18191         export function SignOrCreationError_free(this_ptr: number): void {
18192                 if(!isWasmInitialized) {
18193                         throw new Error("initializeWasm() must be awaited first!");
18194                 }
18195                 const nativeResponseValue = wasm.SignOrCreationError_free(this_ptr);
18196                 // debug statements here
18197         }
18198         // struct LDKSignOrCreationError SignOrCreationError_clone(const struct LDKSignOrCreationError *NONNULL_PTR orig);
18199         export function SignOrCreationError_clone(orig: number): number {
18200                 if(!isWasmInitialized) {
18201                         throw new Error("initializeWasm() must be awaited first!");
18202                 }
18203                 const nativeResponseValue = wasm.SignOrCreationError_clone(orig);
18204                 return nativeResponseValue;
18205         }
18206         // struct LDKSignOrCreationError SignOrCreationError_sign_error(void);
18207         export function SignOrCreationError_sign_error(): number {
18208                 if(!isWasmInitialized) {
18209                         throw new Error("initializeWasm() must be awaited first!");
18210                 }
18211                 const nativeResponseValue = wasm.SignOrCreationError_sign_error();
18212                 return nativeResponseValue;
18213         }
18214         // struct LDKSignOrCreationError SignOrCreationError_creation_error(enum LDKCreationError a);
18215         export function SignOrCreationError_creation_error(a: CreationError): number {
18216                 if(!isWasmInitialized) {
18217                         throw new Error("initializeWasm() must be awaited first!");
18218                 }
18219                 const nativeResponseValue = wasm.SignOrCreationError_creation_error(a);
18220                 return nativeResponseValue;
18221         }
18222         // bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b);
18223         export function SignOrCreationError_eq(a: number, b: number): boolean {
18224                 if(!isWasmInitialized) {
18225                         throw new Error("initializeWasm() must be awaited first!");
18226                 }
18227                 const nativeResponseValue = wasm.SignOrCreationError_eq(a, b);
18228                 return nativeResponseValue;
18229         }
18230         // struct LDKStr SignOrCreationError_to_str(const struct LDKSignOrCreationError *NONNULL_PTR o);
18231         export function SignOrCreationError_to_str(o: number): String {
18232                 if(!isWasmInitialized) {
18233                         throw new Error("initializeWasm() must be awaited first!");
18234                 }
18235                 const nativeResponseValue = wasm.SignOrCreationError_to_str(o);
18236                 return nativeResponseValue;
18237         }
18238         // 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);
18239         export function create_invoice_from_channelmanager(channelmanager: number, keys_manager: number, network: Currency, amt_msat: number, description: String): number {
18240                 if(!isWasmInitialized) {
18241                         throw new Error("initializeWasm() must be awaited first!");
18242                 }
18243                 const nativeResponseValue = wasm.create_invoice_from_channelmanager(channelmanager, keys_manager, network, amt_msat, description);
18244                 return nativeResponseValue;
18245         }
18246         // struct LDKCResult_SiPrefixNoneZ SiPrefix_from_str(struct LDKStr s);
18247         export function SiPrefix_from_str(s: String): number {
18248                 if(!isWasmInitialized) {
18249                         throw new Error("initializeWasm() must be awaited first!");
18250                 }
18251                 const nativeResponseValue = wasm.SiPrefix_from_str(s);
18252                 return nativeResponseValue;
18253         }
18254         // struct LDKCResult_InvoiceNoneZ Invoice_from_str(struct LDKStr s);
18255         export function Invoice_from_str(s: String): number {
18256                 if(!isWasmInitialized) {
18257                         throw new Error("initializeWasm() must be awaited first!");
18258                 }
18259                 const nativeResponseValue = wasm.Invoice_from_str(s);
18260                 return nativeResponseValue;
18261         }
18262         // struct LDKCResult_SignedRawInvoiceNoneZ SignedRawInvoice_from_str(struct LDKStr s);
18263         export function SignedRawInvoice_from_str(s: String): number {
18264                 if(!isWasmInitialized) {
18265                         throw new Error("initializeWasm() must be awaited first!");
18266                 }
18267                 const nativeResponseValue = wasm.SignedRawInvoice_from_str(s);
18268                 return nativeResponseValue;
18269         }
18270         // struct LDKStr Invoice_to_str(const struct LDKInvoice *NONNULL_PTR o);
18271         export function Invoice_to_str(o: number): String {
18272                 if(!isWasmInitialized) {
18273                         throw new Error("initializeWasm() must be awaited first!");
18274                 }
18275                 const nativeResponseValue = wasm.Invoice_to_str(o);
18276                 return nativeResponseValue;
18277         }
18278         // struct LDKStr SignedRawInvoice_to_str(const struct LDKSignedRawInvoice *NONNULL_PTR o);
18279         export function SignedRawInvoice_to_str(o: number): String {
18280                 if(!isWasmInitialized) {
18281                         throw new Error("initializeWasm() must be awaited first!");
18282                 }
18283                 const nativeResponseValue = wasm.SignedRawInvoice_to_str(o);
18284                 return nativeResponseValue;
18285         }
18286         // struct LDKStr Currency_to_str(const enum LDKCurrency *NONNULL_PTR o);
18287         export function Currency_to_str(o: number): String {
18288                 if(!isWasmInitialized) {
18289                         throw new Error("initializeWasm() must be awaited first!");
18290                 }
18291                 const nativeResponseValue = wasm.Currency_to_str(o);
18292                 return nativeResponseValue;
18293         }
18294         // struct LDKStr SiPrefix_to_str(const enum LDKSiPrefix *NONNULL_PTR o);
18295         export function SiPrefix_to_str(o: number): String {
18296                 if(!isWasmInitialized) {
18297                         throw new Error("initializeWasm() must be awaited first!");
18298                 }
18299                 const nativeResponseValue = wasm.SiPrefix_to_str(o);
18300                 return nativeResponseValue;
18301         }
18302
18303         export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
18304             if(isWasmInitialized && !allowDoubleInitialization) {
18305                 return;
18306             }
18307             const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
18308             wasm = wasmInstance.exports;
18309             isWasmInitialized = true;
18310         }
18311