Update auto-generate bindings (incl new RL clone methods)
[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         // uintptr_t C2Tuple_usizeTransactionZ_get_a(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
264         export function C2Tuple_usizeTransactionZ_get_a(tuple: number): number {
265                 if(!isWasmInitialized) {
266                         throw new Error("initializeWasm() must be awaited first!");
267                 }
268                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_get_a(tuple);
269                 return nativeResponseValue;
270         }
271         // struct LDKTransaction C2Tuple_usizeTransactionZ_get_b(LDKC2Tuple_usizeTransactionZ *NONNULL_PTR tuple);
272         export function C2Tuple_usizeTransactionZ_get_b(tuple: number): Uint8Array {
273                 if(!isWasmInitialized) {
274                         throw new Error("initializeWasm() must be awaited first!");
275                 }
276                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_get_b(tuple);
277                 return decodeArray(nativeResponseValue);
278         }
279         public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
280         public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
281         public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
282         public static native ChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
283         public static class LDKMonitorEvent {
284                 private LDKMonitorEvent() {}
285                 export class HTLCEvent extends LDKMonitorEvent {
286                         public number htlc_event;
287                         HTLCEvent(number htlc_event) { this.htlc_event = htlc_event; }
288                 }
289                 export class CommitmentTxConfirmed extends LDKMonitorEvent {
290                         public number commitment_tx_confirmed;
291                         CommitmentTxConfirmed(number commitment_tx_confirmed) { this.commitment_tx_confirmed = commitment_tx_confirmed; }
292                 }
293                 static native void init();
294         }
295         static { LDKMonitorEvent.init(); }
296         public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
297         public static native long LDKCVec_MonitorEventZ_new(number[] elems);
298         public static class LDKCOption_C2Tuple_usizeTransactionZZ {
299                 private LDKCOption_C2Tuple_usizeTransactionZZ() {}
300                 export class Some extends LDKCOption_C2Tuple_usizeTransactionZZ {
301                         public number some;
302                         Some(number some) { this.some = some; }
303                 }
304                 export class None extends LDKCOption_C2Tuple_usizeTransactionZZ {
305                         None() { }
306                 }
307                 static native void init();
308         }
309         static { LDKCOption_C2Tuple_usizeTransactionZZ.init(); }
310         public static native LDKCOption_C2Tuple_usizeTransactionZZ LDKCOption_C2Tuple_usizeTransactionZZ_ref_from_ptr(long ptr);
311         public static class LDKNetworkUpdate {
312                 private LDKNetworkUpdate() {}
313                 export class ChannelUpdateMessage extends LDKNetworkUpdate {
314                         public number msg;
315                         ChannelUpdateMessage(number msg) { this.msg = msg; }
316                 }
317                 export class ChannelClosed extends LDKNetworkUpdate {
318                         public number short_channel_id;
319                         public boolean is_permanent;
320                         ChannelClosed(number short_channel_id, boolean is_permanent) { this.short_channel_id = short_channel_id; this.is_permanent = is_permanent; }
321                 }
322                 export class NodeFailure extends LDKNetworkUpdate {
323                         public Uint8Array node_id;
324                         public boolean is_permanent;
325                         NodeFailure(Uint8Array node_id, boolean is_permanent) { this.node_id = node_id; this.is_permanent = is_permanent; }
326                 }
327                 static native void init();
328         }
329         static { LDKNetworkUpdate.init(); }
330         public static native LDKNetworkUpdate LDKNetworkUpdate_ref_from_ptr(long ptr);
331         public static class LDKCOption_NetworkUpdateZ {
332                 private LDKCOption_NetworkUpdateZ() {}
333                 export class Some extends LDKCOption_NetworkUpdateZ {
334                         public number some;
335                         Some(number some) { this.some = some; }
336                 }
337                 export class None extends LDKCOption_NetworkUpdateZ {
338                         None() { }
339                 }
340                 static native void init();
341         }
342         static { LDKCOption_NetworkUpdateZ.init(); }
343         public static native LDKCOption_NetworkUpdateZ LDKCOption_NetworkUpdateZ_ref_from_ptr(long ptr);
344         public static class LDKSpendableOutputDescriptor {
345                 private LDKSpendableOutputDescriptor() {}
346                 export class StaticOutput extends LDKSpendableOutputDescriptor {
347                         public number outpoint;
348                         public number output;
349                         StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
350                 }
351                 export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
352                         public number delayed_payment_output;
353                         DelayedPaymentOutput(number delayed_payment_output) { this.delayed_payment_output = delayed_payment_output; }
354                 }
355                 export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
356                         public number static_payment_output;
357                         StaticPaymentOutput(number static_payment_output) { this.static_payment_output = static_payment_output; }
358                 }
359                 static native void init();
360         }
361         static { LDKSpendableOutputDescriptor.init(); }
362         public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
363         public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
364         public static class LDKErrorAction {
365                 private LDKErrorAction() {}
366                 export class DisconnectPeer extends LDKErrorAction {
367                         public number msg;
368                         DisconnectPeer(number msg) { this.msg = msg; }
369                 }
370                 export class IgnoreError extends LDKErrorAction {
371                         IgnoreError() { }
372                 }
373                 export class IgnoreAndLog extends LDKErrorAction {
374                         public Level ignore_and_log;
375                         IgnoreAndLog(Level ignore_and_log) { this.ignore_and_log = ignore_and_log; }
376                 }
377                 export class SendErrorMessage extends LDKErrorAction {
378                         public number msg;
379                         SendErrorMessage(number msg) { this.msg = msg; }
380                 }
381                 static native void init();
382         }
383         static { LDKErrorAction.init(); }
384         public static native LDKErrorAction LDKErrorAction_ref_from_ptr(long ptr);
385         public static class LDKMessageSendEvent {
386                 private LDKMessageSendEvent() {}
387                 export class SendAcceptChannel extends LDKMessageSendEvent {
388                         public Uint8Array node_id;
389                         public number msg;
390                         SendAcceptChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
391                 }
392                 export class SendOpenChannel extends LDKMessageSendEvent {
393                         public Uint8Array node_id;
394                         public number msg;
395                         SendOpenChannel(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
396                 }
397                 export class SendFundingCreated extends LDKMessageSendEvent {
398                         public Uint8Array node_id;
399                         public number msg;
400                         SendFundingCreated(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
401                 }
402                 export class SendFundingSigned extends LDKMessageSendEvent {
403                         public Uint8Array node_id;
404                         public number msg;
405                         SendFundingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
406                 }
407                 export class SendFundingLocked extends LDKMessageSendEvent {
408                         public Uint8Array node_id;
409                         public number msg;
410                         SendFundingLocked(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
411                 }
412                 export class SendAnnouncementSignatures extends LDKMessageSendEvent {
413                         public Uint8Array node_id;
414                         public number msg;
415                         SendAnnouncementSignatures(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
416                 }
417                 export class UpdateHTLCs extends LDKMessageSendEvent {
418                         public Uint8Array node_id;
419                         public number updates;
420                         UpdateHTLCs(Uint8Array node_id, number updates) { this.node_id = node_id; this.updates = updates; }
421                 }
422                 export class SendRevokeAndACK extends LDKMessageSendEvent {
423                         public Uint8Array node_id;
424                         public number msg;
425                         SendRevokeAndACK(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
426                 }
427                 export class SendClosingSigned extends LDKMessageSendEvent {
428                         public Uint8Array node_id;
429                         public number msg;
430                         SendClosingSigned(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
431                 }
432                 export class SendShutdown extends LDKMessageSendEvent {
433                         public Uint8Array node_id;
434                         public number msg;
435                         SendShutdown(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
436                 }
437                 export class SendChannelReestablish extends LDKMessageSendEvent {
438                         public Uint8Array node_id;
439                         public number msg;
440                         SendChannelReestablish(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
441                 }
442                 export class BroadcastChannelAnnouncement extends LDKMessageSendEvent {
443                         public number msg;
444                         public number update_msg;
445                         BroadcastChannelAnnouncement(number msg, number update_msg) { this.msg = msg; this.update_msg = update_msg; }
446                 }
447                 export class BroadcastNodeAnnouncement extends LDKMessageSendEvent {
448                         public number msg;
449                         BroadcastNodeAnnouncement(number msg) { this.msg = msg; }
450                 }
451                 export class BroadcastChannelUpdate extends LDKMessageSendEvent {
452                         public number msg;
453                         BroadcastChannelUpdate(number msg) { this.msg = msg; }
454                 }
455                 export class SendChannelUpdate extends LDKMessageSendEvent {
456                         public Uint8Array node_id;
457                         public number msg;
458                         SendChannelUpdate(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
459                 }
460                 export class HandleError extends LDKMessageSendEvent {
461                         public Uint8Array node_id;
462                         public number action;
463                         HandleError(Uint8Array node_id, number action) { this.node_id = node_id; this.action = action; }
464                 }
465                 export class SendChannelRangeQuery extends LDKMessageSendEvent {
466                         public Uint8Array node_id;
467                         public number msg;
468                         SendChannelRangeQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
469                 }
470                 export class SendShortIdsQuery extends LDKMessageSendEvent {
471                         public Uint8Array node_id;
472                         public number msg;
473                         SendShortIdsQuery(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
474                 }
475                 export class SendReplyChannelRange extends LDKMessageSendEvent {
476                         public Uint8Array node_id;
477                         public number msg;
478                         SendReplyChannelRange(Uint8Array node_id, number msg) { this.node_id = node_id; this.msg = msg; }
479                 }
480                 static native void init();
481         }
482         static { LDKMessageSendEvent.init(); }
483         public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
484         public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
485         public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
486         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
487         public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
488         public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
489         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
490         public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
491         public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
492         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
493         public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
494         public static native boolean LDKCResult_InvoiceFeaturesDecodeErrorZ_result_ok(long arg);
495         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_ok(long arg);
496         public static native number LDKCResult_InvoiceFeaturesDecodeErrorZ_get_err(long arg);
497         public static native boolean LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
498         public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
499         public static native number LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
500         public static native boolean LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_result_ok(long arg);
501         public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_ok(long arg);
502         public static native number LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ_get_err(long arg);
503         public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
504         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
505         public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
506         public static native boolean LDKCResult_NoneNoneZ_result_ok(long arg);
507         public static native void LDKCResult_NoneNoneZ_get_ok(long arg);
508         public static native void LDKCResult_NoneNoneZ_get_err(long arg);
509         // struct LDKSignature C2Tuple_SignatureCVec_SignatureZZ_get_a(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
510         export function C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple: number): Uint8Array {
511                 if(!isWasmInitialized) {
512                         throw new Error("initializeWasm() must be awaited first!");
513                 }
514                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_get_a(tuple);
515                 return decodeArray(nativeResponseValue);
516         }
517         // struct LDKCVec_SignatureZ C2Tuple_SignatureCVec_SignatureZZ_get_b(LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR tuple);
518         export function C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple: number): Uint8Array[] {
519                 if(!isWasmInitialized) {
520                         throw new Error("initializeWasm() must be awaited first!");
521                 }
522                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_get_b(tuple);
523                 return nativeResponseValue;
524         }
525         public static native boolean LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(long arg);
526         public static native number LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(long arg);
527         public static native void LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(long arg);
528         public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
529         public static native Uint8Array LDKCResult_SignatureNoneZ_get_ok(long arg);
530         public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
531
532
533
534 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
535
536                 export interface LDKBaseSign {
537                         get_per_commitment_point (idx: number): Uint8Array;
538                         release_commitment_secret (idx: number): Uint8Array;
539                         validate_holder_commitment (holder_tx: number): number;
540                         channel_keys_id (): Uint8Array;
541                         sign_counterparty_commitment (commitment_tx: number): number;
542                         validate_counterparty_revocation (idx: number, secret: Uint8Array): number;
543                         sign_holder_commitment_and_htlcs (commitment_tx: number): number;
544                         sign_justice_revoked_output (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number;
545                         sign_justice_revoked_htlc (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
546                         sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number;
547                         sign_closing_transaction (closing_tx: number): number;
548                         sign_channel_announcement (msg: number): number;
549                         ready_channel (channel_parameters: number): void;
550                 }
551
552                 export function LDKBaseSign_new(impl: LDKBaseSign, pubkeys: number): number {
553             throw new Error('unimplemented'); // TODO: bind to WASM
554         }
555
556 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
557
558
559         // LDKPublicKey BaseSign_get_per_commitment_point LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
560         export function BaseSign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
561                 if(!isWasmInitialized) {
562                         throw new Error("initializeWasm() must be awaited first!");
563                 }
564                 const nativeResponseValue = wasm.BaseSign_get_per_commitment_point(this_arg, idx);
565                 return decodeArray(nativeResponseValue);
566         }
567         // LDKThirtyTwoBytes BaseSign_release_commitment_secret LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx
568         export function BaseSign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
569                 if(!isWasmInitialized) {
570                         throw new Error("initializeWasm() must be awaited first!");
571                 }
572                 const nativeResponseValue = wasm.BaseSign_release_commitment_secret(this_arg, idx);
573                 return decodeArray(nativeResponseValue);
574         }
575         // LDKCResult_NoneNoneZ BaseSign_validate_holder_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR holder_tx
576         export function BaseSign_validate_holder_commitment(this_arg: number, holder_tx: number): number {
577                 if(!isWasmInitialized) {
578                         throw new Error("initializeWasm() must be awaited first!");
579                 }
580                 const nativeResponseValue = wasm.BaseSign_validate_holder_commitment(this_arg, holder_tx);
581                 return nativeResponseValue;
582         }
583         // LDKThirtyTwoBytes BaseSign_channel_keys_id LDKBaseSign *NONNULL_PTR this_arg
584         export function BaseSign_channel_keys_id(this_arg: number): Uint8Array {
585                 if(!isWasmInitialized) {
586                         throw new Error("initializeWasm() must be awaited first!");
587                 }
588                 const nativeResponseValue = wasm.BaseSign_channel_keys_id(this_arg);
589                 return decodeArray(nativeResponseValue);
590         }
591         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_counterparty_commitment LDKBaseSign *NONNULL_PTR this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
592         export function BaseSign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
593                 if(!isWasmInitialized) {
594                         throw new Error("initializeWasm() must be awaited first!");
595                 }
596                 const nativeResponseValue = wasm.BaseSign_sign_counterparty_commitment(this_arg, commitment_tx);
597                 return nativeResponseValue;
598         }
599         // LDKCResult_NoneNoneZ BaseSign_validate_counterparty_revocation LDKBaseSign *NONNULL_PTR this_arg, uint64_t idx, const uint8_t (*secret)[32]
600         export function BaseSign_validate_counterparty_revocation(this_arg: number, idx: number, secret: Uint8Array): number {
601                 if(!isWasmInitialized) {
602                         throw new Error("initializeWasm() must be awaited first!");
603                 }
604                 const nativeResponseValue = wasm.BaseSign_validate_counterparty_revocation(this_arg, idx, encodeArray(secret));
605                 return nativeResponseValue;
606         }
607         // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ BaseSign_sign_holder_commitment_and_htlcs LDKBaseSign *NONNULL_PTR this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
608         export function BaseSign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
609                 if(!isWasmInitialized) {
610                         throw new Error("initializeWasm() must be awaited first!");
611                 }
612                 const nativeResponseValue = wasm.BaseSign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
613                 return nativeResponseValue;
614         }
615         // 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]
616         export function BaseSign_sign_justice_revoked_output(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array): number {
617                 if(!isWasmInitialized) {
618                         throw new Error("initializeWasm() must be awaited first!");
619                 }
620                 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_output(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key));
621                 return nativeResponseValue;
622         }
623         // 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
624         export function BaseSign_sign_justice_revoked_htlc(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
625                 if(!isWasmInitialized) {
626                         throw new Error("initializeWasm() must be awaited first!");
627                 }
628                 const nativeResponseValue = wasm.BaseSign_sign_justice_revoked_htlc(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
629                 return nativeResponseValue;
630         }
631         // 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
632         export function BaseSign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
633                 if(!isWasmInitialized) {
634                         throw new Error("initializeWasm() must be awaited first!");
635                 }
636                 const nativeResponseValue = wasm.BaseSign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
637                 return nativeResponseValue;
638         }
639         // LDKCResult_SignatureNoneZ BaseSign_sign_closing_transaction LDKBaseSign *NONNULL_PTR this_arg, const struct LDKClosingTransaction *NONNULL_PTR closing_tx
640         export function BaseSign_sign_closing_transaction(this_arg: number, closing_tx: number): number {
641                 if(!isWasmInitialized) {
642                         throw new Error("initializeWasm() must be awaited first!");
643                 }
644                 const nativeResponseValue = wasm.BaseSign_sign_closing_transaction(this_arg, closing_tx);
645                 return nativeResponseValue;
646         }
647         // LDKCResult_SignatureNoneZ BaseSign_sign_channel_announcement LDKBaseSign *NONNULL_PTR this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
648         export function BaseSign_sign_channel_announcement(this_arg: number, msg: number): number {
649                 if(!isWasmInitialized) {
650                         throw new Error("initializeWasm() must be awaited first!");
651                 }
652                 const nativeResponseValue = wasm.BaseSign_sign_channel_announcement(this_arg, msg);
653                 return nativeResponseValue;
654         }
655         // void BaseSign_ready_channel LDKBaseSign *NONNULL_PTR this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
656         export function BaseSign_ready_channel(this_arg: number, channel_parameters: number): void {
657                 if(!isWasmInitialized) {
658                         throw new Error("initializeWasm() must be awaited first!");
659                 }
660                 const nativeResponseValue = wasm.BaseSign_ready_channel(this_arg, channel_parameters);
661                 // debug statements here
662         }
663         // LDKChannelPublicKeys BaseSign_get_pubkeys LDKBaseSign *NONNULL_PTR this_arg
664         export function BaseSign_get_pubkeys(this_arg: number): number {
665                 if(!isWasmInitialized) {
666                         throw new Error("initializeWasm() must be awaited first!");
667                 }
668                 const nativeResponseValue = wasm.BaseSign_get_pubkeys(this_arg);
669                 return nativeResponseValue;
670         }
671
672
673
674 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
675
676                 export interface LDKSign {
677                         write (): Uint8Array;
678                 }
679
680                 export function LDKSign_new(impl: LDKSign, BaseSign: LDKBaseSign, pubkeys: number): number {
681             throw new Error('unimplemented'); // TODO: bind to WASM
682         }
683
684 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
685
686
687         // LDKCVec_u8Z Sign_write LDKSign *NONNULL_PTR this_arg
688         export function Sign_write(this_arg: number): Uint8Array {
689                 if(!isWasmInitialized) {
690                         throw new Error("initializeWasm() must be awaited first!");
691                 }
692                 const nativeResponseValue = wasm.Sign_write(this_arg);
693                 return decodeArray(nativeResponseValue);
694         }
695         public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
696         public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
697         public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
698         public static native boolean LDKCResult_RecoverableSignatureNoneZ_result_ok(long arg);
699         public static native Uint8Array LDKCResult_RecoverableSignatureNoneZ_get_ok(long arg);
700         public static native void LDKCResult_RecoverableSignatureNoneZ_get_err(long arg);
701         public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
702         public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
703         public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
704         public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
705         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
706         public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
707         public static native long LDKCVec_TxOutZ_new(number[] elems);
708         public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
709         public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
710         public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
711         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelMonitorZ_get_a(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
712         export function C2Tuple_BlockHashChannelMonitorZ_get_a(tuple: number): Uint8Array {
713                 if(!isWasmInitialized) {
714                         throw new Error("initializeWasm() must be awaited first!");
715                 }
716                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_get_a(tuple);
717                 return decodeArray(nativeResponseValue);
718         }
719         // struct LDKChannelMonitor C2Tuple_BlockHashChannelMonitorZ_get_b(LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR tuple);
720         export function C2Tuple_BlockHashChannelMonitorZ_get_b(tuple: number): number {
721                 if(!isWasmInitialized) {
722                         throw new Error("initializeWasm() must be awaited first!");
723                 }
724                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_get_b(tuple);
725                 return nativeResponseValue;
726         }
727         public static native long LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_new(number[] elems);
728         public static native boolean LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_result_ok(long arg);
729         public static native number[] LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_ok(long arg);
730         public static native IOError LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_get_err(long arg);
731         public static native boolean LDKCResult_PaymentIdDecodeErrorZ_result_ok(long arg);
732         public static native number LDKCResult_PaymentIdDecodeErrorZ_get_ok(long arg);
733         public static native number LDKCResult_PaymentIdDecodeErrorZ_get_err(long arg);
734         public static class LDKCOption_u16Z {
735                 private LDKCOption_u16Z() {}
736                 export class Some extends LDKCOption_u16Z {
737                         public number some;
738                         Some(number some) { this.some = some; }
739                 }
740                 export class None extends LDKCOption_u16Z {
741                         None() { }
742                 }
743                 static native void init();
744         }
745         static { LDKCOption_u16Z.init(); }
746         public static native LDKCOption_u16Z LDKCOption_u16Z_ref_from_ptr(long ptr);
747         public static class LDKAPIError {
748                 private LDKAPIError() {}
749                 export class APIMisuseError extends LDKAPIError {
750                         public String err;
751                         APIMisuseError(String err) { this.err = err; }
752                 }
753                 export class FeeRateTooHigh extends LDKAPIError {
754                         public String err;
755                         public number feerate;
756                         FeeRateTooHigh(String err, number feerate) { this.err = err; this.feerate = feerate; }
757                 }
758                 export class RouteError extends LDKAPIError {
759                         public String err;
760                         RouteError(String err) { this.err = err; }
761                 }
762                 export class ChannelUnavailable extends LDKAPIError {
763                         public String err;
764                         ChannelUnavailable(String err) { this.err = err; }
765                 }
766                 export class MonitorUpdateFailed extends LDKAPIError {
767                         MonitorUpdateFailed() { }
768                 }
769                 export class IncompatibleShutdownScript extends LDKAPIError {
770                         public number script;
771                         IncompatibleShutdownScript(number script) { this.script = script; }
772                 }
773                 static native void init();
774         }
775         static { LDKAPIError.init(); }
776         public static native LDKAPIError LDKAPIError_ref_from_ptr(long ptr);
777         public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
778         public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
779         public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
780         public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
781         public static native long LDKCVec_APIErrorZ_new(number[] elems);
782         public static native boolean LDKCResult__u832APIErrorZ_result_ok(long arg);
783         public static native Uint8Array LDKCResult__u832APIErrorZ_get_ok(long arg);
784         public static native number LDKCResult__u832APIErrorZ_get_err(long arg);
785         public static class LDKPaymentSendFailure {
786                 private LDKPaymentSendFailure() {}
787                 export class ParameterError extends LDKPaymentSendFailure {
788                         public number parameter_error;
789                         ParameterError(number parameter_error) { this.parameter_error = parameter_error; }
790                 }
791                 export class PathParameterError extends LDKPaymentSendFailure {
792                         public number[] path_parameter_error;
793                         PathParameterError(number[] path_parameter_error) { this.path_parameter_error = path_parameter_error; }
794                 }
795                 export class AllFailedRetrySafe extends LDKPaymentSendFailure {
796                         public number[] all_failed_retry_safe;
797                         AllFailedRetrySafe(number[] all_failed_retry_safe) { this.all_failed_retry_safe = all_failed_retry_safe; }
798                 }
799                 export class PartialFailure extends LDKPaymentSendFailure {
800                         public number[] partial_failure;
801                         PartialFailure(number[] partial_failure) { this.partial_failure = partial_failure; }
802                 }
803                 static native void init();
804         }
805         static { LDKPaymentSendFailure.init(); }
806         public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
807         public static native boolean LDKCResult_PaymentIdPaymentSendFailureZ_result_ok(long arg);
808         public static native number LDKCResult_PaymentIdPaymentSendFailureZ_get_ok(long arg);
809         public static native number LDKCResult_PaymentIdPaymentSendFailureZ_get_err(long arg);
810         public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
811         public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
812         public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
813         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentIdZ_get_a(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR tuple);
814         export function C2Tuple_PaymentHashPaymentIdZ_get_a(tuple: number): Uint8Array {
815                 if(!isWasmInitialized) {
816                         throw new Error("initializeWasm() must be awaited first!");
817                 }
818                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_get_a(tuple);
819                 return decodeArray(nativeResponseValue);
820         }
821         // struct LDKPaymentId C2Tuple_PaymentHashPaymentIdZ_get_b(LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR tuple);
822         export function C2Tuple_PaymentHashPaymentIdZ_get_b(tuple: number): number {
823                 if(!isWasmInitialized) {
824                         throw new Error("initializeWasm() must be awaited first!");
825                 }
826                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_get_b(tuple);
827                 return nativeResponseValue;
828         }
829         public static native boolean LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_result_ok(long arg);
830         public static native number LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_ok(long arg);
831         public static native number LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_get_err(long arg);
832         public static class LDKNetAddress {
833                 private LDKNetAddress() {}
834                 export class IPv4 extends LDKNetAddress {
835                         public Uint8Array addr;
836                         public number port;
837                         IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
838                 }
839                 export class IPv6 extends LDKNetAddress {
840                         public Uint8Array addr;
841                         public number port;
842                         IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
843                 }
844                 export class OnionV2 extends LDKNetAddress {
845                         public Uint8Array addr;
846                         public number port;
847                         OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
848                 }
849                 export class OnionV3 extends LDKNetAddress {
850                         public Uint8Array ed25519_pubkey;
851                         public number checksum;
852                         public number version;
853                         public number port;
854                         OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
855                 }
856                 static native void init();
857         }
858         static { LDKNetAddress.init(); }
859         public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
860         public static native long LDKCVec_NetAddressZ_new(number[] elems);
861         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_a(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
862         export function C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple: number): Uint8Array {
863                 if(!isWasmInitialized) {
864                         throw new Error("initializeWasm() must be awaited first!");
865                 }
866                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_get_a(tuple);
867                 return decodeArray(nativeResponseValue);
868         }
869         // struct LDKThirtyTwoBytes C2Tuple_PaymentHashPaymentSecretZ_get_b(LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR tuple);
870         export function C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple: number): Uint8Array {
871                 if(!isWasmInitialized) {
872                         throw new Error("initializeWasm() must be awaited first!");
873                 }
874                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_get_b(tuple);
875                 return decodeArray(nativeResponseValue);
876         }
877         public static native boolean LDKCResult_PaymentSecretAPIErrorZ_result_ok(long arg);
878         public static native Uint8Array LDKCResult_PaymentSecretAPIErrorZ_get_ok(long arg);
879         public static native number LDKCResult_PaymentSecretAPIErrorZ_get_err(long arg);
880         public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
881
882
883
884 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
885
886                 export interface LDKWatch {
887                         watch_channel (funding_txo: number, monitor: number): number;
888                         update_channel (funding_txo: number, update: number): number;
889                         release_pending_monitor_events (): number[];
890                 }
891
892                 export function LDKWatch_new(impl: LDKWatch): number {
893             throw new Error('unimplemented'); // TODO: bind to WASM
894         }
895
896 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
897
898
899         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_watch_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor
900         export function Watch_watch_channel(this_arg: number, funding_txo: number, monitor: number): number {
901                 if(!isWasmInitialized) {
902                         throw new Error("initializeWasm() must be awaited first!");
903                 }
904                 const nativeResponseValue = wasm.Watch_watch_channel(this_arg, funding_txo, monitor);
905                 return nativeResponseValue;
906         }
907         // LDKCResult_NoneChannelMonitorUpdateErrZ Watch_update_channel LDKWatch *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update
908         export function Watch_update_channel(this_arg: number, funding_txo: number, update: number): number {
909                 if(!isWasmInitialized) {
910                         throw new Error("initializeWasm() must be awaited first!");
911                 }
912                 const nativeResponseValue = wasm.Watch_update_channel(this_arg, funding_txo, update);
913                 return nativeResponseValue;
914         }
915         // LDKCVec_MonitorEventZ Watch_release_pending_monitor_events LDKWatch *NONNULL_PTR this_arg
916         export function Watch_release_pending_monitor_events(this_arg: number): number[] {
917                 if(!isWasmInitialized) {
918                         throw new Error("initializeWasm() must be awaited first!");
919                 }
920                 const nativeResponseValue = wasm.Watch_release_pending_monitor_events(this_arg);
921                 return nativeResponseValue;
922         }
923
924
925
926 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
927
928                 export interface LDKBroadcasterInterface {
929                         broadcast_transaction (tx: Uint8Array): void;
930                 }
931
932                 export function LDKBroadcasterInterface_new(impl: LDKBroadcasterInterface): number {
933             throw new Error('unimplemented'); // TODO: bind to WASM
934         }
935
936 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
937
938
939         // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface *NONNULL_PTR this_arg, struct LDKTransaction tx
940         export function BroadcasterInterface_broadcast_transaction(this_arg: number, tx: Uint8Array): void {
941                 if(!isWasmInitialized) {
942                         throw new Error("initializeWasm() must be awaited first!");
943                 }
944                 const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
945                 // debug statements here
946         }
947
948
949
950 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
951
952                 export interface LDKKeysInterface {
953                         get_node_secret (): Uint8Array;
954                         get_destination_script (): Uint8Array;
955                         get_shutdown_scriptpubkey (): number;
956                         get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
957                         get_secure_random_bytes (): Uint8Array;
958                         read_chan_signer (reader: Uint8Array): number;
959                         sign_invoice (invoice_preimage: Uint8Array): number;
960                 }
961
962                 export function LDKKeysInterface_new(impl: LDKKeysInterface): number {
963             throw new Error('unimplemented'); // TODO: bind to WASM
964         }
965
966 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
967
968
969         // LDKSecretKey KeysInterface_get_node_secret LDKKeysInterface *NONNULL_PTR this_arg
970         export function KeysInterface_get_node_secret(this_arg: number): Uint8Array {
971                 if(!isWasmInitialized) {
972                         throw new Error("initializeWasm() must be awaited first!");
973                 }
974                 const nativeResponseValue = wasm.KeysInterface_get_node_secret(this_arg);
975                 return decodeArray(nativeResponseValue);
976         }
977         // LDKCVec_u8Z KeysInterface_get_destination_script LDKKeysInterface *NONNULL_PTR this_arg
978         export function KeysInterface_get_destination_script(this_arg: number): Uint8Array {
979                 if(!isWasmInitialized) {
980                         throw new Error("initializeWasm() must be awaited first!");
981                 }
982                 const nativeResponseValue = wasm.KeysInterface_get_destination_script(this_arg);
983                 return decodeArray(nativeResponseValue);
984         }
985         // LDKShutdownScript KeysInterface_get_shutdown_scriptpubkey LDKKeysInterface *NONNULL_PTR this_arg
986         export function KeysInterface_get_shutdown_scriptpubkey(this_arg: number): number {
987                 if(!isWasmInitialized) {
988                         throw new Error("initializeWasm() must be awaited first!");
989                 }
990                 const nativeResponseValue = wasm.KeysInterface_get_shutdown_scriptpubkey(this_arg);
991                 return nativeResponseValue;
992         }
993         // LDKSign KeysInterface_get_channel_signer LDKKeysInterface *NONNULL_PTR this_arg, bool inbound, uint64_t channel_value_satoshis
994         export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
995                 if(!isWasmInitialized) {
996                         throw new Error("initializeWasm() must be awaited first!");
997                 }
998                 const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
999                 return nativeResponseValue;
1000         }
1001         // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface *NONNULL_PTR this_arg
1002         export function KeysInterface_get_secure_random_bytes(this_arg: number): Uint8Array {
1003                 if(!isWasmInitialized) {
1004                         throw new Error("initializeWasm() must be awaited first!");
1005                 }
1006                 const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
1007                 return decodeArray(nativeResponseValue);
1008         }
1009         // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface *NONNULL_PTR this_arg, struct LDKu8slice reader
1010         export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
1011                 if(!isWasmInitialized) {
1012                         throw new Error("initializeWasm() must be awaited first!");
1013                 }
1014                 const nativeResponseValue = wasm.KeysInterface_read_chan_signer(this_arg, encodeArray(reader));
1015                 return nativeResponseValue;
1016         }
1017         // LDKCResult_RecoverableSignatureNoneZ KeysInterface_sign_invoice LDKKeysInterface *NONNULL_PTR this_arg, struct LDKCVec_u8Z invoice_preimage
1018         export function KeysInterface_sign_invoice(this_arg: number, invoice_preimage: Uint8Array): number {
1019                 if(!isWasmInitialized) {
1020                         throw new Error("initializeWasm() must be awaited first!");
1021                 }
1022                 const nativeResponseValue = wasm.KeysInterface_sign_invoice(this_arg, encodeArray(invoice_preimage));
1023                 return nativeResponseValue;
1024         }
1025
1026
1027
1028 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1029
1030                 export interface LDKFeeEstimator {
1031                         get_est_sat_per_1000_weight (confirmation_target: ConfirmationTarget): number;
1032                 }
1033
1034                 export function LDKFeeEstimator_new(impl: LDKFeeEstimator): number {
1035             throw new Error('unimplemented'); // TODO: bind to WASM
1036         }
1037
1038 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1039
1040
1041         // uint32_t FeeEstimator_get_est_sat_per_1000_weight LDKFeeEstimator *NONNULL_PTR this_arg, enum LDKConfirmationTarget confirmation_target
1042         export function FeeEstimator_get_est_sat_per_1000_weight(this_arg: number, confirmation_target: ConfirmationTarget): number {
1043                 if(!isWasmInitialized) {
1044                         throw new Error("initializeWasm() must be awaited first!");
1045                 }
1046                 const nativeResponseValue = wasm.FeeEstimator_get_est_sat_per_1000_weight(this_arg, confirmation_target);
1047                 return nativeResponseValue;
1048         }
1049
1050
1051
1052 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1053
1054                 export interface LDKLogger {
1055                         log (record: String): void;
1056                 }
1057
1058                 export function LDKLogger_new(impl: LDKLogger): number {
1059             throw new Error('unimplemented'); // TODO: bind to WASM
1060         }
1061
1062 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1063
1064
1065         // struct LDKThirtyTwoBytes C2Tuple_BlockHashChannelManagerZ_get_a(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
1066         export function C2Tuple_BlockHashChannelManagerZ_get_a(tuple: number): Uint8Array {
1067                 if(!isWasmInitialized) {
1068                         throw new Error("initializeWasm() must be awaited first!");
1069                 }
1070                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_get_a(tuple);
1071                 return decodeArray(nativeResponseValue);
1072         }
1073         // struct LDKChannelManager *C2Tuple_BlockHashChannelManagerZ_get_b(LDKC2Tuple_BlockHashChannelManagerZ *NONNULL_PTR tuple);
1074         export function C2Tuple_BlockHashChannelManagerZ_get_b(tuple: number): number {
1075                 if(!isWasmInitialized) {
1076                         throw new Error("initializeWasm() must be awaited first!");
1077                 }
1078                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_get_b(tuple);
1079                 return nativeResponseValue;
1080         }
1081         public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
1082         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
1083         public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
1084         public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
1085         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
1086         public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
1087         public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
1088         public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
1089         public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
1090
1091
1092
1093 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1094
1095                 export interface LDKType {
1096                         type_id (): number;
1097                         debug_str (): String;
1098                         write (): Uint8Array;
1099                 }
1100
1101                 export function LDKType_new(impl: LDKType): number {
1102             throw new Error('unimplemented'); // TODO: bind to WASM
1103         }
1104
1105 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1106
1107
1108         // uint16_t Type_type_id LDKType *NONNULL_PTR this_arg
1109         export function Type_type_id(this_arg: number): number {
1110                 if(!isWasmInitialized) {
1111                         throw new Error("initializeWasm() must be awaited first!");
1112                 }
1113                 const nativeResponseValue = wasm.Type_type_id(this_arg);
1114                 return nativeResponseValue;
1115         }
1116         // LDKStr Type_debug_str LDKType *NONNULL_PTR this_arg
1117         export function Type_debug_str(this_arg: number): String {
1118                 if(!isWasmInitialized) {
1119                         throw new Error("initializeWasm() must be awaited first!");
1120                 }
1121                 const nativeResponseValue = wasm.Type_debug_str(this_arg);
1122                 return nativeResponseValue;
1123         }
1124         // LDKCVec_u8Z Type_write LDKType *NONNULL_PTR this_arg
1125         export function Type_write(this_arg: number): Uint8Array {
1126                 if(!isWasmInitialized) {
1127                         throw new Error("initializeWasm() must be awaited first!");
1128                 }
1129                 const nativeResponseValue = wasm.Type_write(this_arg);
1130                 return decodeArray(nativeResponseValue);
1131         }
1132         public static class LDKCOption_TypeZ {
1133                 private LDKCOption_TypeZ() {}
1134                 export class Some extends LDKCOption_TypeZ {
1135                         public number some;
1136                         Some(number some) { this.some = some; }
1137                 }
1138                 export class None extends LDKCOption_TypeZ {
1139                         None() { }
1140                 }
1141                 static native void init();
1142         }
1143         static { LDKCOption_TypeZ.init(); }
1144         public static native LDKCOption_TypeZ LDKCOption_TypeZ_ref_from_ptr(long ptr);
1145         public static native boolean LDKCResult_COption_TypeZDecodeErrorZ_result_ok(long arg);
1146         public static native number LDKCResult_COption_TypeZDecodeErrorZ_get_ok(long arg);
1147         public static native number LDKCResult_COption_TypeZDecodeErrorZ_get_err(long arg);
1148         public static native boolean LDKCResult_SiPrefixNoneZ_result_ok(long arg);
1149         public static native SiPrefix LDKCResult_SiPrefixNoneZ_get_ok(long arg);
1150         public static native void LDKCResult_SiPrefixNoneZ_get_err(long arg);
1151         public static native boolean LDKCResult_InvoiceNoneZ_result_ok(long arg);
1152         public static native number LDKCResult_InvoiceNoneZ_get_ok(long arg);
1153         public static native void LDKCResult_InvoiceNoneZ_get_err(long arg);
1154         public static native boolean LDKCResult_SignedRawInvoiceNoneZ_result_ok(long arg);
1155         public static native number LDKCResult_SignedRawInvoiceNoneZ_get_ok(long arg);
1156         public static native void LDKCResult_SignedRawInvoiceNoneZ_get_err(long arg);
1157         // struct LDKRawInvoice C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
1158         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple: number): number {
1159                 if(!isWasmInitialized) {
1160                         throw new Error("initializeWasm() must be awaited first!");
1161                 }
1162                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_a(tuple);
1163                 return nativeResponseValue;
1164         }
1165         // struct LDKThirtyTwoBytes C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
1166         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple: number): Uint8Array {
1167                 if(!isWasmInitialized) {
1168                         throw new Error("initializeWasm() must be awaited first!");
1169                 }
1170                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_b(tuple);
1171                 return decodeArray(nativeResponseValue);
1172         }
1173         // struct LDKInvoiceSignature C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR tuple);
1174         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple: number): number {
1175                 if(!isWasmInitialized) {
1176                         throw new Error("initializeWasm() must be awaited first!");
1177                 }
1178                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_get_c(tuple);
1179                 return nativeResponseValue;
1180         }
1181         public static native boolean LDKCResult_PayeePubKeyErrorZ_result_ok(long arg);
1182         public static native number LDKCResult_PayeePubKeyErrorZ_get_ok(long arg);
1183         public static native Secp256k1Error LDKCResult_PayeePubKeyErrorZ_get_err(long arg);
1184         public static native long LDKCVec_PrivateRouteZ_new(number[] elems);
1185         public static native boolean LDKCResult_PositiveTimestampCreationErrorZ_result_ok(long arg);
1186         public static native number LDKCResult_PositiveTimestampCreationErrorZ_get_ok(long arg);
1187         public static native CreationError LDKCResult_PositiveTimestampCreationErrorZ_get_err(long arg);
1188         public static native boolean LDKCResult_NoneSemanticErrorZ_result_ok(long arg);
1189         public static native void LDKCResult_NoneSemanticErrorZ_get_ok(long arg);
1190         public static native SemanticError LDKCResult_NoneSemanticErrorZ_get_err(long arg);
1191         public static native boolean LDKCResult_InvoiceSemanticErrorZ_result_ok(long arg);
1192         public static native number LDKCResult_InvoiceSemanticErrorZ_get_ok(long arg);
1193         public static native SemanticError LDKCResult_InvoiceSemanticErrorZ_get_err(long arg);
1194         public static native boolean LDKCResult_DescriptionCreationErrorZ_result_ok(long arg);
1195         public static native number LDKCResult_DescriptionCreationErrorZ_get_ok(long arg);
1196         public static native CreationError LDKCResult_DescriptionCreationErrorZ_get_err(long arg);
1197         public static native boolean LDKCResult_ExpiryTimeCreationErrorZ_result_ok(long arg);
1198         public static native number LDKCResult_ExpiryTimeCreationErrorZ_get_ok(long arg);
1199         public static native CreationError LDKCResult_ExpiryTimeCreationErrorZ_get_err(long arg);
1200         public static native boolean LDKCResult_PrivateRouteCreationErrorZ_result_ok(long arg);
1201         public static native number LDKCResult_PrivateRouteCreationErrorZ_get_ok(long arg);
1202         public static native CreationError LDKCResult_PrivateRouteCreationErrorZ_get_err(long arg);
1203         public static native boolean LDKCResult_StringErrorZ_result_ok(long arg);
1204         public static native String LDKCResult_StringErrorZ_get_ok(long arg);
1205         public static native Secp256k1Error LDKCResult_StringErrorZ_get_err(long arg);
1206         public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
1207         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
1208         public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
1209         public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
1210         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
1211         public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
1212         public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
1213         public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
1214         public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
1215         // struct LDKOutPoint C2Tuple_OutPointScriptZ_get_a(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
1216         export function C2Tuple_OutPointScriptZ_get_a(tuple: number): number {
1217                 if(!isWasmInitialized) {
1218                         throw new Error("initializeWasm() must be awaited first!");
1219                 }
1220                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_get_a(tuple);
1221                 return nativeResponseValue;
1222         }
1223         // struct LDKCVec_u8Z C2Tuple_OutPointScriptZ_get_b(LDKC2Tuple_OutPointScriptZ *NONNULL_PTR tuple);
1224         export function C2Tuple_OutPointScriptZ_get_b(tuple: number): Uint8Array {
1225                 if(!isWasmInitialized) {
1226                         throw new Error("initializeWasm() must be awaited first!");
1227                 }
1228                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_get_b(tuple);
1229                 return decodeArray(nativeResponseValue);
1230         }
1231         // uint32_t C2Tuple_u32ScriptZ_get_a(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
1232         export function C2Tuple_u32ScriptZ_get_a(tuple: number): number {
1233                 if(!isWasmInitialized) {
1234                         throw new Error("initializeWasm() must be awaited first!");
1235                 }
1236                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_get_a(tuple);
1237                 return nativeResponseValue;
1238         }
1239         // struct LDKCVec_u8Z C2Tuple_u32ScriptZ_get_b(LDKC2Tuple_u32ScriptZ *NONNULL_PTR tuple);
1240         export function C2Tuple_u32ScriptZ_get_b(tuple: number): Uint8Array {
1241                 if(!isWasmInitialized) {
1242                         throw new Error("initializeWasm() must be awaited first!");
1243                 }
1244                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_get_b(tuple);
1245                 return decodeArray(nativeResponseValue);
1246         }
1247         public static native long LDKCVec_C2Tuple_u32ScriptZZ_new(number[] elems);
1248         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
1249         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple: number): Uint8Array {
1250                 if(!isWasmInitialized) {
1251                         throw new Error("initializeWasm() must be awaited first!");
1252                 }
1253                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_a(tuple);
1254                 return decodeArray(nativeResponseValue);
1255         }
1256         // struct LDKCVec_C2Tuple_u32ScriptZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR tuple);
1257         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple: number): number[] {
1258                 if(!isWasmInitialized) {
1259                         throw new Error("initializeWasm() must be awaited first!");
1260                 }
1261                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_get_b(tuple);
1262                 return nativeResponseValue;
1263         }
1264         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_new(number[] elems);
1265         public static class LDKPaymentPurpose {
1266                 private LDKPaymentPurpose() {}
1267                 export class InvoicePayment extends LDKPaymentPurpose {
1268                         public Uint8Array payment_preimage;
1269                         public Uint8Array payment_secret;
1270                         public number user_payment_id;
1271                         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; }
1272                 }
1273                 export class SpontaneousPayment extends LDKPaymentPurpose {
1274                         public Uint8Array spontaneous_payment;
1275                         SpontaneousPayment(Uint8Array spontaneous_payment) { this.spontaneous_payment = spontaneous_payment; }
1276                 }
1277                 static native void init();
1278         }
1279         static { LDKPaymentPurpose.init(); }
1280         public static native LDKPaymentPurpose LDKPaymentPurpose_ref_from_ptr(long ptr);
1281         public static class LDKClosureReason {
1282                 private LDKClosureReason() {}
1283                 export class CounterpartyForceClosed extends LDKClosureReason {
1284                         public String peer_msg;
1285                         CounterpartyForceClosed(String peer_msg) { this.peer_msg = peer_msg; }
1286                 }
1287                 export class HolderForceClosed extends LDKClosureReason {
1288                         HolderForceClosed() { }
1289                 }
1290                 export class CooperativeClosure extends LDKClosureReason {
1291                         CooperativeClosure() { }
1292                 }
1293                 export class CommitmentTxConfirmed extends LDKClosureReason {
1294                         CommitmentTxConfirmed() { }
1295                 }
1296                 export class ProcessingError extends LDKClosureReason {
1297                         public String err;
1298                         ProcessingError(String err) { this.err = err; }
1299                 }
1300                 export class DisconnectedPeer extends LDKClosureReason {
1301                         DisconnectedPeer() { }
1302                 }
1303                 export class OutdatedChannelManager extends LDKClosureReason {
1304                         OutdatedChannelManager() { }
1305                 }
1306                 static native void init();
1307         }
1308         static { LDKClosureReason.init(); }
1309         public static native LDKClosureReason LDKClosureReason_ref_from_ptr(long ptr);
1310         public static class LDKEvent {
1311                 private LDKEvent() {}
1312                 export class FundingGenerationReady extends LDKEvent {
1313                         public Uint8Array temporary_channel_id;
1314                         public number channel_value_satoshis;
1315                         public Uint8Array output_script;
1316                         public number user_channel_id;
1317                         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; }
1318                 }
1319                 export class PaymentReceived extends LDKEvent {
1320                         public Uint8Array payment_hash;
1321                         public number amt;
1322                         public number purpose;
1323                         PaymentReceived(Uint8Array payment_hash, number amt, number purpose) { this.payment_hash = payment_hash; this.amt = amt; this.purpose = purpose; }
1324                 }
1325                 export class PaymentSent extends LDKEvent {
1326                         public Uint8Array payment_preimage;
1327                         public Uint8Array payment_hash;
1328                         PaymentSent(Uint8Array payment_preimage, Uint8Array payment_hash) { this.payment_preimage = payment_preimage; this.payment_hash = payment_hash; }
1329                 }
1330                 export class PaymentPathFailed extends LDKEvent {
1331                         public Uint8Array payment_hash;
1332                         public boolean rejected_by_dest;
1333                         public number network_update;
1334                         public boolean all_paths_failed;
1335                         public number[] path;
1336                         public number short_channel_id;
1337                         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; }
1338                 }
1339                 export class PendingHTLCsForwardable extends LDKEvent {
1340                         public number time_forwardable;
1341                         PendingHTLCsForwardable(number time_forwardable) { this.time_forwardable = time_forwardable; }
1342                 }
1343                 export class SpendableOutputs extends LDKEvent {
1344                         public number[] outputs;
1345                         SpendableOutputs(number[] outputs) { this.outputs = outputs; }
1346                 }
1347                 export class PaymentForwarded extends LDKEvent {
1348                         public number fee_earned_msat;
1349                         public boolean claim_from_onchain_tx;
1350                         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; }
1351                 }
1352                 export class ChannelClosed extends LDKEvent {
1353                         public Uint8Array channel_id;
1354                         public number user_channel_id;
1355                         public number reason;
1356                         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; }
1357                 }
1358                 export class DiscardFunding extends LDKEvent {
1359                         public Uint8Array channel_id;
1360                         public Uint8Array transaction;
1361                         DiscardFunding(Uint8Array channel_id, Uint8Array transaction) { this.channel_id = channel_id; this.transaction = transaction; }
1362                 }
1363                 static native void init();
1364         }
1365         static { LDKEvent.init(); }
1366         public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
1367         public static native long LDKCVec_EventZ_new(number[] elems);
1368         // uint32_t C2Tuple_u32TxOutZ_get_a(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
1369         export function C2Tuple_u32TxOutZ_get_a(tuple: number): number {
1370                 if(!isWasmInitialized) {
1371                         throw new Error("initializeWasm() must be awaited first!");
1372                 }
1373                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_get_a(tuple);
1374                 return nativeResponseValue;
1375         }
1376         // struct LDKTxOut C2Tuple_u32TxOutZ_get_b(LDKC2Tuple_u32TxOutZ *NONNULL_PTR tuple);
1377         export function C2Tuple_u32TxOutZ_get_b(tuple: number): number {
1378                 if(!isWasmInitialized) {
1379                         throw new Error("initializeWasm() must be awaited first!");
1380                 }
1381                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_get_b(tuple);
1382                 return nativeResponseValue;
1383         }
1384         public static native long LDKCVec_C2Tuple_u32TxOutZZ_new(number[] elems);
1385         // struct LDKThirtyTwoBytes C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
1386         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple: number): Uint8Array {
1387                 if(!isWasmInitialized) {
1388                         throw new Error("initializeWasm() must be awaited first!");
1389                 }
1390                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(tuple);
1391                 return decodeArray(nativeResponseValue);
1392         }
1393         // struct LDKCVec_C2Tuple_u32TxOutZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR tuple);
1394         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple: number): number[] {
1395                 if(!isWasmInitialized) {
1396                         throw new Error("initializeWasm() must be awaited first!");
1397                 }
1398                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(tuple);
1399                 return nativeResponseValue;
1400         }
1401         public static native long LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(number[] elems);
1402         public static class LDKBalance {
1403                 private LDKBalance() {}
1404                 export class ClaimableOnChannelClose extends LDKBalance {
1405                         public number claimable_amount_satoshis;
1406                         ClaimableOnChannelClose(number claimable_amount_satoshis) { this.claimable_amount_satoshis = claimable_amount_satoshis; }
1407                 }
1408                 export class ClaimableAwaitingConfirmations extends LDKBalance {
1409                         public number claimable_amount_satoshis;
1410                         public number confirmation_height;
1411                         ClaimableAwaitingConfirmations(number claimable_amount_satoshis, number confirmation_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.confirmation_height = confirmation_height; }
1412                 }
1413                 export class ContentiousClaimable extends LDKBalance {
1414                         public number claimable_amount_satoshis;
1415                         public number timeout_height;
1416                         ContentiousClaimable(number claimable_amount_satoshis, number timeout_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.timeout_height = timeout_height; }
1417                 }
1418                 export class MaybeClaimableHTLCAwaitingTimeout extends LDKBalance {
1419                         public number claimable_amount_satoshis;
1420                         public number claimable_height;
1421                         MaybeClaimableHTLCAwaitingTimeout(number claimable_amount_satoshis, number claimable_height) { this.claimable_amount_satoshis = claimable_amount_satoshis; this.claimable_height = claimable_height; }
1422                 }
1423                 static native void init();
1424         }
1425         static { LDKBalance.init(); }
1426         public static native LDKBalance LDKBalance_ref_from_ptr(long ptr);
1427         public static native long LDKCVec_BalanceZ_new(number[] elems);
1428         public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
1429         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
1430         public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
1431         public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
1432         public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
1433         public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
1434         // struct LDKPublicKey C2Tuple_PublicKeyTypeZ_get_a(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
1435         export function C2Tuple_PublicKeyTypeZ_get_a(tuple: number): Uint8Array {
1436                 if(!isWasmInitialized) {
1437                         throw new Error("initializeWasm() must be awaited first!");
1438                 }
1439                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_get_a(tuple);
1440                 return decodeArray(nativeResponseValue);
1441         }
1442         // struct LDKType C2Tuple_PublicKeyTypeZ_get_b(LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR tuple);
1443         export function C2Tuple_PublicKeyTypeZ_get_b(tuple: number): number {
1444                 if(!isWasmInitialized) {
1445                         throw new Error("initializeWasm() must be awaited first!");
1446                 }
1447                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_get_b(tuple);
1448                 return nativeResponseValue;
1449         }
1450         public static native long LDKCVec_C2Tuple_PublicKeyTypeZZ_new(number[] elems);
1451         public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
1452         public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
1453         public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
1454         // struct LDKChannelAnnouncement C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
1455         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple: number): number {
1456                 if(!isWasmInitialized) {
1457                         throw new Error("initializeWasm() must be awaited first!");
1458                 }
1459                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(tuple);
1460                 return nativeResponseValue;
1461         }
1462         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
1463         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple: number): number {
1464                 if(!isWasmInitialized) {
1465                         throw new Error("initializeWasm() must be awaited first!");
1466                 }
1467                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(tuple);
1468                 return nativeResponseValue;
1469         }
1470         // struct LDKChannelUpdate C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR tuple);
1471         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple: number): number {
1472                 if(!isWasmInitialized) {
1473                         throw new Error("initializeWasm() must be awaited first!");
1474                 }
1475                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(tuple);
1476                 return nativeResponseValue;
1477         }
1478         public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
1479         public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
1480         public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
1481         public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
1482         public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
1483         public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
1484         public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
1485         public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
1486         public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
1487         public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
1488         public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
1489         public static native boolean LDKCResult_NodeIdDecodeErrorZ_result_ok(long arg);
1490         public static native number LDKCResult_NodeIdDecodeErrorZ_get_ok(long arg);
1491         public static native number LDKCResult_NodeIdDecodeErrorZ_get_err(long arg);
1492
1493
1494
1495 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1496
1497                 export interface LDKAccess {
1498                         get_utxo (genesis_hash: Uint8Array, short_channel_id: number): number;
1499                 }
1500
1501                 export function LDKAccess_new(impl: LDKAccess): number {
1502             throw new Error('unimplemented'); // TODO: bind to WASM
1503         }
1504
1505 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1506
1507
1508         // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess *NONNULL_PTR this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
1509         export function Access_get_utxo(this_arg: number, genesis_hash: Uint8Array, short_channel_id: number): number {
1510                 if(!isWasmInitialized) {
1511                         throw new Error("initializeWasm() must be awaited first!");
1512                 }
1513                 const nativeResponseValue = wasm.Access_get_utxo(this_arg, encodeArray(genesis_hash), short_channel_id);
1514                 return nativeResponseValue;
1515         }
1516         public static class LDKCOption_AccessZ {
1517                 private LDKCOption_AccessZ() {}
1518                 export class Some extends LDKCOption_AccessZ {
1519                         public number some;
1520                         Some(number some) { this.some = some; }
1521                 }
1522                 export class None extends LDKCOption_AccessZ {
1523                         None() { }
1524                 }
1525                 static native void init();
1526         }
1527         static { LDKCOption_AccessZ.init(); }
1528         public static native LDKCOption_AccessZ LDKCOption_AccessZ_ref_from_ptr(long ptr);
1529         public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
1530         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
1531         public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
1532         public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
1533         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
1534         public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
1535         public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
1536         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
1537         public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
1538         public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
1539         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
1540         public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
1541         public static native long LDKCVec_u64Z_new(number[] elems);
1542         public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
1543         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
1544         public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
1545         public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
1546         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
1547         public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
1548         public static class LDKCOption_CVec_NetAddressZZ {
1549                 private LDKCOption_CVec_NetAddressZZ() {}
1550                 export class Some extends LDKCOption_CVec_NetAddressZZ {
1551                         public number[] some;
1552                         Some(number[] some) { this.some = some; }
1553                 }
1554                 export class None extends LDKCOption_CVec_NetAddressZZ {
1555                         None() { }
1556                 }
1557                 static native void init();
1558         }
1559         static { LDKCOption_CVec_NetAddressZZ.init(); }
1560         public static native LDKCOption_CVec_NetAddressZZ LDKCOption_CVec_NetAddressZZ_ref_from_ptr(long ptr);
1561         public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
1562         public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
1563         public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
1564         public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
1565         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
1566         public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
1567         public static native boolean LDKCResult_NetAddressDecodeErrorZ_result_ok(long arg);
1568         public static native number LDKCResult_NetAddressDecodeErrorZ_get_ok(long arg);
1569         public static native number LDKCResult_NetAddressDecodeErrorZ_get_err(long arg);
1570         public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
1571         public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
1572         public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
1573         public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
1574         public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
1575         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
1576         public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
1577         public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
1578         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
1579         public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
1580         public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
1581         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
1582         public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
1583         public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
1584         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
1585         public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
1586         public static native boolean LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_result_ok(long arg);
1587         public static native number LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_ok(long arg);
1588         public static native number LDKCResult_ClosingSignedFeeRangeDecodeErrorZ_get_err(long arg);
1589         public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
1590         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
1591         public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
1592         public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
1593         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
1594         public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
1595         public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
1596         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
1597         public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
1598         public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
1599         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
1600         public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
1601         public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
1602         public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
1603         public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
1604         public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
1605         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
1606         public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
1607         public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
1608         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
1609         public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
1610         public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
1611         public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
1612         public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
1613         public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
1614         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
1615         public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
1616         public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
1617         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
1618         public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
1619         public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
1620         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
1621         public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
1622         public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
1623         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
1624         public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
1625         public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
1626         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
1627         public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
1628         public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
1629         public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
1630         public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
1631         public static native boolean LDKCResult_PongDecodeErrorZ_result_ok(long arg);
1632         public static native number LDKCResult_PongDecodeErrorZ_get_ok(long arg);
1633         public static native number LDKCResult_PongDecodeErrorZ_get_err(long arg);
1634         public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1635         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1636         public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
1637         public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
1638         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
1639         public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
1640         public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
1641         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
1642         public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
1643         public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
1644         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
1645         public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
1646         public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
1647         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
1648         public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
1649         public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
1650         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
1651         public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
1652         public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
1653         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
1654         public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
1655         public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
1656         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
1657         public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
1658         public static native boolean LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(long arg);
1659         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(long arg);
1660         public static native number LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(long arg);
1661         public static native boolean LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(long arg);
1662         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(long arg);
1663         public static native number LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(long arg);
1664         public static native boolean LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(long arg);
1665         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(long arg);
1666         public static native number LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(long arg);
1667         public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
1668         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
1669         public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
1670         public static class LDKSignOrCreationError {
1671                 private LDKSignOrCreationError() {}
1672                 export class SignError extends LDKSignOrCreationError {
1673                         SignError() { }
1674                 }
1675                 export class CreationError extends LDKSignOrCreationError {
1676                         public CreationError creation_error;
1677                         CreationError(CreationError creation_error) { this.creation_error = creation_error; }
1678                 }
1679                 static native void init();
1680         }
1681         static { LDKSignOrCreationError.init(); }
1682         public static native LDKSignOrCreationError LDKSignOrCreationError_ref_from_ptr(long ptr);
1683         public static native boolean LDKCResult_InvoiceSignOrCreationErrorZ_result_ok(long arg);
1684         public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_ok(long arg);
1685         public static native number LDKCResult_InvoiceSignOrCreationErrorZ_get_err(long arg);
1686
1687
1688
1689 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1690
1691                 export interface LDKFilter {
1692                         register_tx (txid: Uint8Array, script_pubkey: Uint8Array): void;
1693                         register_output (output: number): number;
1694                 }
1695
1696                 export function LDKFilter_new(impl: LDKFilter): number {
1697             throw new Error('unimplemented'); // TODO: bind to WASM
1698         }
1699
1700 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1701
1702
1703         // void Filter_register_tx LDKFilter *NONNULL_PTR this_arg, const uint8_t (*txid)[32], struct LDKu8slice script_pubkey
1704         export function Filter_register_tx(this_arg: number, txid: Uint8Array, script_pubkey: Uint8Array): void {
1705                 if(!isWasmInitialized) {
1706                         throw new Error("initializeWasm() must be awaited first!");
1707                 }
1708                 const nativeResponseValue = wasm.Filter_register_tx(this_arg, encodeArray(txid), encodeArray(script_pubkey));
1709                 // debug statements here
1710         }
1711         // LDKCOption_C2Tuple_usizeTransactionZZ Filter_register_output LDKFilter *NONNULL_PTR this_arg, struct LDKWatchedOutput output
1712         export function Filter_register_output(this_arg: number, output: number): number {
1713                 if(!isWasmInitialized) {
1714                         throw new Error("initializeWasm() must be awaited first!");
1715                 }
1716                 const nativeResponseValue = wasm.Filter_register_output(this_arg, output);
1717                 return nativeResponseValue;
1718         }
1719         public static class LDKCOption_FilterZ {
1720                 private LDKCOption_FilterZ() {}
1721                 export class Some extends LDKCOption_FilterZ {
1722                         public number some;
1723                         Some(number some) { this.some = some; }
1724                 }
1725                 export class None extends LDKCOption_FilterZ {
1726                         None() { }
1727                 }
1728                 static native void init();
1729         }
1730         static { LDKCOption_FilterZ.init(); }
1731         public static native LDKCOption_FilterZ LDKCOption_FilterZ_ref_from_ptr(long ptr);
1732         public static native boolean LDKCResult_LockedChannelMonitorNoneZ_result_ok(long arg);
1733         public static native number LDKCResult_LockedChannelMonitorNoneZ_get_ok(long arg);
1734         public static native void LDKCResult_LockedChannelMonitorNoneZ_get_err(long arg);
1735         public static native long LDKCVec_OutPointZ_new(number[] elems);
1736
1737
1738
1739 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1740
1741                 export interface LDKMessageSendEventsProvider {
1742                         get_and_clear_pending_msg_events (): number[];
1743                 }
1744
1745                 export function LDKMessageSendEventsProvider_new(impl: LDKMessageSendEventsProvider): number {
1746             throw new Error('unimplemented'); // TODO: bind to WASM
1747         }
1748
1749 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1750
1751
1752         // LDKCVec_MessageSendEventZ MessageSendEventsProvider_get_and_clear_pending_msg_events LDKMessageSendEventsProvider *NONNULL_PTR this_arg
1753         export function MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg: number): number[] {
1754                 if(!isWasmInitialized) {
1755                         throw new Error("initializeWasm() must be awaited first!");
1756                 }
1757                 const nativeResponseValue = wasm.MessageSendEventsProvider_get_and_clear_pending_msg_events(this_arg);
1758                 return nativeResponseValue;
1759         }
1760
1761
1762
1763 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1764
1765                 export interface LDKEventHandler {
1766                         handle_event (event: number): void;
1767                 }
1768
1769                 export function LDKEventHandler_new(impl: LDKEventHandler): number {
1770             throw new Error('unimplemented'); // TODO: bind to WASM
1771         }
1772
1773 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1774
1775
1776         // void EventHandler_handle_event LDKEventHandler *NONNULL_PTR this_arg, const struct LDKEvent *NONNULL_PTR event
1777         export function EventHandler_handle_event(this_arg: number, event: number): void {
1778                 if(!isWasmInitialized) {
1779                         throw new Error("initializeWasm() must be awaited first!");
1780                 }
1781                 const nativeResponseValue = wasm.EventHandler_handle_event(this_arg, event);
1782                 // debug statements here
1783         }
1784
1785
1786
1787 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1788
1789                 export interface LDKEventsProvider {
1790                         process_pending_events (handler: number): void;
1791                 }
1792
1793                 export function LDKEventsProvider_new(impl: LDKEventsProvider): number {
1794             throw new Error('unimplemented'); // TODO: bind to WASM
1795         }
1796
1797 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1798
1799
1800         // void EventsProvider_process_pending_events LDKEventsProvider *NONNULL_PTR this_arg, struct LDKEventHandler handler
1801         export function EventsProvider_process_pending_events(this_arg: number, handler: number): void {
1802                 if(!isWasmInitialized) {
1803                         throw new Error("initializeWasm() must be awaited first!");
1804                 }
1805                 const nativeResponseValue = wasm.EventsProvider_process_pending_events(this_arg, handler);
1806                 // debug statements here
1807         }
1808
1809
1810
1811 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1812
1813                 export interface LDKListen {
1814                         block_connected (block: Uint8Array, height: number): void;
1815                         block_disconnected (header: Uint8Array, height: number): void;
1816                 }
1817
1818                 export function LDKListen_new(impl: LDKListen): number {
1819             throw new Error('unimplemented'); // TODO: bind to WASM
1820         }
1821
1822 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1823
1824
1825         // void Listen_block_connected LDKListen *NONNULL_PTR this_arg, struct LDKu8slice block, uint32_t height
1826         export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
1827                 if(!isWasmInitialized) {
1828                         throw new Error("initializeWasm() must be awaited first!");
1829                 }
1830                 const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
1831                 // debug statements here
1832         }
1833         // void Listen_block_disconnected LDKListen *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1834         export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
1835                 if(!isWasmInitialized) {
1836                         throw new Error("initializeWasm() must be awaited first!");
1837                 }
1838                 const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
1839                 // debug statements here
1840         }
1841
1842
1843
1844 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1845
1846                 export interface LDKConfirm {
1847                         transactions_confirmed (header: Uint8Array, txdata: number[], height: number): void;
1848                         transaction_unconfirmed (txid: Uint8Array): void;
1849                         best_block_updated (header: Uint8Array, height: number): void;
1850                         get_relevant_txids (): Uint8Array[];
1851                 }
1852
1853                 export function LDKConfirm_new(impl: LDKConfirm): number {
1854             throw new Error('unimplemented'); // TODO: bind to WASM
1855         }
1856
1857 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1858
1859
1860         // void Confirm_transactions_confirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height
1861         export function Confirm_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
1862                 if(!isWasmInitialized) {
1863                         throw new Error("initializeWasm() must be awaited first!");
1864                 }
1865                 const nativeResponseValue = wasm.Confirm_transactions_confirmed(this_arg, encodeArray(header), txdata, height);
1866                 // debug statements here
1867         }
1868         // void Confirm_transaction_unconfirmed LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*txid)[32]
1869         export function Confirm_transaction_unconfirmed(this_arg: number, txid: Uint8Array): void {
1870                 if(!isWasmInitialized) {
1871                         throw new Error("initializeWasm() must be awaited first!");
1872                 }
1873                 const nativeResponseValue = wasm.Confirm_transaction_unconfirmed(this_arg, encodeArray(txid));
1874                 // debug statements here
1875         }
1876         // void Confirm_best_block_updated LDKConfirm *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height
1877         export function Confirm_best_block_updated(this_arg: number, header: Uint8Array, height: number): void {
1878                 if(!isWasmInitialized) {
1879                         throw new Error("initializeWasm() must be awaited first!");
1880                 }
1881                 const nativeResponseValue = wasm.Confirm_best_block_updated(this_arg, encodeArray(header), height);
1882                 // debug statements here
1883         }
1884         // LDKCVec_TxidZ Confirm_get_relevant_txids LDKConfirm *NONNULL_PTR this_arg
1885         export function Confirm_get_relevant_txids(this_arg: number): Uint8Array[] {
1886                 if(!isWasmInitialized) {
1887                         throw new Error("initializeWasm() must be awaited first!");
1888                 }
1889                 const nativeResponseValue = wasm.Confirm_get_relevant_txids(this_arg);
1890                 return nativeResponseValue;
1891         }
1892
1893
1894
1895 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1896
1897                 export interface LDKPersist {
1898                         persist_new_channel (id: number, data: number): number;
1899                         update_persisted_channel (id: number, update: number, data: number): number;
1900                 }
1901
1902                 export function LDKPersist_new(impl: LDKPersist): number {
1903             throw new Error('unimplemented'); // TODO: bind to WASM
1904         }
1905
1906 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1907
1908
1909         // LDKCResult_NoneChannelMonitorUpdateErrZ Persist_persist_new_channel LDKPersist *NONNULL_PTR this_arg, struct LDKOutPoint id, const struct LDKChannelMonitor *NONNULL_PTR data
1910         export function Persist_persist_new_channel(this_arg: number, id: number, data: number): number {
1911                 if(!isWasmInitialized) {
1912                         throw new Error("initializeWasm() must be awaited first!");
1913                 }
1914                 const nativeResponseValue = wasm.Persist_persist_new_channel(this_arg, id, data);
1915                 return nativeResponseValue;
1916         }
1917         // 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
1918         export function Persist_update_persisted_channel(this_arg: number, id: number, update: number, data: number): number {
1919                 if(!isWasmInitialized) {
1920                         throw new Error("initializeWasm() must be awaited first!");
1921                 }
1922                 const nativeResponseValue = wasm.Persist_update_persisted_channel(this_arg, id, update, data);
1923                 return nativeResponseValue;
1924         }
1925
1926
1927
1928 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
1929
1930                 export interface LDKChannelMessageHandler {
1931                         handle_open_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1932                         handle_accept_channel (their_node_id: Uint8Array, their_features: number, msg: number): void;
1933                         handle_funding_created (their_node_id: Uint8Array, msg: number): void;
1934                         handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
1935                         handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
1936                         handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
1937                         handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
1938                         handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
1939                         handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
1940                         handle_update_fail_htlc (their_node_id: Uint8Array, msg: number): void;
1941                         handle_update_fail_malformed_htlc (their_node_id: Uint8Array, msg: number): void;
1942                         handle_commitment_signed (their_node_id: Uint8Array, msg: number): void;
1943                         handle_revoke_and_ack (their_node_id: Uint8Array, msg: number): void;
1944                         handle_update_fee (their_node_id: Uint8Array, msg: number): void;
1945                         handle_announcement_signatures (their_node_id: Uint8Array, msg: number): void;
1946                         peer_disconnected (their_node_id: Uint8Array, no_connection_possible: boolean): void;
1947                         peer_connected (their_node_id: Uint8Array, msg: number): void;
1948                         handle_channel_reestablish (their_node_id: Uint8Array, msg: number): void;
1949                         handle_channel_update (their_node_id: Uint8Array, msg: number): void;
1950                         handle_error (their_node_id: Uint8Array, msg: number): void;
1951                 }
1952
1953                 export function LDKChannelMessageHandler_new(impl: LDKChannelMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
1954             throw new Error('unimplemented'); // TODO: bind to WASM
1955         }
1956
1957 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
1958
1959
1960         // 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
1961         export function ChannelMessageHandler_handle_open_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1962                 if(!isWasmInitialized) {
1963                         throw new Error("initializeWasm() must be awaited first!");
1964                 }
1965                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_open_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1966                 // debug statements here
1967         }
1968         // 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
1969         export function ChannelMessageHandler_handle_accept_channel(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
1970                 if(!isWasmInitialized) {
1971                         throw new Error("initializeWasm() must be awaited first!");
1972                 }
1973                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_accept_channel(this_arg, encodeArray(their_node_id), their_features, msg);
1974                 // debug statements here
1975         }
1976         // void ChannelMessageHandler_handle_funding_created LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingCreated *NONNULL_PTR msg
1977         export function ChannelMessageHandler_handle_funding_created(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1978                 if(!isWasmInitialized) {
1979                         throw new Error("initializeWasm() must be awaited first!");
1980                 }
1981                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_created(this_arg, encodeArray(their_node_id), msg);
1982                 // debug statements here
1983         }
1984         // void ChannelMessageHandler_handle_funding_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingSigned *NONNULL_PTR msg
1985         export function ChannelMessageHandler_handle_funding_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1986                 if(!isWasmInitialized) {
1987                         throw new Error("initializeWasm() must be awaited first!");
1988                 }
1989                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_signed(this_arg, encodeArray(their_node_id), msg);
1990                 // debug statements here
1991         }
1992         // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
1993         export function ChannelMessageHandler_handle_funding_locked(this_arg: number, their_node_id: Uint8Array, msg: number): void {
1994                 if(!isWasmInitialized) {
1995                         throw new Error("initializeWasm() must be awaited first!");
1996                 }
1997                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
1998                 // debug statements here
1999         }
2000         // 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
2001         export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
2002                 if(!isWasmInitialized) {
2003                         throw new Error("initializeWasm() must be awaited first!");
2004                 }
2005                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
2006                 // debug statements here
2007         }
2008         // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
2009         export function ChannelMessageHandler_handle_closing_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2010                 if(!isWasmInitialized) {
2011                         throw new Error("initializeWasm() must be awaited first!");
2012                 }
2013                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_closing_signed(this_arg, encodeArray(their_node_id), msg);
2014                 // debug statements here
2015         }
2016         // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
2017         export function ChannelMessageHandler_handle_update_add_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2018                 if(!isWasmInitialized) {
2019                         throw new Error("initializeWasm() must be awaited first!");
2020                 }
2021                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_add_htlc(this_arg, encodeArray(their_node_id), msg);
2022                 // debug statements here
2023         }
2024         // void ChannelMessageHandler_handle_update_fulfill_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFulfillHTLC *NONNULL_PTR msg
2025         export function ChannelMessageHandler_handle_update_fulfill_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2026                 if(!isWasmInitialized) {
2027                         throw new Error("initializeWasm() must be awaited first!");
2028                 }
2029                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fulfill_htlc(this_arg, encodeArray(their_node_id), msg);
2030                 // debug statements here
2031         }
2032         // void ChannelMessageHandler_handle_update_fail_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailHTLC *NONNULL_PTR msg
2033         export function ChannelMessageHandler_handle_update_fail_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2034                 if(!isWasmInitialized) {
2035                         throw new Error("initializeWasm() must be awaited first!");
2036                 }
2037                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_htlc(this_arg, encodeArray(their_node_id), msg);
2038                 // debug statements here
2039         }
2040         // void ChannelMessageHandler_handle_update_fail_malformed_htlc LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR msg
2041         export function ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2042                 if(!isWasmInitialized) {
2043                         throw new Error("initializeWasm() must be awaited first!");
2044                 }
2045                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fail_malformed_htlc(this_arg, encodeArray(their_node_id), msg);
2046                 // debug statements here
2047         }
2048         // void ChannelMessageHandler_handle_commitment_signed LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKCommitmentSigned *NONNULL_PTR msg
2049         export function ChannelMessageHandler_handle_commitment_signed(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2050                 if(!isWasmInitialized) {
2051                         throw new Error("initializeWasm() must be awaited first!");
2052                 }
2053                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_commitment_signed(this_arg, encodeArray(their_node_id), msg);
2054                 // debug statements here
2055         }
2056         // void ChannelMessageHandler_handle_revoke_and_ack LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKRevokeAndACK *NONNULL_PTR msg
2057         export function ChannelMessageHandler_handle_revoke_and_ack(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2058                 if(!isWasmInitialized) {
2059                         throw new Error("initializeWasm() must be awaited first!");
2060                 }
2061                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_revoke_and_ack(this_arg, encodeArray(their_node_id), msg);
2062                 // debug statements here
2063         }
2064         // void ChannelMessageHandler_handle_update_fee LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateFee *NONNULL_PTR msg
2065         export function ChannelMessageHandler_handle_update_fee(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2066                 if(!isWasmInitialized) {
2067                         throw new Error("initializeWasm() must be awaited first!");
2068                 }
2069                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_update_fee(this_arg, encodeArray(their_node_id), msg);
2070                 // debug statements here
2071         }
2072         // void ChannelMessageHandler_handle_announcement_signatures LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKAnnouncementSignatures *NONNULL_PTR msg
2073         export function ChannelMessageHandler_handle_announcement_signatures(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2074                 if(!isWasmInitialized) {
2075                         throw new Error("initializeWasm() must be awaited first!");
2076                 }
2077                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_announcement_signatures(this_arg, encodeArray(their_node_id), msg);
2078                 // debug statements here
2079         }
2080         // void ChannelMessageHandler_peer_disconnected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, bool no_connection_possible
2081         export function ChannelMessageHandler_peer_disconnected(this_arg: number, their_node_id: Uint8Array, no_connection_possible: boolean): void {
2082                 if(!isWasmInitialized) {
2083                         throw new Error("initializeWasm() must be awaited first!");
2084                 }
2085                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_disconnected(this_arg, encodeArray(their_node_id), no_connection_possible);
2086                 // debug statements here
2087         }
2088         // void ChannelMessageHandler_peer_connected LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR msg
2089         export function ChannelMessageHandler_peer_connected(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2090                 if(!isWasmInitialized) {
2091                         throw new Error("initializeWasm() must be awaited first!");
2092                 }
2093                 const nativeResponseValue = wasm.ChannelMessageHandler_peer_connected(this_arg, encodeArray(their_node_id), msg);
2094                 // debug statements here
2095         }
2096         // void ChannelMessageHandler_handle_channel_reestablish LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelReestablish *NONNULL_PTR msg
2097         export function ChannelMessageHandler_handle_channel_reestablish(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2098                 if(!isWasmInitialized) {
2099                         throw new Error("initializeWasm() must be awaited first!");
2100                 }
2101                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_reestablish(this_arg, encodeArray(their_node_id), msg);
2102                 // debug statements here
2103         }
2104         // void ChannelMessageHandler_handle_channel_update LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKChannelUpdate *NONNULL_PTR msg
2105         export function ChannelMessageHandler_handle_channel_update(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2106                 if(!isWasmInitialized) {
2107                         throw new Error("initializeWasm() must be awaited first!");
2108                 }
2109                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_channel_update(this_arg, encodeArray(their_node_id), msg);
2110                 // debug statements here
2111         }
2112         // void ChannelMessageHandler_handle_error LDKChannelMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKErrorMessage *NONNULL_PTR msg
2113         export function ChannelMessageHandler_handle_error(this_arg: number, their_node_id: Uint8Array, msg: number): void {
2114                 if(!isWasmInitialized) {
2115                         throw new Error("initializeWasm() must be awaited first!");
2116                 }
2117                 const nativeResponseValue = wasm.ChannelMessageHandler_handle_error(this_arg, encodeArray(their_node_id), msg);
2118                 // debug statements here
2119         }
2120
2121
2122
2123 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2124
2125                 export interface LDKRoutingMessageHandler {
2126                         handle_node_announcement (msg: number): number;
2127                         handle_channel_announcement (msg: number): number;
2128                         handle_channel_update (msg: number): number;
2129                         get_next_channel_announcements (starting_point: number, batch_amount: number): number[];
2130                         get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[];
2131                         sync_routing_table (their_node_id: Uint8Array, init: number): void;
2132                         handle_reply_channel_range (their_node_id: Uint8Array, msg: number): number;
2133                         handle_reply_short_channel_ids_end (their_node_id: Uint8Array, msg: number): number;
2134                         handle_query_channel_range (their_node_id: Uint8Array, msg: number): number;
2135                         handle_query_short_channel_ids (their_node_id: Uint8Array, msg: number): number;
2136                 }
2137
2138                 export function LDKRoutingMessageHandler_new(impl: LDKRoutingMessageHandler, MessageSendEventsProvider: LDKMessageSendEventsProvider): number {
2139             throw new Error('unimplemented'); // TODO: bind to WASM
2140         }
2141
2142 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2143
2144
2145         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_node_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg
2146         export function RoutingMessageHandler_handle_node_announcement(this_arg: number, msg: number): number {
2147                 if(!isWasmInitialized) {
2148                         throw new Error("initializeWasm() must be awaited first!");
2149                 }
2150                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_node_announcement(this_arg, msg);
2151                 return nativeResponseValue;
2152         }
2153         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_announcement LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelAnnouncement *NONNULL_PTR msg
2154         export function RoutingMessageHandler_handle_channel_announcement(this_arg: number, msg: number): number {
2155                 if(!isWasmInitialized) {
2156                         throw new Error("initializeWasm() must be awaited first!");
2157                 }
2158                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_announcement(this_arg, msg);
2159                 return nativeResponseValue;
2160         }
2161         // LDKCResult_boolLightningErrorZ RoutingMessageHandler_handle_channel_update LDKRoutingMessageHandler *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg
2162         export function RoutingMessageHandler_handle_channel_update(this_arg: number, msg: number): number {
2163                 if(!isWasmInitialized) {
2164                         throw new Error("initializeWasm() must be awaited first!");
2165                 }
2166                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_channel_update(this_arg, msg);
2167                 return nativeResponseValue;
2168         }
2169         // LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ RoutingMessageHandler_get_next_channel_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, uint64_t starting_point, uint8_t batch_amount
2170         export function RoutingMessageHandler_get_next_channel_announcements(this_arg: number, starting_point: number, batch_amount: number): number[] {
2171                 if(!isWasmInitialized) {
2172                         throw new Error("initializeWasm() must be awaited first!");
2173                 }
2174                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_channel_announcements(this_arg, starting_point, batch_amount);
2175                 return nativeResponseValue;
2176         }
2177         // LDKCVec_NodeAnnouncementZ RoutingMessageHandler_get_next_node_announcements LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey starting_point, uint8_t batch_amount
2178         export function RoutingMessageHandler_get_next_node_announcements(this_arg: number, starting_point: Uint8Array, batch_amount: number): number[] {
2179                 if(!isWasmInitialized) {
2180                         throw new Error("initializeWasm() must be awaited first!");
2181                 }
2182                 const nativeResponseValue = wasm.RoutingMessageHandler_get_next_node_announcements(this_arg, encodeArray(starting_point), batch_amount);
2183                 return nativeResponseValue;
2184         }
2185         // void RoutingMessageHandler_sync_routing_table LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, const struct LDKInit *NONNULL_PTR init
2186         export function RoutingMessageHandler_sync_routing_table(this_arg: number, their_node_id: Uint8Array, init: number): void {
2187                 if(!isWasmInitialized) {
2188                         throw new Error("initializeWasm() must be awaited first!");
2189                 }
2190                 const nativeResponseValue = wasm.RoutingMessageHandler_sync_routing_table(this_arg, encodeArray(their_node_id), init);
2191                 // debug statements here
2192         }
2193         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyChannelRange msg
2194         export function RoutingMessageHandler_handle_reply_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2195                 if(!isWasmInitialized) {
2196                         throw new Error("initializeWasm() must be awaited first!");
2197                 }
2198                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_channel_range(this_arg, encodeArray(their_node_id), msg);
2199                 return nativeResponseValue;
2200         }
2201         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_reply_short_channel_ids_end LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKReplyShortChannelIdsEnd msg
2202         export function RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2203                 if(!isWasmInitialized) {
2204                         throw new Error("initializeWasm() must be awaited first!");
2205                 }
2206                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_reply_short_channel_ids_end(this_arg, encodeArray(their_node_id), msg);
2207                 return nativeResponseValue;
2208         }
2209         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_channel_range LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryChannelRange msg
2210         export function RoutingMessageHandler_handle_query_channel_range(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2211                 if(!isWasmInitialized) {
2212                         throw new Error("initializeWasm() must be awaited first!");
2213                 }
2214                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_channel_range(this_arg, encodeArray(their_node_id), msg);
2215                 return nativeResponseValue;
2216         }
2217         // LDKCResult_NoneLightningErrorZ RoutingMessageHandler_handle_query_short_channel_ids LDKRoutingMessageHandler *NONNULL_PTR this_arg, struct LDKPublicKey their_node_id, struct LDKQueryShortChannelIds msg
2218         export function RoutingMessageHandler_handle_query_short_channel_ids(this_arg: number, their_node_id: Uint8Array, msg: number): number {
2219                 if(!isWasmInitialized) {
2220                         throw new Error("initializeWasm() must be awaited first!");
2221                 }
2222                 const nativeResponseValue = wasm.RoutingMessageHandler_handle_query_short_channel_ids(this_arg, encodeArray(their_node_id), msg);
2223                 return nativeResponseValue;
2224         }
2225
2226
2227
2228 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2229
2230                 export interface LDKCustomMessageReader {
2231                         read (message_type: number, buffer: Uint8Array): number;
2232                 }
2233
2234                 export function LDKCustomMessageReader_new(impl: LDKCustomMessageReader): number {
2235             throw new Error('unimplemented'); // TODO: bind to WASM
2236         }
2237
2238 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2239
2240
2241         // LDKCResult_COption_TypeZDecodeErrorZ CustomMessageReader_read LDKCustomMessageReader *NONNULL_PTR this_arg, uint16_t message_type, struct LDKu8slice buffer
2242         export function CustomMessageReader_read(this_arg: number, message_type: number, buffer: Uint8Array): number {
2243                 if(!isWasmInitialized) {
2244                         throw new Error("initializeWasm() must be awaited first!");
2245                 }
2246                 const nativeResponseValue = wasm.CustomMessageReader_read(this_arg, message_type, encodeArray(buffer));
2247                 return nativeResponseValue;
2248         }
2249
2250
2251
2252 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2253
2254                 export interface LDKCustomMessageHandler {
2255                         handle_custom_message (msg: number, sender_node_id: Uint8Array): number;
2256                         get_and_clear_pending_msg (): number[];
2257                 }
2258
2259                 export function LDKCustomMessageHandler_new(impl: LDKCustomMessageHandler, CustomMessageReader: LDKCustomMessageReader): number {
2260             throw new Error('unimplemented'); // TODO: bind to WASM
2261         }
2262
2263 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2264
2265
2266         // LDKCResult_NoneLightningErrorZ CustomMessageHandler_handle_custom_message LDKCustomMessageHandler *NONNULL_PTR this_arg, struct LDKType msg, struct LDKPublicKey sender_node_id
2267         export function CustomMessageHandler_handle_custom_message(this_arg: number, msg: number, sender_node_id: Uint8Array): number {
2268                 if(!isWasmInitialized) {
2269                         throw new Error("initializeWasm() must be awaited first!");
2270                 }
2271                 const nativeResponseValue = wasm.CustomMessageHandler_handle_custom_message(this_arg, msg, encodeArray(sender_node_id));
2272                 return nativeResponseValue;
2273         }
2274         // LDKCVec_C2Tuple_PublicKeyTypeZZ CustomMessageHandler_get_and_clear_pending_msg LDKCustomMessageHandler *NONNULL_PTR this_arg
2275         export function CustomMessageHandler_get_and_clear_pending_msg(this_arg: number): number[] {
2276                 if(!isWasmInitialized) {
2277                         throw new Error("initializeWasm() must be awaited first!");
2278                 }
2279                 const nativeResponseValue = wasm.CustomMessageHandler_get_and_clear_pending_msg(this_arg);
2280                 return nativeResponseValue;
2281         }
2282
2283
2284
2285 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2286
2287                 export interface LDKSocketDescriptor {
2288                         send_data (data: Uint8Array, resume_read: boolean): number;
2289                         disconnect_socket (): void;
2290                         eq (other_arg: number): boolean;
2291                         hash (): number;
2292                 }
2293
2294                 export function LDKSocketDescriptor_new(impl: LDKSocketDescriptor): number {
2295             throw new Error('unimplemented'); // TODO: bind to WASM
2296         }
2297
2298 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2299
2300
2301         // uintptr_t SocketDescriptor_send_data LDKSocketDescriptor *NONNULL_PTR this_arg, struct LDKu8slice data, bool resume_read
2302         export function SocketDescriptor_send_data(this_arg: number, data: Uint8Array, resume_read: boolean): number {
2303                 if(!isWasmInitialized) {
2304                         throw new Error("initializeWasm() must be awaited first!");
2305                 }
2306                 const nativeResponseValue = wasm.SocketDescriptor_send_data(this_arg, encodeArray(data), resume_read);
2307                 return nativeResponseValue;
2308         }
2309         // void SocketDescriptor_disconnect_socket LDKSocketDescriptor *NONNULL_PTR this_arg
2310         export function SocketDescriptor_disconnect_socket(this_arg: number): void {
2311                 if(!isWasmInitialized) {
2312                         throw new Error("initializeWasm() must be awaited first!");
2313                 }
2314                 const nativeResponseValue = wasm.SocketDescriptor_disconnect_socket(this_arg);
2315                 // debug statements here
2316         }
2317         // uint64_t SocketDescriptor_hash LDKSocketDescriptor *NONNULL_PTR this_arg
2318         export function SocketDescriptor_hash(this_arg: number): number {
2319                 if(!isWasmInitialized) {
2320                         throw new Error("initializeWasm() must be awaited first!");
2321                 }
2322                 const nativeResponseValue = wasm.SocketDescriptor_hash(this_arg);
2323                 return nativeResponseValue;
2324         }
2325
2326
2327
2328 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2329
2330                 export interface LDKScore {
2331                         channel_penalty_msat (short_channel_id: number): number;
2332                 }
2333
2334                 export function LDKScore_new(impl: LDKScore): number {
2335             throw new Error('unimplemented'); // TODO: bind to WASM
2336         }
2337
2338 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2339
2340
2341         // uint64_t Score_channel_penalty_msat LDKScore *NONNULL_PTR this_arg, uint64_t short_channel_id
2342         export function Score_channel_penalty_msat(this_arg: number, short_channel_id: number): number {
2343                 if(!isWasmInitialized) {
2344                         throw new Error("initializeWasm() must be awaited first!");
2345                 }
2346                 const nativeResponseValue = wasm.Score_channel_penalty_msat(this_arg, short_channel_id);
2347                 return nativeResponseValue;
2348         }
2349
2350
2351
2352 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
2353
2354                 export interface LDKChannelManagerPersister {
2355                         persist_manager (channel_manager: number): number;
2356                 }
2357
2358                 export function LDKChannelManagerPersister_new(impl: LDKChannelManagerPersister): number {
2359             throw new Error('unimplemented'); // TODO: bind to WASM
2360         }
2361
2362 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
2363
2364
2365         // LDKCResult_NoneErrorZ ChannelManagerPersister_persist_manager LDKChannelManagerPersister *NONNULL_PTR this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager
2366         export function ChannelManagerPersister_persist_manager(this_arg: number, channel_manager: number): number {
2367                 if(!isWasmInitialized) {
2368                         throw new Error("initializeWasm() must be awaited first!");
2369                 }
2370                 const nativeResponseValue = wasm.ChannelManagerPersister_persist_manager(this_arg, channel_manager);
2371                 return nativeResponseValue;
2372         }
2373         public static class LDKFallback {
2374                 private LDKFallback() {}
2375                 export class SegWitProgram extends LDKFallback {
2376                         public number version;
2377                         public Uint8Array program;
2378                         SegWitProgram(number version, Uint8Array program) { this.version = version; this.program = program; }
2379                 }
2380                 export class PubKeyHash extends LDKFallback {
2381                         public Uint8Array pub_key_hash;
2382                         PubKeyHash(Uint8Array pub_key_hash) { this.pub_key_hash = pub_key_hash; }
2383                 }
2384                 export class ScriptHash extends LDKFallback {
2385                         public Uint8Array script_hash;
2386                         ScriptHash(Uint8Array script_hash) { this.script_hash = script_hash; }
2387                 }
2388                 static native void init();
2389         }
2390         static { LDKFallback.init(); }
2391         public static native LDKFallback LDKFallback_ref_from_ptr(long ptr);
2392         // struct LDKStr _ldk_get_compiled_version(void);
2393         export function _ldk_get_compiled_version(): String {
2394                 if(!isWasmInitialized) {
2395                         throw new Error("initializeWasm() must be awaited first!");
2396                 }
2397                 const nativeResponseValue = wasm._ldk_get_compiled_version();
2398                 return nativeResponseValue;
2399         }
2400         // struct LDKStr _ldk_c_bindings_get_compiled_version(void);
2401         export function _ldk_c_bindings_get_compiled_version(): String {
2402                 if(!isWasmInitialized) {
2403                         throw new Error("initializeWasm() must be awaited first!");
2404                 }
2405                 const nativeResponseValue = wasm._ldk_c_bindings_get_compiled_version();
2406                 return nativeResponseValue;
2407         }
2408         // void Transaction_free(struct LDKTransaction _res);
2409         export function Transaction_free(_res: Uint8Array): void {
2410                 if(!isWasmInitialized) {
2411                         throw new Error("initializeWasm() must be awaited first!");
2412                 }
2413                 const nativeResponseValue = wasm.Transaction_free(encodeArray(_res));
2414                 // debug statements here
2415         }
2416         // struct LDKTxOut TxOut_new(struct LDKCVec_u8Z script_pubkey, uint64_t value);
2417         export function TxOut_new(script_pubkey: Uint8Array, value: number): number {
2418                 if(!isWasmInitialized) {
2419                         throw new Error("initializeWasm() must be awaited first!");
2420                 }
2421                 const nativeResponseValue = wasm.TxOut_new(encodeArray(script_pubkey), value);
2422                 return nativeResponseValue;
2423         }
2424         // void TxOut_free(struct LDKTxOut _res);
2425         export function TxOut_free(_res: number): void {
2426                 if(!isWasmInitialized) {
2427                         throw new Error("initializeWasm() must be awaited first!");
2428                 }
2429                 const nativeResponseValue = wasm.TxOut_free(_res);
2430                 // debug statements here
2431         }
2432         // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
2433         export function TxOut_clone(orig: number): number {
2434                 if(!isWasmInitialized) {
2435                         throw new Error("initializeWasm() must be awaited first!");
2436                 }
2437                 const nativeResponseValue = wasm.TxOut_clone(orig);
2438                 return nativeResponseValue;
2439         }
2440         // void Str_free(struct LDKStr _res);
2441         export function Str_free(_res: String): void {
2442                 if(!isWasmInitialized) {
2443                         throw new Error("initializeWasm() must be awaited first!");
2444                 }
2445                 const nativeResponseValue = wasm.Str_free(_res);
2446                 // debug statements here
2447         }
2448         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
2449         export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
2450                 if(!isWasmInitialized) {
2451                         throw new Error("initializeWasm() must be awaited first!");
2452                 }
2453                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
2454                 return nativeResponseValue;
2455         }
2456         // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
2457         export function CResult_SecretKeyErrorZ_err(e: Secp256k1Error): number {
2458                 if(!isWasmInitialized) {
2459                         throw new Error("initializeWasm() must be awaited first!");
2460                 }
2461                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
2462                 return nativeResponseValue;
2463         }
2464         // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
2465         export function CResult_SecretKeyErrorZ_free(_res: number): void {
2466                 if(!isWasmInitialized) {
2467                         throw new Error("initializeWasm() must be awaited first!");
2468                 }
2469                 const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
2470                 // debug statements here
2471         }
2472         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
2473         export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
2474                 if(!isWasmInitialized) {
2475                         throw new Error("initializeWasm() must be awaited first!");
2476                 }
2477                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
2478                 return nativeResponseValue;
2479         }
2480         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
2481         export function CResult_PublicKeyErrorZ_err(e: Secp256k1Error): number {
2482                 if(!isWasmInitialized) {
2483                         throw new Error("initializeWasm() must be awaited first!");
2484                 }
2485                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
2486                 return nativeResponseValue;
2487         }
2488         // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
2489         export function CResult_PublicKeyErrorZ_free(_res: number): void {
2490                 if(!isWasmInitialized) {
2491                         throw new Error("initializeWasm() must be awaited first!");
2492                 }
2493                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
2494                 // debug statements here
2495         }
2496         // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig);
2497         export function CResult_PublicKeyErrorZ_clone(orig: number): number {
2498                 if(!isWasmInitialized) {
2499                         throw new Error("initializeWasm() must be awaited first!");
2500                 }
2501                 const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_clone(orig);
2502                 return nativeResponseValue;
2503         }
2504         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
2505         export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
2506                 if(!isWasmInitialized) {
2507                         throw new Error("initializeWasm() must be awaited first!");
2508                 }
2509                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
2510                 return nativeResponseValue;
2511         }
2512         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
2513         export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
2514                 if(!isWasmInitialized) {
2515                         throw new Error("initializeWasm() must be awaited first!");
2516                 }
2517                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
2518                 return nativeResponseValue;
2519         }
2520         // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
2521         export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
2522                 if(!isWasmInitialized) {
2523                         throw new Error("initializeWasm() must be awaited first!");
2524                 }
2525                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
2526                 // debug statements here
2527         }
2528         // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
2529         export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
2530                 if(!isWasmInitialized) {
2531                         throw new Error("initializeWasm() must be awaited first!");
2532                 }
2533                 const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
2534                 return nativeResponseValue;
2535         }
2536         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
2537         export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
2538                 if(!isWasmInitialized) {
2539                         throw new Error("initializeWasm() must be awaited first!");
2540                 }
2541                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
2542                 return nativeResponseValue;
2543         }
2544         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
2545         export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
2546                 if(!isWasmInitialized) {
2547                         throw new Error("initializeWasm() must be awaited first!");
2548                 }
2549                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
2550                 return nativeResponseValue;
2551         }
2552         // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
2553         export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
2554                 if(!isWasmInitialized) {
2555                         throw new Error("initializeWasm() must be awaited first!");
2556                 }
2557                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
2558                 // debug statements here
2559         }
2560         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
2561         export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
2562                 if(!isWasmInitialized) {
2563                         throw new Error("initializeWasm() must be awaited first!");
2564                 }
2565                 const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
2566                 return nativeResponseValue;
2567         }
2568         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
2569         export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
2570                 if(!isWasmInitialized) {
2571                         throw new Error("initializeWasm() must be awaited first!");
2572                 }
2573                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
2574                 return nativeResponseValue;
2575         }
2576         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
2577         export function CResult_TxCreationKeysErrorZ_err(e: Secp256k1Error): number {
2578                 if(!isWasmInitialized) {
2579                         throw new Error("initializeWasm() must be awaited first!");
2580                 }
2581                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
2582                 return nativeResponseValue;
2583         }
2584         // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
2585         export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
2586                 if(!isWasmInitialized) {
2587                         throw new Error("initializeWasm() must be awaited first!");
2588                 }
2589                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
2590                 // debug statements here
2591         }
2592         // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig);
2593         export function CResult_TxCreationKeysErrorZ_clone(orig: number): number {
2594                 if(!isWasmInitialized) {
2595                         throw new Error("initializeWasm() must be awaited first!");
2596                 }
2597                 const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_clone(orig);
2598                 return nativeResponseValue;
2599         }
2600         // struct LDKCOption_u32Z COption_u32Z_some(uint32_t o);
2601         export function COption_u32Z_some(o: number): number {
2602                 if(!isWasmInitialized) {
2603                         throw new Error("initializeWasm() must be awaited first!");
2604                 }
2605                 const nativeResponseValue = wasm.COption_u32Z_some(o);
2606                 return nativeResponseValue;
2607         }
2608         // struct LDKCOption_u32Z COption_u32Z_none(void);
2609         export function COption_u32Z_none(): number {
2610                 if(!isWasmInitialized) {
2611                         throw new Error("initializeWasm() must be awaited first!");
2612                 }
2613                 const nativeResponseValue = wasm.COption_u32Z_none();
2614                 return nativeResponseValue;
2615         }
2616         // void COption_u32Z_free(struct LDKCOption_u32Z _res);
2617         export function COption_u32Z_free(_res: number): void {
2618                 if(!isWasmInitialized) {
2619                         throw new Error("initializeWasm() must be awaited first!");
2620                 }
2621                 const nativeResponseValue = wasm.COption_u32Z_free(_res);
2622                 // debug statements here
2623         }
2624         // struct LDKCOption_u32Z COption_u32Z_clone(const struct LDKCOption_u32Z *NONNULL_PTR orig);
2625         export function COption_u32Z_clone(orig: number): number {
2626                 if(!isWasmInitialized) {
2627                         throw new Error("initializeWasm() must be awaited first!");
2628                 }
2629                 const nativeResponseValue = wasm.COption_u32Z_clone(orig);
2630                 return nativeResponseValue;
2631         }
2632         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
2633         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
2634                 if(!isWasmInitialized) {
2635                         throw new Error("initializeWasm() must be awaited first!");
2636                 }
2637                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
2638                 return nativeResponseValue;
2639         }
2640         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
2641         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
2642                 if(!isWasmInitialized) {
2643                         throw new Error("initializeWasm() must be awaited first!");
2644                 }
2645                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
2646                 return nativeResponseValue;
2647         }
2648         // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
2649         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
2650                 if(!isWasmInitialized) {
2651                         throw new Error("initializeWasm() must be awaited first!");
2652                 }
2653                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
2654                 // debug statements here
2655         }
2656         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
2657         export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
2658                 if(!isWasmInitialized) {
2659                         throw new Error("initializeWasm() must be awaited first!");
2660                 }
2661                 const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
2662                 return nativeResponseValue;
2663         }
2664         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
2665         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2666                 if(!isWasmInitialized) {
2667                         throw new Error("initializeWasm() must be awaited first!");
2668                 }
2669                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
2670                 return nativeResponseValue;
2671         }
2672         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2673         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2674                 if(!isWasmInitialized) {
2675                         throw new Error("initializeWasm() must be awaited first!");
2676                 }
2677                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
2678                 return nativeResponseValue;
2679         }
2680         // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
2681         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2682                 if(!isWasmInitialized) {
2683                         throw new Error("initializeWasm() must be awaited first!");
2684                 }
2685                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
2686                 // debug statements here
2687         }
2688         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2689         export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2690                 if(!isWasmInitialized) {
2691                         throw new Error("initializeWasm() must be awaited first!");
2692                 }
2693                 const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
2694                 return nativeResponseValue;
2695         }
2696         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
2697         export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
2698                 if(!isWasmInitialized) {
2699                         throw new Error("initializeWasm() must be awaited first!");
2700                 }
2701                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
2702                 return nativeResponseValue;
2703         }
2704         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
2705         export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
2706                 if(!isWasmInitialized) {
2707                         throw new Error("initializeWasm() must be awaited first!");
2708                 }
2709                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
2710                 return nativeResponseValue;
2711         }
2712         // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
2713         export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
2714                 if(!isWasmInitialized) {
2715                         throw new Error("initializeWasm() must be awaited first!");
2716                 }
2717                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
2718                 // debug statements here
2719         }
2720         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
2721         export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
2722                 if(!isWasmInitialized) {
2723                         throw new Error("initializeWasm() must be awaited first!");
2724                 }
2725                 const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
2726                 return nativeResponseValue;
2727         }
2728         // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
2729         export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
2730                 if(!isWasmInitialized) {
2731                         throw new Error("initializeWasm() must be awaited first!");
2732                 }
2733                 const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
2734                 // debug statements here
2735         }
2736         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
2737         export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2738                 if(!isWasmInitialized) {
2739                         throw new Error("initializeWasm() must be awaited first!");
2740                 }
2741                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
2742                 return nativeResponseValue;
2743         }
2744         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2745         export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
2746                 if(!isWasmInitialized) {
2747                         throw new Error("initializeWasm() must be awaited first!");
2748                 }
2749                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
2750                 return nativeResponseValue;
2751         }
2752         // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
2753         export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2754                 if(!isWasmInitialized) {
2755                         throw new Error("initializeWasm() must be awaited first!");
2756                 }
2757                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
2758                 // debug statements here
2759         }
2760         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2761         export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2762                 if(!isWasmInitialized) {
2763                         throw new Error("initializeWasm() must be awaited first!");
2764                 }
2765                 const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
2766                 return nativeResponseValue;
2767         }
2768         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
2769         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
2770                 if(!isWasmInitialized) {
2771                         throw new Error("initializeWasm() must be awaited first!");
2772                 }
2773                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
2774                 return nativeResponseValue;
2775         }
2776         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2777         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
2778                 if(!isWasmInitialized) {
2779                         throw new Error("initializeWasm() must be awaited first!");
2780                 }
2781                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
2782                 return nativeResponseValue;
2783         }
2784         // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
2785         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
2786                 if(!isWasmInitialized) {
2787                         throw new Error("initializeWasm() must be awaited first!");
2788                 }
2789                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
2790                 // debug statements here
2791         }
2792         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2793         export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2794                 if(!isWasmInitialized) {
2795                         throw new Error("initializeWasm() must be awaited first!");
2796                 }
2797                 const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
2798                 return nativeResponseValue;
2799         }
2800         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_ok(struct LDKTrustedClosingTransaction o);
2801         export function CResult_TrustedClosingTransactionNoneZ_ok(o: number): number {
2802                 if(!isWasmInitialized) {
2803                         throw new Error("initializeWasm() must be awaited first!");
2804                 }
2805                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_ok(o);
2806                 return nativeResponseValue;
2807         }
2808         // struct LDKCResult_TrustedClosingTransactionNoneZ CResult_TrustedClosingTransactionNoneZ_err(void);
2809         export function CResult_TrustedClosingTransactionNoneZ_err(): number {
2810                 if(!isWasmInitialized) {
2811                         throw new Error("initializeWasm() must be awaited first!");
2812                 }
2813                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_err();
2814                 return nativeResponseValue;
2815         }
2816         // void CResult_TrustedClosingTransactionNoneZ_free(struct LDKCResult_TrustedClosingTransactionNoneZ _res);
2817         export function CResult_TrustedClosingTransactionNoneZ_free(_res: number): void {
2818                 if(!isWasmInitialized) {
2819                         throw new Error("initializeWasm() must be awaited first!");
2820                 }
2821                 const nativeResponseValue = wasm.CResult_TrustedClosingTransactionNoneZ_free(_res);
2822                 // debug statements here
2823         }
2824         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
2825         export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
2826                 if(!isWasmInitialized) {
2827                         throw new Error("initializeWasm() must be awaited first!");
2828                 }
2829                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
2830                 return nativeResponseValue;
2831         }
2832         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
2833         export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
2834                 if(!isWasmInitialized) {
2835                         throw new Error("initializeWasm() must be awaited first!");
2836                 }
2837                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
2838                 return nativeResponseValue;
2839         }
2840         // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
2841         export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
2842                 if(!isWasmInitialized) {
2843                         throw new Error("initializeWasm() must be awaited first!");
2844                 }
2845                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
2846                 // debug statements here
2847         }
2848         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
2849         export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
2850                 if(!isWasmInitialized) {
2851                         throw new Error("initializeWasm() must be awaited first!");
2852                 }
2853                 const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
2854                 return nativeResponseValue;
2855         }
2856         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
2857         export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
2858                 if(!isWasmInitialized) {
2859                         throw new Error("initializeWasm() must be awaited first!");
2860                 }
2861                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
2862                 return nativeResponseValue;
2863         }
2864         // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
2865         export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
2866                 if(!isWasmInitialized) {
2867                         throw new Error("initializeWasm() must be awaited first!");
2868                 }
2869                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
2870                 return nativeResponseValue;
2871         }
2872         // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
2873         export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
2874                 if(!isWasmInitialized) {
2875                         throw new Error("initializeWasm() must be awaited first!");
2876                 }
2877                 const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
2878                 // debug statements here
2879         }
2880         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
2881         export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
2882                 if(!isWasmInitialized) {
2883                         throw new Error("initializeWasm() must be awaited first!");
2884                 }
2885                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
2886                 return nativeResponseValue;
2887         }
2888         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
2889         export function CResult_CVec_SignatureZNoneZ_err(): number {
2890                 if(!isWasmInitialized) {
2891                         throw new Error("initializeWasm() must be awaited first!");
2892                 }
2893                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
2894                 return nativeResponseValue;
2895         }
2896         // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
2897         export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
2898                 if(!isWasmInitialized) {
2899                         throw new Error("initializeWasm() must be awaited first!");
2900                 }
2901                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
2902                 // debug statements here
2903         }
2904         // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
2905         export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
2906                 if(!isWasmInitialized) {
2907                         throw new Error("initializeWasm() must be awaited first!");
2908                 }
2909                 const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
2910                 return nativeResponseValue;
2911         }
2912         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_ok(struct LDKShutdownScript o);
2913         export function CResult_ShutdownScriptDecodeErrorZ_ok(o: number): number {
2914                 if(!isWasmInitialized) {
2915                         throw new Error("initializeWasm() must be awaited first!");
2916                 }
2917                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_ok(o);
2918                 return nativeResponseValue;
2919         }
2920         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_err(struct LDKDecodeError e);
2921         export function CResult_ShutdownScriptDecodeErrorZ_err(e: number): number {
2922                 if(!isWasmInitialized) {
2923                         throw new Error("initializeWasm() must be awaited first!");
2924                 }
2925                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_err(e);
2926                 return nativeResponseValue;
2927         }
2928         // void CResult_ShutdownScriptDecodeErrorZ_free(struct LDKCResult_ShutdownScriptDecodeErrorZ _res);
2929         export function CResult_ShutdownScriptDecodeErrorZ_free(_res: number): void {
2930                 if(!isWasmInitialized) {
2931                         throw new Error("initializeWasm() must be awaited first!");
2932                 }
2933                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_free(_res);
2934                 // debug statements here
2935         }
2936         // struct LDKCResult_ShutdownScriptDecodeErrorZ CResult_ShutdownScriptDecodeErrorZ_clone(const struct LDKCResult_ShutdownScriptDecodeErrorZ *NONNULL_PTR orig);
2937         export function CResult_ShutdownScriptDecodeErrorZ_clone(orig: number): number {
2938                 if(!isWasmInitialized) {
2939                         throw new Error("initializeWasm() must be awaited first!");
2940                 }
2941                 const nativeResponseValue = wasm.CResult_ShutdownScriptDecodeErrorZ_clone(orig);
2942                 return nativeResponseValue;
2943         }
2944         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_ok(struct LDKShutdownScript o);
2945         export function CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o: number): number {
2946                 if(!isWasmInitialized) {
2947                         throw new Error("initializeWasm() must be awaited first!");
2948                 }
2949                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_ok(o);
2950                 return nativeResponseValue;
2951         }
2952         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_err(struct LDKInvalidShutdownScript e);
2953         export function CResult_ShutdownScriptInvalidShutdownScriptZ_err(e: number): number {
2954                 if(!isWasmInitialized) {
2955                         throw new Error("initializeWasm() must be awaited first!");
2956                 }
2957                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_err(e);
2958                 return nativeResponseValue;
2959         }
2960         // void CResult_ShutdownScriptInvalidShutdownScriptZ_free(struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ _res);
2961         export function CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res: number): void {
2962                 if(!isWasmInitialized) {
2963                         throw new Error("initializeWasm() must be awaited first!");
2964                 }
2965                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_free(_res);
2966                 // debug statements here
2967         }
2968         // struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ CResult_ShutdownScriptInvalidShutdownScriptZ_clone(const struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ *NONNULL_PTR orig);
2969         export function CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig: number): number {
2970                 if(!isWasmInitialized) {
2971                         throw new Error("initializeWasm() must be awaited first!");
2972                 }
2973                 const nativeResponseValue = wasm.CResult_ShutdownScriptInvalidShutdownScriptZ_clone(orig);
2974                 return nativeResponseValue;
2975         }
2976         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void);
2977         export function CResult_NoneErrorZ_ok(): number {
2978                 if(!isWasmInitialized) {
2979                         throw new Error("initializeWasm() must be awaited first!");
2980                 }
2981                 const nativeResponseValue = wasm.CResult_NoneErrorZ_ok();
2982                 return nativeResponseValue;
2983         }
2984         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e);
2985         export function CResult_NoneErrorZ_err(e: IOError): number {
2986                 if(!isWasmInitialized) {
2987                         throw new Error("initializeWasm() must be awaited first!");
2988                 }
2989                 const nativeResponseValue = wasm.CResult_NoneErrorZ_err(e);
2990                 return nativeResponseValue;
2991         }
2992         // void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res);
2993         export function CResult_NoneErrorZ_free(_res: number): void {
2994                 if(!isWasmInitialized) {
2995                         throw new Error("initializeWasm() must be awaited first!");
2996                 }
2997                 const nativeResponseValue = wasm.CResult_NoneErrorZ_free(_res);
2998                 // debug statements here
2999         }
3000         // struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig);
3001         export function CResult_NoneErrorZ_clone(orig: number): number {
3002                 if(!isWasmInitialized) {
3003                         throw new Error("initializeWasm() must be awaited first!");
3004                 }
3005                 const nativeResponseValue = wasm.CResult_NoneErrorZ_clone(orig);
3006                 return nativeResponseValue;
3007         }
3008         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o);
3009         export function CResult_RouteHopDecodeErrorZ_ok(o: number): number {
3010                 if(!isWasmInitialized) {
3011                         throw new Error("initializeWasm() must be awaited first!");
3012                 }
3013                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_ok(o);
3014                 return nativeResponseValue;
3015         }
3016         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e);
3017         export function CResult_RouteHopDecodeErrorZ_err(e: number): number {
3018                 if(!isWasmInitialized) {
3019                         throw new Error("initializeWasm() must be awaited first!");
3020                 }
3021                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_err(e);
3022                 return nativeResponseValue;
3023         }
3024         // void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res);
3025         export function CResult_RouteHopDecodeErrorZ_free(_res: number): void {
3026                 if(!isWasmInitialized) {
3027                         throw new Error("initializeWasm() must be awaited first!");
3028                 }
3029                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_free(_res);
3030                 // debug statements here
3031         }
3032         // struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig);
3033         export function CResult_RouteHopDecodeErrorZ_clone(orig: number): number {
3034                 if(!isWasmInitialized) {
3035                         throw new Error("initializeWasm() must be awaited first!");
3036                 }
3037                 const nativeResponseValue = wasm.CResult_RouteHopDecodeErrorZ_clone(orig);
3038                 return nativeResponseValue;
3039         }
3040         // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
3041         export function CVec_RouteHopZ_free(_res: number[]): void {
3042                 if(!isWasmInitialized) {
3043                         throw new Error("initializeWasm() must be awaited first!");
3044                 }
3045                 const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
3046                 // debug statements here
3047         }
3048         // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
3049         export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
3050                 if(!isWasmInitialized) {
3051                         throw new Error("initializeWasm() must be awaited first!");
3052                 }
3053                 const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
3054                 // debug statements here
3055         }
3056         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
3057         export function CResult_RouteDecodeErrorZ_ok(o: number): number {
3058                 if(!isWasmInitialized) {
3059                         throw new Error("initializeWasm() must be awaited first!");
3060                 }
3061                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
3062                 return nativeResponseValue;
3063         }
3064         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
3065         export function CResult_RouteDecodeErrorZ_err(e: number): number {
3066                 if(!isWasmInitialized) {
3067                         throw new Error("initializeWasm() must be awaited first!");
3068                 }
3069                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
3070                 return nativeResponseValue;
3071         }
3072         // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
3073         export function CResult_RouteDecodeErrorZ_free(_res: number): void {
3074                 if(!isWasmInitialized) {
3075                         throw new Error("initializeWasm() must be awaited first!");
3076                 }
3077                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
3078                 // debug statements here
3079         }
3080         // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
3081         export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
3082                 if(!isWasmInitialized) {
3083                         throw new Error("initializeWasm() must be awaited first!");
3084                 }
3085                 const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
3086                 return nativeResponseValue;
3087         }
3088         // struct LDKCOption_u64Z COption_u64Z_some(uint64_t o);
3089         export function COption_u64Z_some(o: number): number {
3090                 if(!isWasmInitialized) {
3091                         throw new Error("initializeWasm() must be awaited first!");
3092                 }
3093                 const nativeResponseValue = wasm.COption_u64Z_some(o);
3094                 return nativeResponseValue;
3095         }
3096         // struct LDKCOption_u64Z COption_u64Z_none(void);
3097         export function COption_u64Z_none(): number {
3098                 if(!isWasmInitialized) {
3099                         throw new Error("initializeWasm() must be awaited first!");
3100                 }
3101                 const nativeResponseValue = wasm.COption_u64Z_none();
3102                 return nativeResponseValue;
3103         }
3104         // void COption_u64Z_free(struct LDKCOption_u64Z _res);
3105         export function COption_u64Z_free(_res: number): void {
3106                 if(!isWasmInitialized) {
3107                         throw new Error("initializeWasm() must be awaited first!");
3108                 }
3109                 const nativeResponseValue = wasm.COption_u64Z_free(_res);
3110                 // debug statements here
3111         }
3112         // struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig);
3113         export function COption_u64Z_clone(orig: number): number {
3114                 if(!isWasmInitialized) {
3115                         throw new Error("initializeWasm() must be awaited first!");
3116                 }
3117                 const nativeResponseValue = wasm.COption_u64Z_clone(orig);
3118                 return nativeResponseValue;
3119         }
3120         // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
3121         export function CVec_ChannelDetailsZ_free(_res: number[]): void {
3122                 if(!isWasmInitialized) {
3123                         throw new Error("initializeWasm() must be awaited first!");
3124                 }
3125                 const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
3126                 // debug statements here
3127         }
3128         // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
3129         export function CVec_RouteHintZ_free(_res: number[]): void {
3130                 if(!isWasmInitialized) {
3131                         throw new Error("initializeWasm() must be awaited first!");
3132                 }
3133                 const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
3134                 // debug statements here
3135         }
3136         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
3137         export function CResult_RouteLightningErrorZ_ok(o: number): number {
3138                 if(!isWasmInitialized) {
3139                         throw new Error("initializeWasm() must be awaited first!");
3140                 }
3141                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
3142                 return nativeResponseValue;
3143         }
3144         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
3145         export function CResult_RouteLightningErrorZ_err(e: number): number {
3146                 if(!isWasmInitialized) {
3147                         throw new Error("initializeWasm() must be awaited first!");
3148                 }
3149                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
3150                 return nativeResponseValue;
3151         }
3152         // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
3153         export function CResult_RouteLightningErrorZ_free(_res: number): void {
3154                 if(!isWasmInitialized) {
3155                         throw new Error("initializeWasm() must be awaited first!");
3156                 }
3157                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
3158                 // debug statements here
3159         }
3160         // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
3161         export function CResult_RouteLightningErrorZ_clone(orig: number): number {
3162                 if(!isWasmInitialized) {
3163                         throw new Error("initializeWasm() must be awaited first!");
3164                 }
3165                 const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
3166                 return nativeResponseValue;
3167         }
3168         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
3169         export function CResult_TxOutAccessErrorZ_ok(o: number): number {
3170                 if(!isWasmInitialized) {
3171                         throw new Error("initializeWasm() must be awaited first!");
3172                 }
3173                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
3174                 return nativeResponseValue;
3175         }
3176         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
3177         export function CResult_TxOutAccessErrorZ_err(e: AccessError): number {
3178                 if(!isWasmInitialized) {
3179                         throw new Error("initializeWasm() must be awaited first!");
3180                 }
3181                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
3182                 return nativeResponseValue;
3183         }
3184         // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
3185         export function CResult_TxOutAccessErrorZ_free(_res: number): void {
3186                 if(!isWasmInitialized) {
3187                         throw new Error("initializeWasm() must be awaited first!");
3188                 }
3189                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
3190                 // debug statements here
3191         }
3192         // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
3193         export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
3194                 if(!isWasmInitialized) {
3195                         throw new Error("initializeWasm() must be awaited first!");
3196                 }
3197                 const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
3198                 return nativeResponseValue;
3199         }
3200         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig);
3201         export function C2Tuple_usizeTransactionZ_clone(orig: number): number {
3202                 if(!isWasmInitialized) {
3203                         throw new Error("initializeWasm() must be awaited first!");
3204                 }
3205                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_clone(orig);
3206                 return nativeResponseValue;
3207         }
3208         // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
3209         export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
3210                 if(!isWasmInitialized) {
3211                         throw new Error("initializeWasm() must be awaited first!");
3212                 }
3213                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
3214                 return nativeResponseValue;
3215         }
3216         // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
3217         export function C2Tuple_usizeTransactionZ_free(_res: number): void {
3218                 if(!isWasmInitialized) {
3219                         throw new Error("initializeWasm() must be awaited first!");
3220                 }
3221                 const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
3222                 // debug statements here
3223         }
3224         // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
3225         export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
3226                 if(!isWasmInitialized) {
3227                         throw new Error("initializeWasm() must be awaited first!");
3228                 }
3229                 const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
3230                 // debug statements here
3231         }
3232         // void CVec_TxidZ_free(struct LDKCVec_TxidZ _res);
3233         export function CVec_TxidZ_free(_res: Uint8Array[]): void {
3234                 if(!isWasmInitialized) {
3235                         throw new Error("initializeWasm() must be awaited first!");
3236                 }
3237                 const nativeResponseValue = wasm.CVec_TxidZ_free(_res);
3238                 // debug statements here
3239         }
3240         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
3241         export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
3242                 if(!isWasmInitialized) {
3243                         throw new Error("initializeWasm() must be awaited first!");
3244                 }
3245                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
3246                 return nativeResponseValue;
3247         }
3248         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
3249         export function CResult_NoneChannelMonitorUpdateErrZ_err(e: ChannelMonitorUpdateErr): number {
3250                 if(!isWasmInitialized) {
3251                         throw new Error("initializeWasm() must be awaited first!");
3252                 }
3253                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
3254                 return nativeResponseValue;
3255         }
3256         // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
3257         export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
3258                 if(!isWasmInitialized) {
3259                         throw new Error("initializeWasm() must be awaited first!");
3260                 }
3261                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
3262                 // debug statements here
3263         }
3264         // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
3265         export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
3266                 if(!isWasmInitialized) {
3267                         throw new Error("initializeWasm() must be awaited first!");
3268                 }
3269                 const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
3270                 return nativeResponseValue;
3271         }
3272         // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
3273         export function CVec_MonitorEventZ_free(_res: number[]): void {
3274                 if(!isWasmInitialized) {
3275                         throw new Error("initializeWasm() must be awaited first!");
3276                 }
3277                 const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
3278                 // debug statements here
3279         }
3280         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o);
3281         export function COption_C2Tuple_usizeTransactionZZ_some(o: number): number {
3282                 if(!isWasmInitialized) {
3283                         throw new Error("initializeWasm() must be awaited first!");
3284                 }
3285                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_some(o);
3286                 return nativeResponseValue;
3287         }
3288         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void);
3289         export function COption_C2Tuple_usizeTransactionZZ_none(): number {
3290                 if(!isWasmInitialized) {
3291                         throw new Error("initializeWasm() must be awaited first!");
3292                 }
3293                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_none();
3294                 return nativeResponseValue;
3295         }
3296         // void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res);
3297         export function COption_C2Tuple_usizeTransactionZZ_free(_res: number): void {
3298                 if(!isWasmInitialized) {
3299                         throw new Error("initializeWasm() must be awaited first!");
3300                 }
3301                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_free(_res);
3302                 // debug statements here
3303         }
3304         // struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig);
3305         export function COption_C2Tuple_usizeTransactionZZ_clone(orig: number): number {
3306                 if(!isWasmInitialized) {
3307                         throw new Error("initializeWasm() must be awaited first!");
3308                 }
3309                 const nativeResponseValue = wasm.COption_C2Tuple_usizeTransactionZZ_clone(orig);
3310                 return nativeResponseValue;
3311         }
3312         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_some(struct LDKNetworkUpdate o);
3313         export function COption_NetworkUpdateZ_some(o: number): number {
3314                 if(!isWasmInitialized) {
3315                         throw new Error("initializeWasm() must be awaited first!");
3316                 }
3317                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_some(o);
3318                 return nativeResponseValue;
3319         }
3320         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_none(void);
3321         export function COption_NetworkUpdateZ_none(): number {
3322                 if(!isWasmInitialized) {
3323                         throw new Error("initializeWasm() must be awaited first!");
3324                 }
3325                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_none();
3326                 return nativeResponseValue;
3327         }
3328         // void COption_NetworkUpdateZ_free(struct LDKCOption_NetworkUpdateZ _res);
3329         export function COption_NetworkUpdateZ_free(_res: number): void {
3330                 if(!isWasmInitialized) {
3331                         throw new Error("initializeWasm() must be awaited first!");
3332                 }
3333                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_free(_res);
3334                 // debug statements here
3335         }
3336         // struct LDKCOption_NetworkUpdateZ COption_NetworkUpdateZ_clone(const struct LDKCOption_NetworkUpdateZ *NONNULL_PTR orig);
3337         export function COption_NetworkUpdateZ_clone(orig: number): number {
3338                 if(!isWasmInitialized) {
3339                         throw new Error("initializeWasm() must be awaited first!");
3340                 }
3341                 const nativeResponseValue = wasm.COption_NetworkUpdateZ_clone(orig);
3342                 return nativeResponseValue;
3343         }
3344         // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
3345         export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
3346                 if(!isWasmInitialized) {
3347                         throw new Error("initializeWasm() must be awaited first!");
3348                 }
3349                 const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
3350                 // debug statements here
3351         }
3352         // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
3353         export function CVec_MessageSendEventZ_free(_res: number[]): void {
3354                 if(!isWasmInitialized) {
3355                         throw new Error("initializeWasm() must be awaited first!");
3356                 }
3357                 const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
3358                 // debug statements here
3359         }
3360         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
3361         export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
3362                 if(!isWasmInitialized) {
3363                         throw new Error("initializeWasm() must be awaited first!");
3364                 }
3365                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
3366                 return nativeResponseValue;
3367         }
3368         // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3369         export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
3370                 if(!isWasmInitialized) {
3371                         throw new Error("initializeWasm() must be awaited first!");
3372                 }
3373                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
3374                 return nativeResponseValue;
3375         }
3376         // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
3377         export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
3378                 if(!isWasmInitialized) {
3379                         throw new Error("initializeWasm() must be awaited first!");
3380                 }
3381                 const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
3382                 // debug statements here
3383         }
3384         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
3385         export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
3386                 if(!isWasmInitialized) {
3387                         throw new Error("initializeWasm() must be awaited first!");
3388                 }
3389                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
3390                 return nativeResponseValue;
3391         }
3392         // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3393         export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
3394                 if(!isWasmInitialized) {
3395                         throw new Error("initializeWasm() must be awaited first!");
3396                 }
3397                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
3398                 return nativeResponseValue;
3399         }
3400         // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
3401         export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
3402                 if(!isWasmInitialized) {
3403                         throw new Error("initializeWasm() must be awaited first!");
3404                 }
3405                 const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
3406                 // debug statements here
3407         }
3408         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
3409         export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
3410                 if(!isWasmInitialized) {
3411                         throw new Error("initializeWasm() must be awaited first!");
3412                 }
3413                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
3414                 return nativeResponseValue;
3415         }
3416         // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3417         export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
3418                 if(!isWasmInitialized) {
3419                         throw new Error("initializeWasm() must be awaited first!");
3420                 }
3421                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
3422                 return nativeResponseValue;
3423         }
3424         // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
3425         export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
3426                 if(!isWasmInitialized) {
3427                         throw new Error("initializeWasm() must be awaited first!");
3428                 }
3429                 const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
3430                 // debug statements here
3431         }
3432         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o);
3433         export function CResult_InvoiceFeaturesDecodeErrorZ_ok(o: number): number {
3434                 if(!isWasmInitialized) {
3435                         throw new Error("initializeWasm() must be awaited first!");
3436                 }
3437                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_ok(o);
3438                 return nativeResponseValue;
3439         }
3440         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
3441         export function CResult_InvoiceFeaturesDecodeErrorZ_err(e: number): number {
3442                 if(!isWasmInitialized) {
3443                         throw new Error("initializeWasm() must be awaited first!");
3444                 }
3445                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_err(e);
3446                 return nativeResponseValue;
3447         }
3448         // void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res);
3449         export function CResult_InvoiceFeaturesDecodeErrorZ_free(_res: number): void {
3450                 if(!isWasmInitialized) {
3451                         throw new Error("initializeWasm() must be awaited first!");
3452                 }
3453                 const nativeResponseValue = wasm.CResult_InvoiceFeaturesDecodeErrorZ_free(_res);
3454                 // debug statements here
3455         }
3456         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o);
3457         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
3458                 if(!isWasmInitialized) {
3459                         throw new Error("initializeWasm() must be awaited first!");
3460                 }
3461                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(o);
3462                 return nativeResponseValue;
3463         }
3464         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3465         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
3466                 if(!isWasmInitialized) {
3467                         throw new Error("initializeWasm() must be awaited first!");
3468                 }
3469                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(e);
3470                 return nativeResponseValue;
3471         }
3472         // void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res);
3473         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
3474                 if(!isWasmInitialized) {
3475                         throw new Error("initializeWasm() must be awaited first!");
3476                 }
3477                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(_res);
3478                 // debug statements here
3479         }
3480         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3481         export function CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3482                 if(!isWasmInitialized) {
3483                         throw new Error("initializeWasm() must be awaited first!");
3484                 }
3485                 const nativeResponseValue = wasm.CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(orig);
3486                 return nativeResponseValue;
3487         }
3488         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o);
3489         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o: number): number {
3490                 if(!isWasmInitialized) {
3491                         throw new Error("initializeWasm() must be awaited first!");
3492                 }
3493                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(o);
3494                 return nativeResponseValue;
3495         }
3496         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3497         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e: number): number {
3498                 if(!isWasmInitialized) {
3499                         throw new Error("initializeWasm() must be awaited first!");
3500                 }
3501                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(e);
3502                 return nativeResponseValue;
3503         }
3504         // void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res);
3505         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res: number): void {
3506                 if(!isWasmInitialized) {
3507                         throw new Error("initializeWasm() must be awaited first!");
3508                 }
3509                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(_res);
3510                 // debug statements here
3511         }
3512         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3513         export function CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3514                 if(!isWasmInitialized) {
3515                         throw new Error("initializeWasm() must be awaited first!");
3516                 }
3517                 const nativeResponseValue = wasm.CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(orig);
3518                 return nativeResponseValue;
3519         }
3520         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
3521         export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
3522                 if(!isWasmInitialized) {
3523                         throw new Error("initializeWasm() must be awaited first!");
3524                 }
3525                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
3526                 return nativeResponseValue;
3527         }
3528         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
3529         export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
3530                 if(!isWasmInitialized) {
3531                         throw new Error("initializeWasm() must be awaited first!");
3532                 }
3533                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
3534                 return nativeResponseValue;
3535         }
3536         // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
3537         export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
3538                 if(!isWasmInitialized) {
3539                         throw new Error("initializeWasm() must be awaited first!");
3540                 }
3541                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
3542                 // debug statements here
3543         }
3544         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
3545         export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
3546                 if(!isWasmInitialized) {
3547                         throw new Error("initializeWasm() must be awaited first!");
3548                 }
3549                 const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
3550                 return nativeResponseValue;
3551         }
3552         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_ok(void);
3553         export function CResult_NoneNoneZ_ok(): number {
3554                 if(!isWasmInitialized) {
3555                         throw new Error("initializeWasm() must be awaited first!");
3556                 }
3557                 const nativeResponseValue = wasm.CResult_NoneNoneZ_ok();
3558                 return nativeResponseValue;
3559         }
3560         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_err(void);
3561         export function CResult_NoneNoneZ_err(): number {
3562                 if(!isWasmInitialized) {
3563                         throw new Error("initializeWasm() must be awaited first!");
3564                 }
3565                 const nativeResponseValue = wasm.CResult_NoneNoneZ_err();
3566                 return nativeResponseValue;
3567         }
3568         // void CResult_NoneNoneZ_free(struct LDKCResult_NoneNoneZ _res);
3569         export function CResult_NoneNoneZ_free(_res: number): void {
3570                 if(!isWasmInitialized) {
3571                         throw new Error("initializeWasm() must be awaited first!");
3572                 }
3573                 const nativeResponseValue = wasm.CResult_NoneNoneZ_free(_res);
3574                 // debug statements here
3575         }
3576         // struct LDKCResult_NoneNoneZ CResult_NoneNoneZ_clone(const struct LDKCResult_NoneNoneZ *NONNULL_PTR orig);
3577         export function CResult_NoneNoneZ_clone(orig: number): number {
3578                 if(!isWasmInitialized) {
3579                         throw new Error("initializeWasm() must be awaited first!");
3580                 }
3581                 const nativeResponseValue = wasm.CResult_NoneNoneZ_clone(orig);
3582                 return nativeResponseValue;
3583         }
3584         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
3585         export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
3586                 if(!isWasmInitialized) {
3587                         throw new Error("initializeWasm() must be awaited first!");
3588                 }
3589                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
3590                 return nativeResponseValue;
3591         }
3592         // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
3593         export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
3594                 if(!isWasmInitialized) {
3595                         throw new Error("initializeWasm() must be awaited first!");
3596                 }
3597                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
3598                 return nativeResponseValue;
3599         }
3600         // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
3601         export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
3602                 if(!isWasmInitialized) {
3603                         throw new Error("initializeWasm() must be awaited first!");
3604                 }
3605                 const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
3606                 // debug statements here
3607         }
3608         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
3609         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
3610                 if(!isWasmInitialized) {
3611                         throw new Error("initializeWasm() must be awaited first!");
3612                 }
3613                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
3614                 return nativeResponseValue;
3615         }
3616         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
3617         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
3618                 if(!isWasmInitialized) {
3619                         throw new Error("initializeWasm() must be awaited first!");
3620                 }
3621                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
3622                 return nativeResponseValue;
3623         }
3624         // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
3625         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
3626                 if(!isWasmInitialized) {
3627                         throw new Error("initializeWasm() must be awaited first!");
3628                 }
3629                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
3630                 // debug statements here
3631         }
3632         // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
3633         export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
3634                 if(!isWasmInitialized) {
3635                         throw new Error("initializeWasm() must be awaited first!");
3636                 }
3637                 const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
3638                 return nativeResponseValue;
3639         }
3640         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
3641         export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
3642                 if(!isWasmInitialized) {
3643                         throw new Error("initializeWasm() must be awaited first!");
3644                 }
3645                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
3646                 return nativeResponseValue;
3647         }
3648         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
3649         export function CResult_SignatureNoneZ_err(): number {
3650                 if(!isWasmInitialized) {
3651                         throw new Error("initializeWasm() must be awaited first!");
3652                 }
3653                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
3654                 return nativeResponseValue;
3655         }
3656         // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
3657         export function CResult_SignatureNoneZ_free(_res: number): void {
3658                 if(!isWasmInitialized) {
3659                         throw new Error("initializeWasm() must be awaited first!");
3660                 }
3661                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
3662                 // debug statements here
3663         }
3664         // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
3665         export function CResult_SignatureNoneZ_clone(orig: number): number {
3666                 if(!isWasmInitialized) {
3667                         throw new Error("initializeWasm() must be awaited first!");
3668                 }
3669                 const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
3670                 return nativeResponseValue;
3671         }
3672         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
3673         export function CResult_SignDecodeErrorZ_ok(o: number): number {
3674                 if(!isWasmInitialized) {
3675                         throw new Error("initializeWasm() must be awaited first!");
3676                 }
3677                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
3678                 return nativeResponseValue;
3679         }
3680         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
3681         export function CResult_SignDecodeErrorZ_err(e: number): number {
3682                 if(!isWasmInitialized) {
3683                         throw new Error("initializeWasm() must be awaited first!");
3684                 }
3685                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
3686                 return nativeResponseValue;
3687         }
3688         // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
3689         export function CResult_SignDecodeErrorZ_free(_res: number): void {
3690                 if(!isWasmInitialized) {
3691                         throw new Error("initializeWasm() must be awaited first!");
3692                 }
3693                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
3694                 // debug statements here
3695         }
3696         // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
3697         export function CResult_SignDecodeErrorZ_clone(orig: number): number {
3698                 if(!isWasmInitialized) {
3699                         throw new Error("initializeWasm() must be awaited first!");
3700                 }
3701                 const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
3702                 return nativeResponseValue;
3703         }
3704         // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
3705         export function CVec_u8Z_free(_res: Uint8Array): void {
3706                 if(!isWasmInitialized) {
3707                         throw new Error("initializeWasm() must be awaited first!");
3708                 }
3709                 const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
3710                 // debug statements here
3711         }
3712         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o);
3713         export function CResult_RecoverableSignatureNoneZ_ok(arg: Uint8Array): number {
3714                 if(!isWasmInitialized) {
3715                         throw new Error("initializeWasm() must be awaited first!");
3716                 }
3717                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_ok(encodeArray(arg));
3718                 return nativeResponseValue;
3719         }
3720         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void);
3721         export function CResult_RecoverableSignatureNoneZ_err(): number {
3722                 if(!isWasmInitialized) {
3723                         throw new Error("initializeWasm() must be awaited first!");
3724                 }
3725                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_err();
3726                 return nativeResponseValue;
3727         }
3728         // void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res);
3729         export function CResult_RecoverableSignatureNoneZ_free(_res: number): void {
3730                 if(!isWasmInitialized) {
3731                         throw new Error("initializeWasm() must be awaited first!");
3732                 }
3733                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_free(_res);
3734                 // debug statements here
3735         }
3736         // struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig);
3737         export function CResult_RecoverableSignatureNoneZ_clone(orig: number): number {
3738                 if(!isWasmInitialized) {
3739                         throw new Error("initializeWasm() must be awaited first!");
3740                 }
3741                 const nativeResponseValue = wasm.CResult_RecoverableSignatureNoneZ_clone(orig);
3742                 return nativeResponseValue;
3743         }
3744         // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
3745         export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
3746                 if(!isWasmInitialized) {
3747                         throw new Error("initializeWasm() must be awaited first!");
3748                 }
3749                 const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
3750                 // debug statements here
3751         }
3752         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
3753         export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
3754                 if(!isWasmInitialized) {
3755                         throw new Error("initializeWasm() must be awaited first!");
3756                 }
3757                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
3758                 return nativeResponseValue;
3759         }
3760         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
3761         export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
3762                 if(!isWasmInitialized) {
3763                         throw new Error("initializeWasm() must be awaited first!");
3764                 }
3765                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
3766                 return nativeResponseValue;
3767         }
3768         // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
3769         export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
3770                 if(!isWasmInitialized) {
3771                         throw new Error("initializeWasm() must be awaited first!");
3772                 }
3773                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
3774                 // debug statements here
3775         }
3776         // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
3777         export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
3778                 if(!isWasmInitialized) {
3779                         throw new Error("initializeWasm() must be awaited first!");
3780                 }
3781                 const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
3782                 return nativeResponseValue;
3783         }
3784         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
3785         export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
3786                 if(!isWasmInitialized) {
3787                         throw new Error("initializeWasm() must be awaited first!");
3788                 }
3789                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
3790                 return nativeResponseValue;
3791         }
3792         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
3793         export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
3794                 if(!isWasmInitialized) {
3795                         throw new Error("initializeWasm() must be awaited first!");
3796                 }
3797                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
3798                 return nativeResponseValue;
3799         }
3800         // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
3801         export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
3802                 if(!isWasmInitialized) {
3803                         throw new Error("initializeWasm() must be awaited first!");
3804                 }
3805                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
3806                 // debug statements here
3807         }
3808         // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
3809         export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
3810                 if(!isWasmInitialized) {
3811                         throw new Error("initializeWasm() must be awaited first!");
3812                 }
3813                 const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
3814                 return nativeResponseValue;
3815         }
3816         // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
3817         export function CVec_TxOutZ_free(_res: number[]): void {
3818                 if(!isWasmInitialized) {
3819                         throw new Error("initializeWasm() must be awaited first!");
3820                 }
3821                 const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
3822                 // debug statements here
3823         }
3824         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
3825         export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
3826                 if(!isWasmInitialized) {
3827                         throw new Error("initializeWasm() must be awaited first!");
3828                 }
3829                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
3830                 return nativeResponseValue;
3831         }
3832         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
3833         export function CResult_TransactionNoneZ_err(): number {
3834                 if(!isWasmInitialized) {
3835                         throw new Error("initializeWasm() must be awaited first!");
3836                 }
3837                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
3838                 return nativeResponseValue;
3839         }
3840         // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
3841         export function CResult_TransactionNoneZ_free(_res: number): void {
3842                 if(!isWasmInitialized) {
3843                         throw new Error("initializeWasm() must be awaited first!");
3844                 }
3845                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
3846                 // debug statements here
3847         }
3848         // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig);
3849         export function CResult_TransactionNoneZ_clone(orig: number): number {
3850                 if(!isWasmInitialized) {
3851                         throw new Error("initializeWasm() must be awaited first!");
3852                 }
3853                 const nativeResponseValue = wasm.CResult_TransactionNoneZ_clone(orig);
3854                 return nativeResponseValue;
3855         }
3856         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_clone(const struct LDKC2Tuple_BlockHashChannelMonitorZ *NONNULL_PTR orig);
3857         export function C2Tuple_BlockHashChannelMonitorZ_clone(orig: number): number {
3858                 if(!isWasmInitialized) {
3859                         throw new Error("initializeWasm() must be awaited first!");
3860                 }
3861                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_clone(orig);
3862                 return nativeResponseValue;
3863         }
3864         // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
3865         export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
3866                 if(!isWasmInitialized) {
3867                         throw new Error("initializeWasm() must be awaited first!");
3868                 }
3869                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
3870                 return nativeResponseValue;
3871         }
3872         // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
3873         export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
3874                 if(!isWasmInitialized) {
3875                         throw new Error("initializeWasm() must be awaited first!");
3876                 }
3877                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
3878                 // debug statements here
3879         }
3880         // void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res);
3881         export function CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res: number[]): void {
3882                 if(!isWasmInitialized) {
3883                         throw new Error("initializeWasm() must be awaited first!");
3884                 }
3885                 const nativeResponseValue = wasm.CVec_C2Tuple_BlockHashChannelMonitorZZ_free(_res);
3886                 // debug statements here
3887         }
3888         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o);
3889         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o: number[]): number {
3890                 if(!isWasmInitialized) {
3891                         throw new Error("initializeWasm() must be awaited first!");
3892                 }
3893                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(o);
3894                 return nativeResponseValue;
3895         }
3896         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e);
3897         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e: IOError): number {
3898                 if(!isWasmInitialized) {
3899                         throw new Error("initializeWasm() must be awaited first!");
3900                 }
3901                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(e);
3902                 return nativeResponseValue;
3903         }
3904         // void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res);
3905         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res: number): void {
3906                 if(!isWasmInitialized) {
3907                         throw new Error("initializeWasm() must be awaited first!");
3908                 }
3909                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(_res);
3910                 // debug statements here
3911         }
3912         // struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(const struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ *NONNULL_PTR orig);
3913         export function CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig: number): number {
3914                 if(!isWasmInitialized) {
3915                         throw new Error("initializeWasm() must be awaited first!");
3916                 }
3917                 const nativeResponseValue = wasm.CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_clone(orig);
3918                 return nativeResponseValue;
3919         }
3920         // struct LDKCResult_PaymentIdDecodeErrorZ CResult_PaymentIdDecodeErrorZ_ok(struct LDKPaymentId o);
3921         export function CResult_PaymentIdDecodeErrorZ_ok(o: number): number {
3922                 if(!isWasmInitialized) {
3923                         throw new Error("initializeWasm() must be awaited first!");
3924                 }
3925                 const nativeResponseValue = wasm.CResult_PaymentIdDecodeErrorZ_ok(o);
3926                 return nativeResponseValue;
3927         }
3928         // struct LDKCResult_PaymentIdDecodeErrorZ CResult_PaymentIdDecodeErrorZ_err(struct LDKDecodeError e);
3929         export function CResult_PaymentIdDecodeErrorZ_err(e: number): number {
3930                 if(!isWasmInitialized) {
3931                         throw new Error("initializeWasm() must be awaited first!");
3932                 }
3933                 const nativeResponseValue = wasm.CResult_PaymentIdDecodeErrorZ_err(e);
3934                 return nativeResponseValue;
3935         }
3936         // void CResult_PaymentIdDecodeErrorZ_free(struct LDKCResult_PaymentIdDecodeErrorZ _res);
3937         export function CResult_PaymentIdDecodeErrorZ_free(_res: number): void {
3938                 if(!isWasmInitialized) {
3939                         throw new Error("initializeWasm() must be awaited first!");
3940                 }
3941                 const nativeResponseValue = wasm.CResult_PaymentIdDecodeErrorZ_free(_res);
3942                 // debug statements here
3943         }
3944         // struct LDKCResult_PaymentIdDecodeErrorZ CResult_PaymentIdDecodeErrorZ_clone(const struct LDKCResult_PaymentIdDecodeErrorZ *NONNULL_PTR orig);
3945         export function CResult_PaymentIdDecodeErrorZ_clone(orig: number): number {
3946                 if(!isWasmInitialized) {
3947                         throw new Error("initializeWasm() must be awaited first!");
3948                 }
3949                 const nativeResponseValue = wasm.CResult_PaymentIdDecodeErrorZ_clone(orig);
3950                 return nativeResponseValue;
3951         }
3952         // struct LDKCOption_u16Z COption_u16Z_some(uint16_t o);
3953         export function COption_u16Z_some(o: number): number {
3954                 if(!isWasmInitialized) {
3955                         throw new Error("initializeWasm() must be awaited first!");
3956                 }
3957                 const nativeResponseValue = wasm.COption_u16Z_some(o);
3958                 return nativeResponseValue;
3959         }
3960         // struct LDKCOption_u16Z COption_u16Z_none(void);
3961         export function COption_u16Z_none(): number {
3962                 if(!isWasmInitialized) {
3963                         throw new Error("initializeWasm() must be awaited first!");
3964                 }
3965                 const nativeResponseValue = wasm.COption_u16Z_none();
3966                 return nativeResponseValue;
3967         }
3968         // void COption_u16Z_free(struct LDKCOption_u16Z _res);
3969         export function COption_u16Z_free(_res: number): void {
3970                 if(!isWasmInitialized) {
3971                         throw new Error("initializeWasm() must be awaited first!");
3972                 }
3973                 const nativeResponseValue = wasm.COption_u16Z_free(_res);
3974                 // debug statements here
3975         }
3976         // struct LDKCOption_u16Z COption_u16Z_clone(const struct LDKCOption_u16Z *NONNULL_PTR orig);
3977         export function COption_u16Z_clone(orig: number): number {
3978                 if(!isWasmInitialized) {
3979                         throw new Error("initializeWasm() must be awaited first!");
3980                 }
3981                 const nativeResponseValue = wasm.COption_u16Z_clone(orig);
3982                 return nativeResponseValue;
3983         }
3984         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
3985         export function CResult_NoneAPIErrorZ_ok(): number {
3986                 if(!isWasmInitialized) {
3987                         throw new Error("initializeWasm() must be awaited first!");
3988                 }
3989                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
3990                 return nativeResponseValue;
3991         }
3992         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
3993         export function CResult_NoneAPIErrorZ_err(e: number): number {
3994                 if(!isWasmInitialized) {
3995                         throw new Error("initializeWasm() must be awaited first!");
3996                 }
3997                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
3998                 return nativeResponseValue;
3999         }
4000         // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
4001         export function CResult_NoneAPIErrorZ_free(_res: number): void {
4002                 if(!isWasmInitialized) {
4003                         throw new Error("initializeWasm() must be awaited first!");
4004                 }
4005                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
4006                 // debug statements here
4007         }
4008         // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
4009         export function CResult_NoneAPIErrorZ_clone(orig: number): number {
4010                 if(!isWasmInitialized) {
4011                         throw new Error("initializeWasm() must be awaited first!");
4012                 }
4013                 const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
4014                 return nativeResponseValue;
4015         }
4016         // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
4017         export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
4018                 if(!isWasmInitialized) {
4019                         throw new Error("initializeWasm() must be awaited first!");
4020                 }
4021                 const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
4022                 // debug statements here
4023         }
4024         // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
4025         export function CVec_APIErrorZ_free(_res: number[]): void {
4026                 if(!isWasmInitialized) {
4027                         throw new Error("initializeWasm() must be awaited first!");
4028                 }
4029                 const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
4030                 // debug statements here
4031         }
4032         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_ok(struct LDKThirtyTwoBytes o);
4033         export function CResult__u832APIErrorZ_ok(o: Uint8Array): number {
4034                 if(!isWasmInitialized) {
4035                         throw new Error("initializeWasm() must be awaited first!");
4036                 }
4037                 const nativeResponseValue = wasm.CResult__u832APIErrorZ_ok(encodeArray(o));
4038                 return nativeResponseValue;
4039         }
4040         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_err(struct LDKAPIError e);
4041         export function CResult__u832APIErrorZ_err(e: number): number {
4042                 if(!isWasmInitialized) {
4043                         throw new Error("initializeWasm() must be awaited first!");
4044                 }
4045                 const nativeResponseValue = wasm.CResult__u832APIErrorZ_err(e);
4046                 return nativeResponseValue;
4047         }
4048         // void CResult__u832APIErrorZ_free(struct LDKCResult__u832APIErrorZ _res);
4049         export function CResult__u832APIErrorZ_free(_res: number): void {
4050                 if(!isWasmInitialized) {
4051                         throw new Error("initializeWasm() must be awaited first!");
4052                 }
4053                 const nativeResponseValue = wasm.CResult__u832APIErrorZ_free(_res);
4054                 // debug statements here
4055         }
4056         // struct LDKCResult__u832APIErrorZ CResult__u832APIErrorZ_clone(const struct LDKCResult__u832APIErrorZ *NONNULL_PTR orig);
4057         export function CResult__u832APIErrorZ_clone(orig: number): number {
4058                 if(!isWasmInitialized) {
4059                         throw new Error("initializeWasm() must be awaited first!");
4060                 }
4061                 const nativeResponseValue = wasm.CResult__u832APIErrorZ_clone(orig);
4062                 return nativeResponseValue;
4063         }
4064         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_ok(struct LDKPaymentId o);
4065         export function CResult_PaymentIdPaymentSendFailureZ_ok(o: number): number {
4066                 if(!isWasmInitialized) {
4067                         throw new Error("initializeWasm() must be awaited first!");
4068                 }
4069                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_ok(o);
4070                 return nativeResponseValue;
4071         }
4072         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
4073         export function CResult_PaymentIdPaymentSendFailureZ_err(e: number): number {
4074                 if(!isWasmInitialized) {
4075                         throw new Error("initializeWasm() must be awaited first!");
4076                 }
4077                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_err(e);
4078                 return nativeResponseValue;
4079         }
4080         // void CResult_PaymentIdPaymentSendFailureZ_free(struct LDKCResult_PaymentIdPaymentSendFailureZ _res);
4081         export function CResult_PaymentIdPaymentSendFailureZ_free(_res: number): void {
4082                 if(!isWasmInitialized) {
4083                         throw new Error("initializeWasm() must be awaited first!");
4084                 }
4085                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_free(_res);
4086                 // debug statements here
4087         }
4088         // struct LDKCResult_PaymentIdPaymentSendFailureZ CResult_PaymentIdPaymentSendFailureZ_clone(const struct LDKCResult_PaymentIdPaymentSendFailureZ *NONNULL_PTR orig);
4089         export function CResult_PaymentIdPaymentSendFailureZ_clone(orig: number): number {
4090                 if(!isWasmInitialized) {
4091                         throw new Error("initializeWasm() must be awaited first!");
4092                 }
4093                 const nativeResponseValue = wasm.CResult_PaymentIdPaymentSendFailureZ_clone(orig);
4094                 return nativeResponseValue;
4095         }
4096         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
4097         export function CResult_NonePaymentSendFailureZ_ok(): number {
4098                 if(!isWasmInitialized) {
4099                         throw new Error("initializeWasm() must be awaited first!");
4100                 }
4101                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
4102                 return nativeResponseValue;
4103         }
4104         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
4105         export function CResult_NonePaymentSendFailureZ_err(e: number): number {
4106                 if(!isWasmInitialized) {
4107                         throw new Error("initializeWasm() must be awaited first!");
4108                 }
4109                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
4110                 return nativeResponseValue;
4111         }
4112         // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
4113         export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
4114                 if(!isWasmInitialized) {
4115                         throw new Error("initializeWasm() must be awaited first!");
4116                 }
4117                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
4118                 // debug statements here
4119         }
4120         // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
4121         export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
4122                 if(!isWasmInitialized) {
4123                         throw new Error("initializeWasm() must be awaited first!");
4124                 }
4125                 const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
4126                 return nativeResponseValue;
4127         }
4128         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_clone(const struct LDKC2Tuple_PaymentHashPaymentIdZ *NONNULL_PTR orig);
4129         export function C2Tuple_PaymentHashPaymentIdZ_clone(orig: number): number {
4130                 if(!isWasmInitialized) {
4131                         throw new Error("initializeWasm() must be awaited first!");
4132                 }
4133                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_clone(orig);
4134                 return nativeResponseValue;
4135         }
4136         // struct LDKC2Tuple_PaymentHashPaymentIdZ C2Tuple_PaymentHashPaymentIdZ_new(struct LDKThirtyTwoBytes a, struct LDKPaymentId b);
4137         export function C2Tuple_PaymentHashPaymentIdZ_new(a: Uint8Array, b: number): number {
4138                 if(!isWasmInitialized) {
4139                         throw new Error("initializeWasm() must be awaited first!");
4140                 }
4141                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_new(encodeArray(a), b);
4142                 return nativeResponseValue;
4143         }
4144         // void C2Tuple_PaymentHashPaymentIdZ_free(struct LDKC2Tuple_PaymentHashPaymentIdZ _res);
4145         export function C2Tuple_PaymentHashPaymentIdZ_free(_res: number): void {
4146                 if(!isWasmInitialized) {
4147                         throw new Error("initializeWasm() must be awaited first!");
4148                 }
4149                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentIdZ_free(_res);
4150                 // debug statements here
4151         }
4152         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(struct LDKC2Tuple_PaymentHashPaymentIdZ o);
4153         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(o: number): number {
4154                 if(!isWasmInitialized) {
4155                         throw new Error("initializeWasm() must be awaited first!");
4156                 }
4157                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_ok(o);
4158                 return nativeResponseValue;
4159         }
4160         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
4161         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(e: number): number {
4162                 if(!isWasmInitialized) {
4163                         throw new Error("initializeWasm() must be awaited first!");
4164                 }
4165                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_err(e);
4166                 return nativeResponseValue;
4167         }
4168         // void CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ _res);
4169         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(_res: number): void {
4170                 if(!isWasmInitialized) {
4171                         throw new Error("initializeWasm() must be awaited first!");
4172                 }
4173                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_free(_res);
4174                 // debug statements here
4175         }
4176         // struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(const struct LDKCResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ *NONNULL_PTR orig);
4177         export function CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig: number): number {
4178                 if(!isWasmInitialized) {
4179                         throw new Error("initializeWasm() must be awaited first!");
4180                 }
4181                 const nativeResponseValue = wasm.CResult_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ_clone(orig);
4182                 return nativeResponseValue;
4183         }
4184         // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
4185         export function CVec_NetAddressZ_free(_res: number[]): void {
4186                 if(!isWasmInitialized) {
4187                         throw new Error("initializeWasm() must be awaited first!");
4188                 }
4189                 const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
4190                 // debug statements here
4191         }
4192         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig);
4193         export function C2Tuple_PaymentHashPaymentSecretZ_clone(orig: number): number {
4194                 if(!isWasmInitialized) {
4195                         throw new Error("initializeWasm() must be awaited first!");
4196                 }
4197                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_clone(orig);
4198                 return nativeResponseValue;
4199         }
4200         // struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b);
4201         export function C2Tuple_PaymentHashPaymentSecretZ_new(a: Uint8Array, b: Uint8Array): number {
4202                 if(!isWasmInitialized) {
4203                         throw new Error("initializeWasm() must be awaited first!");
4204                 }
4205                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_new(encodeArray(a), encodeArray(b));
4206                 return nativeResponseValue;
4207         }
4208         // void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res);
4209         export function C2Tuple_PaymentHashPaymentSecretZ_free(_res: number): void {
4210                 if(!isWasmInitialized) {
4211                         throw new Error("initializeWasm() must be awaited first!");
4212                 }
4213                 const nativeResponseValue = wasm.C2Tuple_PaymentHashPaymentSecretZ_free(_res);
4214                 // debug statements here
4215         }
4216         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o);
4217         export function CResult_PaymentSecretAPIErrorZ_ok(o: Uint8Array): number {
4218                 if(!isWasmInitialized) {
4219                         throw new Error("initializeWasm() must be awaited first!");
4220                 }
4221                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_ok(encodeArray(o));
4222                 return nativeResponseValue;
4223         }
4224         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e);
4225         export function CResult_PaymentSecretAPIErrorZ_err(e: number): number {
4226                 if(!isWasmInitialized) {
4227                         throw new Error("initializeWasm() must be awaited first!");
4228                 }
4229                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_err(e);
4230                 return nativeResponseValue;
4231         }
4232         // void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res);
4233         export function CResult_PaymentSecretAPIErrorZ_free(_res: number): void {
4234                 if(!isWasmInitialized) {
4235                         throw new Error("initializeWasm() must be awaited first!");
4236                 }
4237                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_free(_res);
4238                 // debug statements here
4239         }
4240         // struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig);
4241         export function CResult_PaymentSecretAPIErrorZ_clone(orig: number): number {
4242                 if(!isWasmInitialized) {
4243                         throw new Error("initializeWasm() must be awaited first!");
4244                 }
4245                 const nativeResponseValue = wasm.CResult_PaymentSecretAPIErrorZ_clone(orig);
4246                 return nativeResponseValue;
4247         }
4248         // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
4249         export function CVec_ChannelMonitorZ_free(_res: number[]): void {
4250                 if(!isWasmInitialized) {
4251                         throw new Error("initializeWasm() must be awaited first!");
4252                 }
4253                 const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
4254                 // debug statements here
4255         }
4256         // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
4257         export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
4258                 if(!isWasmInitialized) {
4259                         throw new Error("initializeWasm() must be awaited first!");
4260                 }
4261                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
4262                 return nativeResponseValue;
4263         }
4264         // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
4265         export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
4266                 if(!isWasmInitialized) {
4267                         throw new Error("initializeWasm() must be awaited first!");
4268                 }
4269                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
4270                 // debug statements here
4271         }
4272         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
4273         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
4274                 if(!isWasmInitialized) {
4275                         throw new Error("initializeWasm() must be awaited first!");
4276                 }
4277                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
4278                 return nativeResponseValue;
4279         }
4280         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
4281         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
4282                 if(!isWasmInitialized) {
4283                         throw new Error("initializeWasm() must be awaited first!");
4284                 }
4285                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
4286                 return nativeResponseValue;
4287         }
4288         // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
4289         export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
4290                 if(!isWasmInitialized) {
4291                         throw new Error("initializeWasm() must be awaited first!");
4292                 }
4293                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
4294                 // debug statements here
4295         }
4296         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
4297         export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
4298                 if(!isWasmInitialized) {
4299                         throw new Error("initializeWasm() must be awaited first!");
4300                 }
4301                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
4302                 return nativeResponseValue;
4303         }
4304         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
4305         export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
4306                 if(!isWasmInitialized) {
4307                         throw new Error("initializeWasm() must be awaited first!");
4308                 }
4309                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
4310                 return nativeResponseValue;
4311         }
4312         // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
4313         export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
4314                 if(!isWasmInitialized) {
4315                         throw new Error("initializeWasm() must be awaited first!");
4316                 }
4317                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
4318                 // debug statements here
4319         }
4320         // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
4321         export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
4322                 if(!isWasmInitialized) {
4323                         throw new Error("initializeWasm() must be awaited first!");
4324                 }
4325                 const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
4326                 return nativeResponseValue;
4327         }
4328         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
4329         export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
4330                 if(!isWasmInitialized) {
4331                         throw new Error("initializeWasm() must be awaited first!");
4332                 }
4333                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
4334                 return nativeResponseValue;
4335         }
4336         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
4337         export function CResult_OutPointDecodeErrorZ_err(e: number): number {
4338                 if(!isWasmInitialized) {
4339                         throw new Error("initializeWasm() must be awaited first!");
4340                 }
4341                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
4342                 return nativeResponseValue;
4343         }
4344         // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
4345         export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
4346                 if(!isWasmInitialized) {
4347                         throw new Error("initializeWasm() must be awaited first!");
4348                 }
4349                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
4350                 // debug statements here
4351         }
4352         // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
4353         export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
4354                 if(!isWasmInitialized) {
4355                         throw new Error("initializeWasm() must be awaited first!");
4356                 }
4357                 const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
4358                 return nativeResponseValue;
4359         }
4360         // struct LDKCOption_TypeZ COption_TypeZ_some(struct LDKType o);
4361         export function COption_TypeZ_some(o: number): number {
4362                 if(!isWasmInitialized) {
4363                         throw new Error("initializeWasm() must be awaited first!");
4364                 }
4365                 const nativeResponseValue = wasm.COption_TypeZ_some(o);
4366                 return nativeResponseValue;
4367         }
4368         // struct LDKCOption_TypeZ COption_TypeZ_none(void);
4369         export function COption_TypeZ_none(): number {
4370                 if(!isWasmInitialized) {
4371                         throw new Error("initializeWasm() must be awaited first!");
4372                 }
4373                 const nativeResponseValue = wasm.COption_TypeZ_none();
4374                 return nativeResponseValue;
4375         }
4376         // void COption_TypeZ_free(struct LDKCOption_TypeZ _res);
4377         export function COption_TypeZ_free(_res: number): void {
4378                 if(!isWasmInitialized) {
4379                         throw new Error("initializeWasm() must be awaited first!");
4380                 }
4381                 const nativeResponseValue = wasm.COption_TypeZ_free(_res);
4382                 // debug statements here
4383         }
4384         // struct LDKCOption_TypeZ COption_TypeZ_clone(const struct LDKCOption_TypeZ *NONNULL_PTR orig);
4385         export function COption_TypeZ_clone(orig: number): number {
4386                 if(!isWasmInitialized) {
4387                         throw new Error("initializeWasm() must be awaited first!");
4388                 }
4389                 const nativeResponseValue = wasm.COption_TypeZ_clone(orig);
4390                 return nativeResponseValue;
4391         }
4392         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_ok(struct LDKCOption_TypeZ o);
4393         export function CResult_COption_TypeZDecodeErrorZ_ok(o: number): number {
4394                 if(!isWasmInitialized) {
4395                         throw new Error("initializeWasm() must be awaited first!");
4396                 }
4397                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_ok(o);
4398                 return nativeResponseValue;
4399         }
4400         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_err(struct LDKDecodeError e);
4401         export function CResult_COption_TypeZDecodeErrorZ_err(e: number): number {
4402                 if(!isWasmInitialized) {
4403                         throw new Error("initializeWasm() must be awaited first!");
4404                 }
4405                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_err(e);
4406                 return nativeResponseValue;
4407         }
4408         // void CResult_COption_TypeZDecodeErrorZ_free(struct LDKCResult_COption_TypeZDecodeErrorZ _res);
4409         export function CResult_COption_TypeZDecodeErrorZ_free(_res: number): void {
4410                 if(!isWasmInitialized) {
4411                         throw new Error("initializeWasm() must be awaited first!");
4412                 }
4413                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_free(_res);
4414                 // debug statements here
4415         }
4416         // struct LDKCResult_COption_TypeZDecodeErrorZ CResult_COption_TypeZDecodeErrorZ_clone(const struct LDKCResult_COption_TypeZDecodeErrorZ *NONNULL_PTR orig);
4417         export function CResult_COption_TypeZDecodeErrorZ_clone(orig: number): number {
4418                 if(!isWasmInitialized) {
4419                         throw new Error("initializeWasm() must be awaited first!");
4420                 }
4421                 const nativeResponseValue = wasm.CResult_COption_TypeZDecodeErrorZ_clone(orig);
4422                 return nativeResponseValue;
4423         }
4424         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o);
4425         export function CResult_SiPrefixNoneZ_ok(o: SiPrefix): number {
4426                 if(!isWasmInitialized) {
4427                         throw new Error("initializeWasm() must be awaited first!");
4428                 }
4429                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_ok(o);
4430                 return nativeResponseValue;
4431         }
4432         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void);
4433         export function CResult_SiPrefixNoneZ_err(): number {
4434                 if(!isWasmInitialized) {
4435                         throw new Error("initializeWasm() must be awaited first!");
4436                 }
4437                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_err();
4438                 return nativeResponseValue;
4439         }
4440         // void CResult_SiPrefixNoneZ_free(struct LDKCResult_SiPrefixNoneZ _res);
4441         export function CResult_SiPrefixNoneZ_free(_res: number): void {
4442                 if(!isWasmInitialized) {
4443                         throw new Error("initializeWasm() must be awaited first!");
4444                 }
4445                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_free(_res);
4446                 // debug statements here
4447         }
4448         // struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_clone(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR orig);
4449         export function CResult_SiPrefixNoneZ_clone(orig: number): number {
4450                 if(!isWasmInitialized) {
4451                         throw new Error("initializeWasm() must be awaited first!");
4452                 }
4453                 const nativeResponseValue = wasm.CResult_SiPrefixNoneZ_clone(orig);
4454                 return nativeResponseValue;
4455         }
4456         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_ok(struct LDKInvoice o);
4457         export function CResult_InvoiceNoneZ_ok(o: number): number {
4458                 if(!isWasmInitialized) {
4459                         throw new Error("initializeWasm() must be awaited first!");
4460                 }
4461                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_ok(o);
4462                 return nativeResponseValue;
4463         }
4464         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_err(void);
4465         export function CResult_InvoiceNoneZ_err(): number {
4466                 if(!isWasmInitialized) {
4467                         throw new Error("initializeWasm() must be awaited first!");
4468                 }
4469                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_err();
4470                 return nativeResponseValue;
4471         }
4472         // void CResult_InvoiceNoneZ_free(struct LDKCResult_InvoiceNoneZ _res);
4473         export function CResult_InvoiceNoneZ_free(_res: number): void {
4474                 if(!isWasmInitialized) {
4475                         throw new Error("initializeWasm() must be awaited first!");
4476                 }
4477                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_free(_res);
4478                 // debug statements here
4479         }
4480         // struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_clone(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR orig);
4481         export function CResult_InvoiceNoneZ_clone(orig: number): number {
4482                 if(!isWasmInitialized) {
4483                         throw new Error("initializeWasm() must be awaited first!");
4484                 }
4485                 const nativeResponseValue = wasm.CResult_InvoiceNoneZ_clone(orig);
4486                 return nativeResponseValue;
4487         }
4488         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_ok(struct LDKSignedRawInvoice o);
4489         export function CResult_SignedRawInvoiceNoneZ_ok(o: number): number {
4490                 if(!isWasmInitialized) {
4491                         throw new Error("initializeWasm() must be awaited first!");
4492                 }
4493                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_ok(o);
4494                 return nativeResponseValue;
4495         }
4496         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_err(void);
4497         export function CResult_SignedRawInvoiceNoneZ_err(): number {
4498                 if(!isWasmInitialized) {
4499                         throw new Error("initializeWasm() must be awaited first!");
4500                 }
4501                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_err();
4502                 return nativeResponseValue;
4503         }
4504         // void CResult_SignedRawInvoiceNoneZ_free(struct LDKCResult_SignedRawInvoiceNoneZ _res);
4505         export function CResult_SignedRawInvoiceNoneZ_free(_res: number): void {
4506                 if(!isWasmInitialized) {
4507                         throw new Error("initializeWasm() must be awaited first!");
4508                 }
4509                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_free(_res);
4510                 // debug statements here
4511         }
4512         // struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_clone(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR orig);
4513         export function CResult_SignedRawInvoiceNoneZ_clone(orig: number): number {
4514                 if(!isWasmInitialized) {
4515                         throw new Error("initializeWasm() must be awaited first!");
4516                 }
4517                 const nativeResponseValue = wasm.CResult_SignedRawInvoiceNoneZ_clone(orig);
4518                 return nativeResponseValue;
4519         }
4520         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(const struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR orig);
4521         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig: number): number {
4522                 if(!isWasmInitialized) {
4523                         throw new Error("initializeWasm() must be awaited first!");
4524                 }
4525                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(orig);
4526                 return nativeResponseValue;
4527         }
4528         // struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(struct LDKRawInvoice a, struct LDKThirtyTwoBytes b, struct LDKInvoiceSignature c);
4529         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a: number, b: Uint8Array, c: number): number {
4530                 if(!isWasmInitialized) {
4531                         throw new Error("initializeWasm() must be awaited first!");
4532                 }
4533                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a, encodeArray(b), c);
4534                 return nativeResponseValue;
4535         }
4536         // void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ _res);
4537         export function C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res: number): void {
4538                 if(!isWasmInitialized) {
4539                         throw new Error("initializeWasm() must be awaited first!");
4540                 }
4541                 const nativeResponseValue = wasm.C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(_res);
4542                 // debug statements here
4543         }
4544         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o);
4545         export function CResult_PayeePubKeyErrorZ_ok(o: number): number {
4546                 if(!isWasmInitialized) {
4547                         throw new Error("initializeWasm() must be awaited first!");
4548                 }
4549                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_ok(o);
4550                 return nativeResponseValue;
4551         }
4552         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e);
4553         export function CResult_PayeePubKeyErrorZ_err(e: Secp256k1Error): number {
4554                 if(!isWasmInitialized) {
4555                         throw new Error("initializeWasm() must be awaited first!");
4556                 }
4557                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_err(e);
4558                 return nativeResponseValue;
4559         }
4560         // void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res);
4561         export function CResult_PayeePubKeyErrorZ_free(_res: number): void {
4562                 if(!isWasmInitialized) {
4563                         throw new Error("initializeWasm() must be awaited first!");
4564                 }
4565                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_free(_res);
4566                 // debug statements here
4567         }
4568         // struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_clone(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR orig);
4569         export function CResult_PayeePubKeyErrorZ_clone(orig: number): number {
4570                 if(!isWasmInitialized) {
4571                         throw new Error("initializeWasm() must be awaited first!");
4572                 }
4573                 const nativeResponseValue = wasm.CResult_PayeePubKeyErrorZ_clone(orig);
4574                 return nativeResponseValue;
4575         }
4576         // void CVec_PrivateRouteZ_free(struct LDKCVec_PrivateRouteZ _res);
4577         export function CVec_PrivateRouteZ_free(_res: number[]): void {
4578                 if(!isWasmInitialized) {
4579                         throw new Error("initializeWasm() must be awaited first!");
4580                 }
4581                 const nativeResponseValue = wasm.CVec_PrivateRouteZ_free(_res);
4582                 // debug statements here
4583         }
4584         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_ok(struct LDKPositiveTimestamp o);
4585         export function CResult_PositiveTimestampCreationErrorZ_ok(o: number): number {
4586                 if(!isWasmInitialized) {
4587                         throw new Error("initializeWasm() must be awaited first!");
4588                 }
4589                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_ok(o);
4590                 return nativeResponseValue;
4591         }
4592         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_err(enum LDKCreationError e);
4593         export function CResult_PositiveTimestampCreationErrorZ_err(e: CreationError): number {
4594                 if(!isWasmInitialized) {
4595                         throw new Error("initializeWasm() must be awaited first!");
4596                 }
4597                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_err(e);
4598                 return nativeResponseValue;
4599         }
4600         // void CResult_PositiveTimestampCreationErrorZ_free(struct LDKCResult_PositiveTimestampCreationErrorZ _res);
4601         export function CResult_PositiveTimestampCreationErrorZ_free(_res: number): void {
4602                 if(!isWasmInitialized) {
4603                         throw new Error("initializeWasm() must be awaited first!");
4604                 }
4605                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_free(_res);
4606                 // debug statements here
4607         }
4608         // struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_clone(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR orig);
4609         export function CResult_PositiveTimestampCreationErrorZ_clone(orig: number): number {
4610                 if(!isWasmInitialized) {
4611                         throw new Error("initializeWasm() must be awaited first!");
4612                 }
4613                 const nativeResponseValue = wasm.CResult_PositiveTimestampCreationErrorZ_clone(orig);
4614                 return nativeResponseValue;
4615         }
4616         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_ok(void);
4617         export function CResult_NoneSemanticErrorZ_ok(): number {
4618                 if(!isWasmInitialized) {
4619                         throw new Error("initializeWasm() must be awaited first!");
4620                 }
4621                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_ok();
4622                 return nativeResponseValue;
4623         }
4624         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_err(enum LDKSemanticError e);
4625         export function CResult_NoneSemanticErrorZ_err(e: SemanticError): number {
4626                 if(!isWasmInitialized) {
4627                         throw new Error("initializeWasm() must be awaited first!");
4628                 }
4629                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_err(e);
4630                 return nativeResponseValue;
4631         }
4632         // void CResult_NoneSemanticErrorZ_free(struct LDKCResult_NoneSemanticErrorZ _res);
4633         export function CResult_NoneSemanticErrorZ_free(_res: number): void {
4634                 if(!isWasmInitialized) {
4635                         throw new Error("initializeWasm() must be awaited first!");
4636                 }
4637                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_free(_res);
4638                 // debug statements here
4639         }
4640         // struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_clone(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR orig);
4641         export function CResult_NoneSemanticErrorZ_clone(orig: number): number {
4642                 if(!isWasmInitialized) {
4643                         throw new Error("initializeWasm() must be awaited first!");
4644                 }
4645                 const nativeResponseValue = wasm.CResult_NoneSemanticErrorZ_clone(orig);
4646                 return nativeResponseValue;
4647         }
4648         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_ok(struct LDKInvoice o);
4649         export function CResult_InvoiceSemanticErrorZ_ok(o: number): number {
4650                 if(!isWasmInitialized) {
4651                         throw new Error("initializeWasm() must be awaited first!");
4652                 }
4653                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_ok(o);
4654                 return nativeResponseValue;
4655         }
4656         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_err(enum LDKSemanticError e);
4657         export function CResult_InvoiceSemanticErrorZ_err(e: SemanticError): number {
4658                 if(!isWasmInitialized) {
4659                         throw new Error("initializeWasm() must be awaited first!");
4660                 }
4661                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_err(e);
4662                 return nativeResponseValue;
4663         }
4664         // void CResult_InvoiceSemanticErrorZ_free(struct LDKCResult_InvoiceSemanticErrorZ _res);
4665         export function CResult_InvoiceSemanticErrorZ_free(_res: number): void {
4666                 if(!isWasmInitialized) {
4667                         throw new Error("initializeWasm() must be awaited first!");
4668                 }
4669                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_free(_res);
4670                 // debug statements here
4671         }
4672         // struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_clone(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR orig);
4673         export function CResult_InvoiceSemanticErrorZ_clone(orig: number): number {
4674                 if(!isWasmInitialized) {
4675                         throw new Error("initializeWasm() must be awaited first!");
4676                 }
4677                 const nativeResponseValue = wasm.CResult_InvoiceSemanticErrorZ_clone(orig);
4678                 return nativeResponseValue;
4679         }
4680         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_ok(struct LDKDescription o);
4681         export function CResult_DescriptionCreationErrorZ_ok(o: number): number {
4682                 if(!isWasmInitialized) {
4683                         throw new Error("initializeWasm() must be awaited first!");
4684                 }
4685                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_ok(o);
4686                 return nativeResponseValue;
4687         }
4688         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_err(enum LDKCreationError e);
4689         export function CResult_DescriptionCreationErrorZ_err(e: CreationError): number {
4690                 if(!isWasmInitialized) {
4691                         throw new Error("initializeWasm() must be awaited first!");
4692                 }
4693                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_err(e);
4694                 return nativeResponseValue;
4695         }
4696         // void CResult_DescriptionCreationErrorZ_free(struct LDKCResult_DescriptionCreationErrorZ _res);
4697         export function CResult_DescriptionCreationErrorZ_free(_res: number): void {
4698                 if(!isWasmInitialized) {
4699                         throw new Error("initializeWasm() must be awaited first!");
4700                 }
4701                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_free(_res);
4702                 // debug statements here
4703         }
4704         // struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_clone(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR orig);
4705         export function CResult_DescriptionCreationErrorZ_clone(orig: number): number {
4706                 if(!isWasmInitialized) {
4707                         throw new Error("initializeWasm() must be awaited first!");
4708                 }
4709                 const nativeResponseValue = wasm.CResult_DescriptionCreationErrorZ_clone(orig);
4710                 return nativeResponseValue;
4711         }
4712         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_ok(struct LDKExpiryTime o);
4713         export function CResult_ExpiryTimeCreationErrorZ_ok(o: number): number {
4714                 if(!isWasmInitialized) {
4715                         throw new Error("initializeWasm() must be awaited first!");
4716                 }
4717                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_ok(o);
4718                 return nativeResponseValue;
4719         }
4720         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_err(enum LDKCreationError e);
4721         export function CResult_ExpiryTimeCreationErrorZ_err(e: CreationError): number {
4722                 if(!isWasmInitialized) {
4723                         throw new Error("initializeWasm() must be awaited first!");
4724                 }
4725                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_err(e);
4726                 return nativeResponseValue;
4727         }
4728         // void CResult_ExpiryTimeCreationErrorZ_free(struct LDKCResult_ExpiryTimeCreationErrorZ _res);
4729         export function CResult_ExpiryTimeCreationErrorZ_free(_res: number): void {
4730                 if(!isWasmInitialized) {
4731                         throw new Error("initializeWasm() must be awaited first!");
4732                 }
4733                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_free(_res);
4734                 // debug statements here
4735         }
4736         // struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_clone(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR orig);
4737         export function CResult_ExpiryTimeCreationErrorZ_clone(orig: number): number {
4738                 if(!isWasmInitialized) {
4739                         throw new Error("initializeWasm() must be awaited first!");
4740                 }
4741                 const nativeResponseValue = wasm.CResult_ExpiryTimeCreationErrorZ_clone(orig);
4742                 return nativeResponseValue;
4743         }
4744         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_ok(struct LDKPrivateRoute o);
4745         export function CResult_PrivateRouteCreationErrorZ_ok(o: number): number {
4746                 if(!isWasmInitialized) {
4747                         throw new Error("initializeWasm() must be awaited first!");
4748                 }
4749                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_ok(o);
4750                 return nativeResponseValue;
4751         }
4752         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_err(enum LDKCreationError e);
4753         export function CResult_PrivateRouteCreationErrorZ_err(e: CreationError): number {
4754                 if(!isWasmInitialized) {
4755                         throw new Error("initializeWasm() must be awaited first!");
4756                 }
4757                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_err(e);
4758                 return nativeResponseValue;
4759         }
4760         // void CResult_PrivateRouteCreationErrorZ_free(struct LDKCResult_PrivateRouteCreationErrorZ _res);
4761         export function CResult_PrivateRouteCreationErrorZ_free(_res: number): void {
4762                 if(!isWasmInitialized) {
4763                         throw new Error("initializeWasm() must be awaited first!");
4764                 }
4765                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_free(_res);
4766                 // debug statements here
4767         }
4768         // struct LDKCResult_PrivateRouteCreationErrorZ CResult_PrivateRouteCreationErrorZ_clone(const struct LDKCResult_PrivateRouteCreationErrorZ *NONNULL_PTR orig);
4769         export function CResult_PrivateRouteCreationErrorZ_clone(orig: number): number {
4770                 if(!isWasmInitialized) {
4771                         throw new Error("initializeWasm() must be awaited first!");
4772                 }
4773                 const nativeResponseValue = wasm.CResult_PrivateRouteCreationErrorZ_clone(orig);
4774                 return nativeResponseValue;
4775         }
4776         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o);
4777         export function CResult_StringErrorZ_ok(o: String): number {
4778                 if(!isWasmInitialized) {
4779                         throw new Error("initializeWasm() must be awaited first!");
4780                 }
4781                 const nativeResponseValue = wasm.CResult_StringErrorZ_ok(o);
4782                 return nativeResponseValue;
4783         }
4784         // struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e);
4785         export function CResult_StringErrorZ_err(e: Secp256k1Error): number {
4786                 if(!isWasmInitialized) {
4787                         throw new Error("initializeWasm() must be awaited first!");
4788                 }
4789                 const nativeResponseValue = wasm.CResult_StringErrorZ_err(e);
4790                 return nativeResponseValue;
4791         }
4792         // void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res);
4793         export function CResult_StringErrorZ_free(_res: number): void {
4794                 if(!isWasmInitialized) {
4795                         throw new Error("initializeWasm() must be awaited first!");
4796                 }
4797                 const nativeResponseValue = wasm.CResult_StringErrorZ_free(_res);
4798                 // debug statements here
4799         }
4800         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
4801         export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
4802                 if(!isWasmInitialized) {
4803                         throw new Error("initializeWasm() must be awaited first!");
4804                 }
4805                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
4806                 return nativeResponseValue;
4807         }
4808         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4809         export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
4810                 if(!isWasmInitialized) {
4811                         throw new Error("initializeWasm() must be awaited first!");
4812                 }
4813                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
4814                 return nativeResponseValue;
4815         }
4816         // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
4817         export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
4818                 if(!isWasmInitialized) {
4819                         throw new Error("initializeWasm() must be awaited first!");
4820                 }
4821                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
4822                 // debug statements here
4823         }
4824         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
4825         export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
4826                 if(!isWasmInitialized) {
4827                         throw new Error("initializeWasm() must be awaited first!");
4828                 }
4829                 const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
4830                 return nativeResponseValue;
4831         }
4832         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
4833         export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
4834                 if(!isWasmInitialized) {
4835                         throw new Error("initializeWasm() must be awaited first!");
4836                 }
4837                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
4838                 return nativeResponseValue;
4839         }
4840         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
4841         export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
4842                 if(!isWasmInitialized) {
4843                         throw new Error("initializeWasm() must be awaited first!");
4844                 }
4845                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
4846                 return nativeResponseValue;
4847         }
4848         // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
4849         export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
4850                 if(!isWasmInitialized) {
4851                         throw new Error("initializeWasm() must be awaited first!");
4852                 }
4853                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
4854                 // debug statements here
4855         }
4856         // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
4857         export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
4858                 if(!isWasmInitialized) {
4859                         throw new Error("initializeWasm() must be awaited first!");
4860                 }
4861                 const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
4862                 return nativeResponseValue;
4863         }
4864         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
4865         export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
4866                 if(!isWasmInitialized) {
4867                         throw new Error("initializeWasm() must be awaited first!");
4868                 }
4869                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
4870                 return nativeResponseValue;
4871         }
4872         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
4873         export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
4874                 if(!isWasmInitialized) {
4875                         throw new Error("initializeWasm() must be awaited first!");
4876                 }
4877                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
4878                 return nativeResponseValue;
4879         }
4880         // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
4881         export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
4882                 if(!isWasmInitialized) {
4883                         throw new Error("initializeWasm() must be awaited first!");
4884                 }
4885                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
4886                 // debug statements here
4887         }
4888         // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
4889         export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
4890                 if(!isWasmInitialized) {
4891                         throw new Error("initializeWasm() must be awaited first!");
4892                 }
4893                 const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
4894                 return nativeResponseValue;
4895         }
4896         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
4897         export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
4898                 if(!isWasmInitialized) {
4899                         throw new Error("initializeWasm() must be awaited first!");
4900                 }
4901                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
4902                 return nativeResponseValue;
4903         }
4904         // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
4905         export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
4906                 if(!isWasmInitialized) {
4907                         throw new Error("initializeWasm() must be awaited first!");
4908                 }
4909                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
4910                 return nativeResponseValue;
4911         }
4912         // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
4913         export function C2Tuple_OutPointScriptZ_free(_res: number): void {
4914                 if(!isWasmInitialized) {
4915                         throw new Error("initializeWasm() must be awaited first!");
4916                 }
4917                 const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
4918                 // debug statements here
4919         }
4920         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig);
4921         export function C2Tuple_u32ScriptZ_clone(orig: number): number {
4922                 if(!isWasmInitialized) {
4923                         throw new Error("initializeWasm() must be awaited first!");
4924                 }
4925                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_clone(orig);
4926                 return nativeResponseValue;
4927         }
4928         // struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b);
4929         export function C2Tuple_u32ScriptZ_new(a: number, b: Uint8Array): number {
4930                 if(!isWasmInitialized) {
4931                         throw new Error("initializeWasm() must be awaited first!");
4932                 }
4933                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_new(a, encodeArray(b));
4934                 return nativeResponseValue;
4935         }
4936         // void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res);
4937         export function C2Tuple_u32ScriptZ_free(_res: number): void {
4938                 if(!isWasmInitialized) {
4939                         throw new Error("initializeWasm() must be awaited first!");
4940                 }
4941                 const nativeResponseValue = wasm.C2Tuple_u32ScriptZ_free(_res);
4942                 // debug statements here
4943         }
4944         // void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res);
4945         export function CVec_C2Tuple_u32ScriptZZ_free(_res: number[]): void {
4946                 if(!isWasmInitialized) {
4947                         throw new Error("initializeWasm() must be awaited first!");
4948                 }
4949                 const nativeResponseValue = wasm.CVec_C2Tuple_u32ScriptZZ_free(_res);
4950                 // debug statements here
4951         }
4952         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR orig);
4953         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig: number): number {
4954                 if(!isWasmInitialized) {
4955                         throw new Error("initializeWasm() must be awaited first!");
4956                 }
4957                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(orig);
4958                 return nativeResponseValue;
4959         }
4960         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b);
4961         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(a: Uint8Array, b: number[]): number {
4962                 if(!isWasmInitialized) {
4963                         throw new Error("initializeWasm() must be awaited first!");
4964                 }
4965                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(encodeArray(a), b);
4966                 return nativeResponseValue;
4967         }
4968         // void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res);
4969         export function C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res: number): void {
4970                 if(!isWasmInitialized) {
4971                         throw new Error("initializeWasm() must be awaited first!");
4972                 }
4973                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(_res);
4974                 // debug statements here
4975         }
4976         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res);
4977         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res: number[]): void {
4978                 if(!isWasmInitialized) {
4979                         throw new Error("initializeWasm() must be awaited first!");
4980                 }
4981                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(_res);
4982                 // debug statements here
4983         }
4984         // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
4985         export function CVec_EventZ_free(_res: number[]): void {
4986                 if(!isWasmInitialized) {
4987                         throw new Error("initializeWasm() must be awaited first!");
4988                 }
4989                 const nativeResponseValue = wasm.CVec_EventZ_free(_res);
4990                 // debug statements here
4991         }
4992         // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
4993         export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
4994                 if(!isWasmInitialized) {
4995                         throw new Error("initializeWasm() must be awaited first!");
4996                 }
4997                 const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
4998                 // debug statements here
4999         }
5000         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
5001         export function C2Tuple_u32TxOutZ_clone(orig: number): number {
5002                 if(!isWasmInitialized) {
5003                         throw new Error("initializeWasm() must be awaited first!");
5004                 }
5005                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
5006                 return nativeResponseValue;
5007         }
5008         // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
5009         export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
5010                 if(!isWasmInitialized) {
5011                         throw new Error("initializeWasm() must be awaited first!");
5012                 }
5013                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
5014                 return nativeResponseValue;
5015         }
5016         // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
5017         export function C2Tuple_u32TxOutZ_free(_res: number): void {
5018                 if(!isWasmInitialized) {
5019                         throw new Error("initializeWasm() must be awaited first!");
5020                 }
5021                 const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
5022                 // debug statements here
5023         }
5024         // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
5025         export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
5026                 if(!isWasmInitialized) {
5027                         throw new Error("initializeWasm() must be awaited first!");
5028                 }
5029                 const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
5030                 // debug statements here
5031         }
5032         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig);
5033         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig: number): number {
5034                 if(!isWasmInitialized) {
5035                         throw new Error("initializeWasm() must be awaited first!");
5036                 }
5037                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(orig);
5038                 return nativeResponseValue;
5039         }
5040         // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
5041         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
5042                 if(!isWasmInitialized) {
5043                         throw new Error("initializeWasm() must be awaited first!");
5044                 }
5045                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
5046                 return nativeResponseValue;
5047         }
5048         // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
5049         export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
5050                 if(!isWasmInitialized) {
5051                         throw new Error("initializeWasm() must be awaited first!");
5052                 }
5053                 const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
5054                 // debug statements here
5055         }
5056         // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
5057         export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
5058                 if(!isWasmInitialized) {
5059                         throw new Error("initializeWasm() must be awaited first!");
5060                 }
5061                 const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
5062                 // debug statements here
5063         }
5064         // void CVec_BalanceZ_free(struct LDKCVec_BalanceZ _res);
5065         export function CVec_BalanceZ_free(_res: number[]): void {
5066                 if(!isWasmInitialized) {
5067                         throw new Error("initializeWasm() must be awaited first!");
5068                 }
5069                 const nativeResponseValue = wasm.CVec_BalanceZ_free(_res);
5070                 // debug statements here
5071         }
5072         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
5073         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
5074                 if(!isWasmInitialized) {
5075                         throw new Error("initializeWasm() must be awaited first!");
5076                 }
5077                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
5078                 return nativeResponseValue;
5079         }
5080         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
5081         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
5082                 if(!isWasmInitialized) {
5083                         throw new Error("initializeWasm() must be awaited first!");
5084                 }
5085                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
5086                 return nativeResponseValue;
5087         }
5088         // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
5089         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
5090                 if(!isWasmInitialized) {
5091                         throw new Error("initializeWasm() must be awaited first!");
5092                 }
5093                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
5094                 // debug statements here
5095         }
5096         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(const struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *NONNULL_PTR orig);
5097         export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig: number): number {
5098                 if(!isWasmInitialized) {
5099                         throw new Error("initializeWasm() must be awaited first!");
5100                 }
5101                 const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_clone(orig);
5102                 return nativeResponseValue;
5103         }
5104         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
5105         export function CResult_NoneLightningErrorZ_ok(): number {
5106                 if(!isWasmInitialized) {
5107                         throw new Error("initializeWasm() must be awaited first!");
5108                 }
5109                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
5110                 return nativeResponseValue;
5111         }
5112         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
5113         export function CResult_NoneLightningErrorZ_err(e: number): number {
5114                 if(!isWasmInitialized) {
5115                         throw new Error("initializeWasm() must be awaited first!");
5116                 }
5117                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
5118                 return nativeResponseValue;
5119         }
5120         // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
5121         export function CResult_NoneLightningErrorZ_free(_res: number): void {
5122                 if(!isWasmInitialized) {
5123                         throw new Error("initializeWasm() must be awaited first!");
5124                 }
5125                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
5126                 // debug statements here
5127         }
5128         // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
5129         export function CResult_NoneLightningErrorZ_clone(orig: number): number {
5130                 if(!isWasmInitialized) {
5131                         throw new Error("initializeWasm() must be awaited first!");
5132                 }
5133                 const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
5134                 return nativeResponseValue;
5135         }
5136         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_clone(const struct LDKC2Tuple_PublicKeyTypeZ *NONNULL_PTR orig);
5137         export function C2Tuple_PublicKeyTypeZ_clone(orig: number): number {
5138                 if(!isWasmInitialized) {
5139                         throw new Error("initializeWasm() must be awaited first!");
5140                 }
5141                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_clone(orig);
5142                 return nativeResponseValue;
5143         }
5144         // struct LDKC2Tuple_PublicKeyTypeZ C2Tuple_PublicKeyTypeZ_new(struct LDKPublicKey a, struct LDKType b);
5145         export function C2Tuple_PublicKeyTypeZ_new(a: Uint8Array, b: number): number {
5146                 if(!isWasmInitialized) {
5147                         throw new Error("initializeWasm() must be awaited first!");
5148                 }
5149                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_new(encodeArray(a), b);
5150                 return nativeResponseValue;
5151         }
5152         // void C2Tuple_PublicKeyTypeZ_free(struct LDKC2Tuple_PublicKeyTypeZ _res);
5153         export function C2Tuple_PublicKeyTypeZ_free(_res: number): void {
5154                 if(!isWasmInitialized) {
5155                         throw new Error("initializeWasm() must be awaited first!");
5156                 }
5157                 const nativeResponseValue = wasm.C2Tuple_PublicKeyTypeZ_free(_res);
5158                 // debug statements here
5159         }
5160         // void CVec_C2Tuple_PublicKeyTypeZZ_free(struct LDKCVec_C2Tuple_PublicKeyTypeZZ _res);
5161         export function CVec_C2Tuple_PublicKeyTypeZZ_free(_res: number[]): void {
5162                 if(!isWasmInitialized) {
5163                         throw new Error("initializeWasm() must be awaited first!");
5164                 }
5165                 const nativeResponseValue = wasm.CVec_C2Tuple_PublicKeyTypeZZ_free(_res);
5166                 // debug statements here
5167         }
5168         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
5169         export function CResult_boolLightningErrorZ_ok(o: boolean): number {
5170                 if(!isWasmInitialized) {
5171                         throw new Error("initializeWasm() must be awaited first!");
5172                 }
5173                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
5174                 return nativeResponseValue;
5175         }
5176         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
5177         export function CResult_boolLightningErrorZ_err(e: number): number {
5178                 if(!isWasmInitialized) {
5179                         throw new Error("initializeWasm() must be awaited first!");
5180                 }
5181                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
5182                 return nativeResponseValue;
5183         }
5184         // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
5185         export function CResult_boolLightningErrorZ_free(_res: number): void {
5186                 if(!isWasmInitialized) {
5187                         throw new Error("initializeWasm() must be awaited first!");
5188                 }
5189                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
5190                 // debug statements here
5191         }
5192         // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
5193         export function CResult_boolLightningErrorZ_clone(orig: number): number {
5194                 if(!isWasmInitialized) {
5195                         throw new Error("initializeWasm() must be awaited first!");
5196                 }
5197                 const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
5198                 return nativeResponseValue;
5199         }
5200         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
5201         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
5202                 if(!isWasmInitialized) {
5203                         throw new Error("initializeWasm() must be awaited first!");
5204                 }
5205                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
5206                 return nativeResponseValue;
5207         }
5208         // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
5209         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
5210                 if(!isWasmInitialized) {
5211                         throw new Error("initializeWasm() must be awaited first!");
5212                 }
5213                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
5214                 return nativeResponseValue;
5215         }
5216         // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
5217         export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
5218                 if(!isWasmInitialized) {
5219                         throw new Error("initializeWasm() must be awaited first!");
5220                 }
5221                 const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
5222                 // debug statements here
5223         }
5224         // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
5225         export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
5226                 if(!isWasmInitialized) {
5227                         throw new Error("initializeWasm() must be awaited first!");
5228                 }
5229                 const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
5230                 // debug statements here
5231         }
5232         // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
5233         export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
5234                 if(!isWasmInitialized) {
5235                         throw new Error("initializeWasm() must be awaited first!");
5236                 }
5237                 const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
5238                 // debug statements here
5239         }
5240         // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
5241         export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
5242                 if(!isWasmInitialized) {
5243                         throw new Error("initializeWasm() must be awaited first!");
5244                 }
5245                 const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
5246                 // debug statements here
5247         }
5248         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
5249         export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
5250                 if(!isWasmInitialized) {
5251                         throw new Error("initializeWasm() must be awaited first!");
5252                 }
5253                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
5254                 return nativeResponseValue;
5255         }
5256         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
5257         export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
5258                 if(!isWasmInitialized) {
5259                         throw new Error("initializeWasm() must be awaited first!");
5260                 }
5261                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
5262                 return nativeResponseValue;
5263         }
5264         // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
5265         export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
5266                 if(!isWasmInitialized) {
5267                         throw new Error("initializeWasm() must be awaited first!");
5268                 }
5269                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
5270                 // debug statements here
5271         }
5272         // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
5273         export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
5274                 if(!isWasmInitialized) {
5275                         throw new Error("initializeWasm() must be awaited first!");
5276                 }
5277                 const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
5278                 return nativeResponseValue;
5279         }
5280         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
5281         export function CResult_NonePeerHandleErrorZ_ok(): number {
5282                 if(!isWasmInitialized) {
5283                         throw new Error("initializeWasm() must be awaited first!");
5284                 }
5285                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
5286                 return nativeResponseValue;
5287         }
5288         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
5289         export function CResult_NonePeerHandleErrorZ_err(e: number): number {
5290                 if(!isWasmInitialized) {
5291                         throw new Error("initializeWasm() must be awaited first!");
5292                 }
5293                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
5294                 return nativeResponseValue;
5295         }
5296         // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
5297         export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
5298                 if(!isWasmInitialized) {
5299                         throw new Error("initializeWasm() must be awaited first!");
5300                 }
5301                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
5302                 // debug statements here
5303         }
5304         // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
5305         export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
5306                 if(!isWasmInitialized) {
5307                         throw new Error("initializeWasm() must be awaited first!");
5308                 }
5309                 const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
5310                 return nativeResponseValue;
5311         }
5312         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
5313         export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
5314                 if(!isWasmInitialized) {
5315                         throw new Error("initializeWasm() must be awaited first!");
5316                 }
5317                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
5318                 return nativeResponseValue;
5319         }
5320         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
5321         export function CResult_boolPeerHandleErrorZ_err(e: number): number {
5322                 if(!isWasmInitialized) {
5323                         throw new Error("initializeWasm() must be awaited first!");
5324                 }
5325                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
5326                 return nativeResponseValue;
5327         }
5328         // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
5329         export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
5330                 if(!isWasmInitialized) {
5331                         throw new Error("initializeWasm() must be awaited first!");
5332                 }
5333                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
5334                 // debug statements here
5335         }
5336         // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
5337         export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
5338                 if(!isWasmInitialized) {
5339                         throw new Error("initializeWasm() must be awaited first!");
5340                 }
5341                 const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
5342                 return nativeResponseValue;
5343         }
5344         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_ok(struct LDKNodeId o);
5345         export function CResult_NodeIdDecodeErrorZ_ok(o: number): number {
5346                 if(!isWasmInitialized) {
5347                         throw new Error("initializeWasm() must be awaited first!");
5348                 }
5349                 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_ok(o);
5350                 return nativeResponseValue;
5351         }
5352         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_err(struct LDKDecodeError e);
5353         export function CResult_NodeIdDecodeErrorZ_err(e: number): number {
5354                 if(!isWasmInitialized) {
5355                         throw new Error("initializeWasm() must be awaited first!");
5356                 }
5357                 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_err(e);
5358                 return nativeResponseValue;
5359         }
5360         // void CResult_NodeIdDecodeErrorZ_free(struct LDKCResult_NodeIdDecodeErrorZ _res);
5361         export function CResult_NodeIdDecodeErrorZ_free(_res: number): void {
5362                 if(!isWasmInitialized) {
5363                         throw new Error("initializeWasm() must be awaited first!");
5364                 }
5365                 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_free(_res);
5366                 // debug statements here
5367         }
5368         // struct LDKCResult_NodeIdDecodeErrorZ CResult_NodeIdDecodeErrorZ_clone(const struct LDKCResult_NodeIdDecodeErrorZ *NONNULL_PTR orig);
5369         export function CResult_NodeIdDecodeErrorZ_clone(orig: number): number {
5370                 if(!isWasmInitialized) {
5371                         throw new Error("initializeWasm() must be awaited first!");
5372                 }
5373                 const nativeResponseValue = wasm.CResult_NodeIdDecodeErrorZ_clone(orig);
5374                 return nativeResponseValue;
5375         }
5376         // struct LDKCOption_AccessZ COption_AccessZ_some(struct LDKAccess o);
5377         export function COption_AccessZ_some(o: number): number {
5378                 if(!isWasmInitialized) {
5379                         throw new Error("initializeWasm() must be awaited first!");
5380                 }
5381                 const nativeResponseValue = wasm.COption_AccessZ_some(o);
5382                 return nativeResponseValue;
5383         }
5384         // struct LDKCOption_AccessZ COption_AccessZ_none(void);
5385         export function COption_AccessZ_none(): number {
5386                 if(!isWasmInitialized) {
5387                         throw new Error("initializeWasm() must be awaited first!");
5388                 }
5389                 const nativeResponseValue = wasm.COption_AccessZ_none();
5390                 return nativeResponseValue;
5391         }
5392         // void COption_AccessZ_free(struct LDKCOption_AccessZ _res);
5393         export function COption_AccessZ_free(_res: number): void {
5394                 if(!isWasmInitialized) {
5395                         throw new Error("initializeWasm() must be awaited first!");
5396                 }
5397                 const nativeResponseValue = wasm.COption_AccessZ_free(_res);
5398                 // debug statements here
5399         }
5400         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
5401         export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
5402                 if(!isWasmInitialized) {
5403                         throw new Error("initializeWasm() must be awaited first!");
5404                 }
5405                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
5406                 return nativeResponseValue;
5407         }
5408         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
5409         export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
5410                 if(!isWasmInitialized) {
5411                         throw new Error("initializeWasm() must be awaited first!");
5412                 }
5413                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
5414                 return nativeResponseValue;
5415         }
5416         // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
5417         export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
5418                 if(!isWasmInitialized) {
5419                         throw new Error("initializeWasm() must be awaited first!");
5420                 }
5421                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
5422                 // debug statements here
5423         }
5424         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
5425         export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
5426                 if(!isWasmInitialized) {
5427                         throw new Error("initializeWasm() must be awaited first!");
5428                 }
5429                 const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
5430                 return nativeResponseValue;
5431         }
5432         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
5433         export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
5434                 if(!isWasmInitialized) {
5435                         throw new Error("initializeWasm() must be awaited first!");
5436                 }
5437                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
5438                 return nativeResponseValue;
5439         }
5440         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
5441         export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
5442                 if(!isWasmInitialized) {
5443                         throw new Error("initializeWasm() must be awaited first!");
5444                 }
5445                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
5446                 return nativeResponseValue;
5447         }
5448         // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
5449         export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
5450                 if(!isWasmInitialized) {
5451                         throw new Error("initializeWasm() must be awaited first!");
5452                 }
5453                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
5454                 // debug statements here
5455         }
5456         // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
5457         export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
5458                 if(!isWasmInitialized) {
5459                         throw new Error("initializeWasm() must be awaited first!");
5460                 }
5461                 const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
5462                 return nativeResponseValue;
5463         }
5464         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
5465         export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
5466                 if(!isWasmInitialized) {
5467                         throw new Error("initializeWasm() must be awaited first!");
5468                 }
5469                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
5470                 return nativeResponseValue;
5471         }
5472         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
5473         export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
5474                 if(!isWasmInitialized) {
5475                         throw new Error("initializeWasm() must be awaited first!");
5476                 }
5477                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
5478                 return nativeResponseValue;
5479         }
5480         // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
5481         export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
5482                 if(!isWasmInitialized) {
5483                         throw new Error("initializeWasm() must be awaited first!");
5484                 }
5485                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
5486                 // debug statements here
5487         }
5488         // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
5489         export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
5490                 if(!isWasmInitialized) {
5491                         throw new Error("initializeWasm() must be awaited first!");
5492                 }
5493                 const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
5494                 return nativeResponseValue;
5495         }
5496         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
5497         export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
5498                 if(!isWasmInitialized) {
5499                         throw new Error("initializeWasm() must be awaited first!");
5500                 }
5501                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
5502                 return nativeResponseValue;
5503         }
5504         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
5505         export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
5506                 if(!isWasmInitialized) {
5507                         throw new Error("initializeWasm() must be awaited first!");
5508                 }
5509                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
5510                 return nativeResponseValue;
5511         }
5512         // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
5513         export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
5514                 if(!isWasmInitialized) {
5515                         throw new Error("initializeWasm() must be awaited first!");
5516                 }
5517                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
5518                 // debug statements here
5519         }
5520         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
5521         export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
5522                 if(!isWasmInitialized) {
5523                         throw new Error("initializeWasm() must be awaited first!");
5524                 }
5525                 const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
5526                 return nativeResponseValue;
5527         }
5528         // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
5529         export function CVec_u64Z_free(_res: number[]): void {
5530                 if(!isWasmInitialized) {
5531                         throw new Error("initializeWasm() must be awaited first!");
5532                 }
5533                 const nativeResponseValue = wasm.CVec_u64Z_free(_res);
5534                 // debug statements here
5535         }
5536         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
5537         export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
5538                 if(!isWasmInitialized) {
5539                         throw new Error("initializeWasm() must be awaited first!");
5540                 }
5541                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
5542                 return nativeResponseValue;
5543         }
5544         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
5545         export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
5546                 if(!isWasmInitialized) {
5547                         throw new Error("initializeWasm() must be awaited first!");
5548                 }
5549                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
5550                 return nativeResponseValue;
5551         }
5552         // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
5553         export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
5554                 if(!isWasmInitialized) {
5555                         throw new Error("initializeWasm() must be awaited first!");
5556                 }
5557                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
5558                 // debug statements here
5559         }
5560         // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
5561         export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
5562                 if(!isWasmInitialized) {
5563                         throw new Error("initializeWasm() must be awaited first!");
5564                 }
5565                 const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
5566                 return nativeResponseValue;
5567         }
5568         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
5569         export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
5570                 if(!isWasmInitialized) {
5571                         throw new Error("initializeWasm() must be awaited first!");
5572                 }
5573                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
5574                 return nativeResponseValue;
5575         }
5576         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
5577         export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
5578                 if(!isWasmInitialized) {
5579                         throw new Error("initializeWasm() must be awaited first!");
5580                 }
5581                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
5582                 return nativeResponseValue;
5583         }
5584         // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
5585         export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
5586                 if(!isWasmInitialized) {
5587                         throw new Error("initializeWasm() must be awaited first!");
5588                 }
5589                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
5590                 // debug statements here
5591         }
5592         // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
5593         export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
5594                 if(!isWasmInitialized) {
5595                         throw new Error("initializeWasm() must be awaited first!");
5596                 }
5597                 const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
5598                 return nativeResponseValue;
5599         }
5600         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_some(struct LDKCVec_NetAddressZ o);
5601         export function COption_CVec_NetAddressZZ_some(o: number[]): number {
5602                 if(!isWasmInitialized) {
5603                         throw new Error("initializeWasm() must be awaited first!");
5604                 }
5605                 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_some(o);
5606                 return nativeResponseValue;
5607         }
5608         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_none(void);
5609         export function COption_CVec_NetAddressZZ_none(): number {
5610                 if(!isWasmInitialized) {
5611                         throw new Error("initializeWasm() must be awaited first!");
5612                 }
5613                 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_none();
5614                 return nativeResponseValue;
5615         }
5616         // void COption_CVec_NetAddressZZ_free(struct LDKCOption_CVec_NetAddressZZ _res);
5617         export function COption_CVec_NetAddressZZ_free(_res: number): void {
5618                 if(!isWasmInitialized) {
5619                         throw new Error("initializeWasm() must be awaited first!");
5620                 }
5621                 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_free(_res);
5622                 // debug statements here
5623         }
5624         // struct LDKCOption_CVec_NetAddressZZ COption_CVec_NetAddressZZ_clone(const struct LDKCOption_CVec_NetAddressZZ *NONNULL_PTR orig);
5625         export function COption_CVec_NetAddressZZ_clone(orig: number): number {
5626                 if(!isWasmInitialized) {
5627                         throw new Error("initializeWasm() must be awaited first!");
5628                 }
5629                 const nativeResponseValue = wasm.COption_CVec_NetAddressZZ_clone(orig);
5630                 return nativeResponseValue;
5631         }
5632         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
5633         export function CResult_NetAddressu8Z_ok(o: number): number {
5634                 if(!isWasmInitialized) {
5635                         throw new Error("initializeWasm() must be awaited first!");
5636                 }
5637                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
5638                 return nativeResponseValue;
5639         }
5640         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
5641         export function CResult_NetAddressu8Z_err(e: number): number {
5642                 if(!isWasmInitialized) {
5643                         throw new Error("initializeWasm() must be awaited first!");
5644                 }
5645                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
5646                 return nativeResponseValue;
5647         }
5648         // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
5649         export function CResult_NetAddressu8Z_free(_res: number): void {
5650                 if(!isWasmInitialized) {
5651                         throw new Error("initializeWasm() must be awaited first!");
5652                 }
5653                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
5654                 // debug statements here
5655         }
5656         // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
5657         export function CResult_NetAddressu8Z_clone(orig: number): number {
5658                 if(!isWasmInitialized) {
5659                         throw new Error("initializeWasm() must be awaited first!");
5660                 }
5661                 const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
5662                 return nativeResponseValue;
5663         }
5664         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
5665         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
5666                 if(!isWasmInitialized) {
5667                         throw new Error("initializeWasm() must be awaited first!");
5668                 }
5669                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
5670                 return nativeResponseValue;
5671         }
5672         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
5673         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
5674                 if(!isWasmInitialized) {
5675                         throw new Error("initializeWasm() must be awaited first!");
5676                 }
5677                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
5678                 return nativeResponseValue;
5679         }
5680         // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
5681         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
5682                 if(!isWasmInitialized) {
5683                         throw new Error("initializeWasm() must be awaited first!");
5684                 }
5685                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
5686                 // debug statements here
5687         }
5688         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
5689         export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
5690                 if(!isWasmInitialized) {
5691                         throw new Error("initializeWasm() must be awaited first!");
5692                 }
5693                 const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
5694                 return nativeResponseValue;
5695         }
5696         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o);
5697         export function CResult_NetAddressDecodeErrorZ_ok(o: number): number {
5698                 if(!isWasmInitialized) {
5699                         throw new Error("initializeWasm() must be awaited first!");
5700                 }
5701                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_ok(o);
5702                 return nativeResponseValue;
5703         }
5704         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e);
5705         export function CResult_NetAddressDecodeErrorZ_err(e: number): number {
5706                 if(!isWasmInitialized) {
5707                         throw new Error("initializeWasm() must be awaited first!");
5708                 }
5709                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_err(e);
5710                 return nativeResponseValue;
5711         }
5712         // void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res);
5713         export function CResult_NetAddressDecodeErrorZ_free(_res: number): void {
5714                 if(!isWasmInitialized) {
5715                         throw new Error("initializeWasm() must be awaited first!");
5716                 }
5717                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_free(_res);
5718                 // debug statements here
5719         }
5720         // struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig);
5721         export function CResult_NetAddressDecodeErrorZ_clone(orig: number): number {
5722                 if(!isWasmInitialized) {
5723                         throw new Error("initializeWasm() must be awaited first!");
5724                 }
5725                 const nativeResponseValue = wasm.CResult_NetAddressDecodeErrorZ_clone(orig);
5726                 return nativeResponseValue;
5727         }
5728         // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
5729         export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
5730                 if(!isWasmInitialized) {
5731                         throw new Error("initializeWasm() must be awaited first!");
5732                 }
5733                 const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
5734                 // debug statements here
5735         }
5736         // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
5737         export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
5738                 if(!isWasmInitialized) {
5739                         throw new Error("initializeWasm() must be awaited first!");
5740                 }
5741                 const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
5742                 // debug statements here
5743         }
5744         // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
5745         export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
5746                 if(!isWasmInitialized) {
5747                         throw new Error("initializeWasm() must be awaited first!");
5748                 }
5749                 const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
5750                 // debug statements here
5751         }
5752         // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
5753         export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
5754                 if(!isWasmInitialized) {
5755                         throw new Error("initializeWasm() must be awaited first!");
5756                 }
5757                 const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
5758                 // debug statements here
5759         }
5760         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
5761         export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
5762                 if(!isWasmInitialized) {
5763                         throw new Error("initializeWasm() must be awaited first!");
5764                 }
5765                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
5766                 return nativeResponseValue;
5767         }
5768         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
5769         export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
5770                 if(!isWasmInitialized) {
5771                         throw new Error("initializeWasm() must be awaited first!");
5772                 }
5773                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
5774                 return nativeResponseValue;
5775         }
5776         // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
5777         export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
5778                 if(!isWasmInitialized) {
5779                         throw new Error("initializeWasm() must be awaited first!");
5780                 }
5781                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
5782                 // debug statements here
5783         }
5784         // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
5785         export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
5786                 if(!isWasmInitialized) {
5787                         throw new Error("initializeWasm() must be awaited first!");
5788                 }
5789                 const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
5790                 return nativeResponseValue;
5791         }
5792         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
5793         export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
5794                 if(!isWasmInitialized) {
5795                         throw new Error("initializeWasm() must be awaited first!");
5796                 }
5797                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
5798                 return nativeResponseValue;
5799         }
5800         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
5801         export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
5802                 if(!isWasmInitialized) {
5803                         throw new Error("initializeWasm() must be awaited first!");
5804                 }
5805                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
5806                 return nativeResponseValue;
5807         }
5808         // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
5809         export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
5810                 if(!isWasmInitialized) {
5811                         throw new Error("initializeWasm() must be awaited first!");
5812                 }
5813                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
5814                 // debug statements here
5815         }
5816         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
5817         export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
5818                 if(!isWasmInitialized) {
5819                         throw new Error("initializeWasm() must be awaited first!");
5820                 }
5821                 const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
5822                 return nativeResponseValue;
5823         }
5824         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
5825         export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
5826                 if(!isWasmInitialized) {
5827                         throw new Error("initializeWasm() must be awaited first!");
5828                 }
5829                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
5830                 return nativeResponseValue;
5831         }
5832         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
5833         export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
5834                 if(!isWasmInitialized) {
5835                         throw new Error("initializeWasm() must be awaited first!");
5836                 }
5837                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
5838                 return nativeResponseValue;
5839         }
5840         // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
5841         export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
5842                 if(!isWasmInitialized) {
5843                         throw new Error("initializeWasm() must be awaited first!");
5844                 }
5845                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
5846                 // debug statements here
5847         }
5848         // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
5849         export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
5850                 if(!isWasmInitialized) {
5851                         throw new Error("initializeWasm() must be awaited first!");
5852                 }
5853                 const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
5854                 return nativeResponseValue;
5855         }
5856         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
5857         export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
5858                 if(!isWasmInitialized) {
5859                         throw new Error("initializeWasm() must be awaited first!");
5860                 }
5861                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
5862                 return nativeResponseValue;
5863         }
5864         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
5865         export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
5866                 if(!isWasmInitialized) {
5867                         throw new Error("initializeWasm() must be awaited first!");
5868                 }
5869                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
5870                 return nativeResponseValue;
5871         }
5872         // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
5873         export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
5874                 if(!isWasmInitialized) {
5875                         throw new Error("initializeWasm() must be awaited first!");
5876                 }
5877                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
5878                 // debug statements here
5879         }
5880         // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
5881         export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
5882                 if(!isWasmInitialized) {
5883                         throw new Error("initializeWasm() must be awaited first!");
5884                 }
5885                 const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
5886                 return nativeResponseValue;
5887         }
5888         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(struct LDKClosingSignedFeeRange o);
5889         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o: number): number {
5890                 if(!isWasmInitialized) {
5891                         throw new Error("initializeWasm() must be awaited first!");
5892                 }
5893                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_ok(o);
5894                 return nativeResponseValue;
5895         }
5896         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_err(struct LDKDecodeError e);
5897         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e: number): number {
5898                 if(!isWasmInitialized) {
5899                         throw new Error("initializeWasm() must be awaited first!");
5900                 }
5901                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_err(e);
5902                 return nativeResponseValue;
5903         }
5904         // void CResult_ClosingSignedFeeRangeDecodeErrorZ_free(struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ _res);
5905         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res: number): void {
5906                 if(!isWasmInitialized) {
5907                         throw new Error("initializeWasm() must be awaited first!");
5908                 }
5909                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_free(_res);
5910                 // debug statements here
5911         }
5912         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ *NONNULL_PTR orig);
5913         export function CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig: number): number {
5914                 if(!isWasmInitialized) {
5915                         throw new Error("initializeWasm() must be awaited first!");
5916                 }
5917                 const nativeResponseValue = wasm.CResult_ClosingSignedFeeRangeDecodeErrorZ_clone(orig);
5918                 return nativeResponseValue;
5919         }
5920         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
5921         export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
5922                 if(!isWasmInitialized) {
5923                         throw new Error("initializeWasm() must be awaited first!");
5924                 }
5925                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
5926                 return nativeResponseValue;
5927         }
5928         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
5929         export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
5930                 if(!isWasmInitialized) {
5931                         throw new Error("initializeWasm() must be awaited first!");
5932                 }
5933                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
5934                 return nativeResponseValue;
5935         }
5936         // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
5937         export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
5938                 if(!isWasmInitialized) {
5939                         throw new Error("initializeWasm() must be awaited first!");
5940                 }
5941                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
5942                 // debug statements here
5943         }
5944         // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
5945         export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
5946                 if(!isWasmInitialized) {
5947                         throw new Error("initializeWasm() must be awaited first!");
5948                 }
5949                 const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
5950                 return nativeResponseValue;
5951         }
5952         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
5953         export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
5954                 if(!isWasmInitialized) {
5955                         throw new Error("initializeWasm() must be awaited first!");
5956                 }
5957                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
5958                 return nativeResponseValue;
5959         }
5960         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
5961         export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
5962                 if(!isWasmInitialized) {
5963                         throw new Error("initializeWasm() must be awaited first!");
5964                 }
5965                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
5966                 return nativeResponseValue;
5967         }
5968         // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
5969         export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
5970                 if(!isWasmInitialized) {
5971                         throw new Error("initializeWasm() must be awaited first!");
5972                 }
5973                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
5974                 // debug statements here
5975         }
5976         // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
5977         export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
5978                 if(!isWasmInitialized) {
5979                         throw new Error("initializeWasm() must be awaited first!");
5980                 }
5981                 const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
5982                 return nativeResponseValue;
5983         }
5984         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
5985         export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
5986                 if(!isWasmInitialized) {
5987                         throw new Error("initializeWasm() must be awaited first!");
5988                 }
5989                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
5990                 return nativeResponseValue;
5991         }
5992         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
5993         export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
5994                 if(!isWasmInitialized) {
5995                         throw new Error("initializeWasm() must be awaited first!");
5996                 }
5997                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
5998                 return nativeResponseValue;
5999         }
6000         // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
6001         export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
6002                 if(!isWasmInitialized) {
6003                         throw new Error("initializeWasm() must be awaited first!");
6004                 }
6005                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
6006                 // debug statements here
6007         }
6008         // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
6009         export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
6010                 if(!isWasmInitialized) {
6011                         throw new Error("initializeWasm() must be awaited first!");
6012                 }
6013                 const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
6014                 return nativeResponseValue;
6015         }
6016         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
6017         export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
6018                 if(!isWasmInitialized) {
6019                         throw new Error("initializeWasm() must be awaited first!");
6020                 }
6021                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
6022                 return nativeResponseValue;
6023         }
6024         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
6025         export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
6026                 if(!isWasmInitialized) {
6027                         throw new Error("initializeWasm() must be awaited first!");
6028                 }
6029                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
6030                 return nativeResponseValue;
6031         }
6032         // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
6033         export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
6034                 if(!isWasmInitialized) {
6035                         throw new Error("initializeWasm() must be awaited first!");
6036                 }
6037                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
6038                 // debug statements here
6039         }
6040         // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
6041         export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
6042                 if(!isWasmInitialized) {
6043                         throw new Error("initializeWasm() must be awaited first!");
6044                 }
6045                 const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
6046                 return nativeResponseValue;
6047         }
6048         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
6049         export function CResult_InitDecodeErrorZ_ok(o: number): number {
6050                 if(!isWasmInitialized) {
6051                         throw new Error("initializeWasm() must be awaited first!");
6052                 }
6053                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_ok(o);
6054                 return nativeResponseValue;
6055         }
6056         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
6057         export function CResult_InitDecodeErrorZ_err(e: number): number {
6058                 if(!isWasmInitialized) {
6059                         throw new Error("initializeWasm() must be awaited first!");
6060                 }
6061                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_err(e);
6062                 return nativeResponseValue;
6063         }
6064         // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
6065         export function CResult_InitDecodeErrorZ_free(_res: number): void {
6066                 if(!isWasmInitialized) {
6067                         throw new Error("initializeWasm() must be awaited first!");
6068                 }
6069                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
6070                 // debug statements here
6071         }
6072         // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
6073         export function CResult_InitDecodeErrorZ_clone(orig: number): number {
6074                 if(!isWasmInitialized) {
6075                         throw new Error("initializeWasm() must be awaited first!");
6076                 }
6077                 const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
6078                 return nativeResponseValue;
6079         }
6080         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
6081         export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
6082                 if(!isWasmInitialized) {
6083                         throw new Error("initializeWasm() must be awaited first!");
6084                 }
6085                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
6086                 return nativeResponseValue;
6087         }
6088         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
6089         export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
6090                 if(!isWasmInitialized) {
6091                         throw new Error("initializeWasm() must be awaited first!");
6092                 }
6093                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
6094                 return nativeResponseValue;
6095         }
6096         // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
6097         export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
6098                 if(!isWasmInitialized) {
6099                         throw new Error("initializeWasm() must be awaited first!");
6100                 }
6101                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
6102                 // debug statements here
6103         }
6104         // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
6105         export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
6106                 if(!isWasmInitialized) {
6107                         throw new Error("initializeWasm() must be awaited first!");
6108                 }
6109                 const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
6110                 return nativeResponseValue;
6111         }
6112         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
6113         export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
6114                 if(!isWasmInitialized) {
6115                         throw new Error("initializeWasm() must be awaited first!");
6116                 }
6117                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
6118                 return nativeResponseValue;
6119         }
6120         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
6121         export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
6122                 if(!isWasmInitialized) {
6123                         throw new Error("initializeWasm() must be awaited first!");
6124                 }
6125                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
6126                 return nativeResponseValue;
6127         }
6128         // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
6129         export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
6130                 if(!isWasmInitialized) {
6131                         throw new Error("initializeWasm() must be awaited first!");
6132                 }
6133                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
6134                 // debug statements here
6135         }
6136         // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
6137         export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
6138                 if(!isWasmInitialized) {
6139                         throw new Error("initializeWasm() must be awaited first!");
6140                 }
6141                 const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
6142                 return nativeResponseValue;
6143         }
6144         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
6145         export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
6146                 if(!isWasmInitialized) {
6147                         throw new Error("initializeWasm() must be awaited first!");
6148                 }
6149                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
6150                 return nativeResponseValue;
6151         }
6152         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
6153         export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
6154                 if(!isWasmInitialized) {
6155                         throw new Error("initializeWasm() must be awaited first!");
6156                 }
6157                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
6158                 return nativeResponseValue;
6159         }
6160         // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
6161         export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
6162                 if(!isWasmInitialized) {
6163                         throw new Error("initializeWasm() must be awaited first!");
6164                 }
6165                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
6166                 // debug statements here
6167         }
6168         // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
6169         export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
6170                 if(!isWasmInitialized) {
6171                         throw new Error("initializeWasm() must be awaited first!");
6172                 }
6173                 const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
6174                 return nativeResponseValue;
6175         }
6176         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
6177         export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
6178                 if(!isWasmInitialized) {
6179                         throw new Error("initializeWasm() must be awaited first!");
6180                 }
6181                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
6182                 return nativeResponseValue;
6183         }
6184         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
6185         export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
6186                 if(!isWasmInitialized) {
6187                         throw new Error("initializeWasm() must be awaited first!");
6188                 }
6189                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
6190                 return nativeResponseValue;
6191         }
6192         // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
6193         export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
6194                 if(!isWasmInitialized) {
6195                         throw new Error("initializeWasm() must be awaited first!");
6196                 }
6197                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
6198                 // debug statements here
6199         }
6200         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
6201         export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
6202                 if(!isWasmInitialized) {
6203                         throw new Error("initializeWasm() must be awaited first!");
6204                 }
6205                 const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
6206                 return nativeResponseValue;
6207         }
6208         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
6209         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
6210                 if(!isWasmInitialized) {
6211                         throw new Error("initializeWasm() must be awaited first!");
6212                 }
6213                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
6214                 return nativeResponseValue;
6215         }
6216         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
6217         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
6218                 if(!isWasmInitialized) {
6219                         throw new Error("initializeWasm() must be awaited first!");
6220                 }
6221                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
6222                 return nativeResponseValue;
6223         }
6224         // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
6225         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
6226                 if(!isWasmInitialized) {
6227                         throw new Error("initializeWasm() must be awaited first!");
6228                 }
6229                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
6230                 // debug statements here
6231         }
6232         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
6233         export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
6234                 if(!isWasmInitialized) {
6235                         throw new Error("initializeWasm() must be awaited first!");
6236                 }
6237                 const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
6238                 return nativeResponseValue;
6239         }
6240         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
6241         export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
6242                 if(!isWasmInitialized) {
6243                         throw new Error("initializeWasm() must be awaited first!");
6244                 }
6245                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
6246                 return nativeResponseValue;
6247         }
6248         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
6249         export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
6250                 if(!isWasmInitialized) {
6251                         throw new Error("initializeWasm() must be awaited first!");
6252                 }
6253                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
6254                 return nativeResponseValue;
6255         }
6256         // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
6257         export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
6258                 if(!isWasmInitialized) {
6259                         throw new Error("initializeWasm() must be awaited first!");
6260                 }
6261                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
6262                 // debug statements here
6263         }
6264         // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
6265         export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
6266                 if(!isWasmInitialized) {
6267                         throw new Error("initializeWasm() must be awaited first!");
6268                 }
6269                 const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
6270                 return nativeResponseValue;
6271         }
6272         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
6273         export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
6274                 if(!isWasmInitialized) {
6275                         throw new Error("initializeWasm() must be awaited first!");
6276                 }
6277                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
6278                 return nativeResponseValue;
6279         }
6280         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
6281         export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
6282                 if(!isWasmInitialized) {
6283                         throw new Error("initializeWasm() must be awaited first!");
6284                 }
6285                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
6286                 return nativeResponseValue;
6287         }
6288         // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
6289         export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
6290                 if(!isWasmInitialized) {
6291                         throw new Error("initializeWasm() must be awaited first!");
6292                 }
6293                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
6294                 // debug statements here
6295         }
6296         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
6297         export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
6298                 if(!isWasmInitialized) {
6299                         throw new Error("initializeWasm() must be awaited first!");
6300                 }
6301                 const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
6302                 return nativeResponseValue;
6303         }
6304         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
6305         export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
6306                 if(!isWasmInitialized) {
6307                         throw new Error("initializeWasm() must be awaited first!");
6308                 }
6309                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
6310                 return nativeResponseValue;
6311         }
6312         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
6313         export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
6314                 if(!isWasmInitialized) {
6315                         throw new Error("initializeWasm() must be awaited first!");
6316                 }
6317                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
6318                 return nativeResponseValue;
6319         }
6320         // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
6321         export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
6322                 if(!isWasmInitialized) {
6323                         throw new Error("initializeWasm() must be awaited first!");
6324                 }
6325                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
6326                 // debug statements here
6327         }
6328         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
6329         export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
6330                 if(!isWasmInitialized) {
6331                         throw new Error("initializeWasm() must be awaited first!");
6332                 }
6333                 const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
6334                 return nativeResponseValue;
6335         }
6336         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
6337         export function CResult_PingDecodeErrorZ_ok(o: number): number {
6338                 if(!isWasmInitialized) {
6339                         throw new Error("initializeWasm() must be awaited first!");
6340                 }
6341                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
6342                 return nativeResponseValue;
6343         }
6344         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
6345         export function CResult_PingDecodeErrorZ_err(e: number): number {
6346                 if(!isWasmInitialized) {
6347                         throw new Error("initializeWasm() must be awaited first!");
6348                 }
6349                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
6350                 return nativeResponseValue;
6351         }
6352         // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
6353         export function CResult_PingDecodeErrorZ_free(_res: number): void {
6354                 if(!isWasmInitialized) {
6355                         throw new Error("initializeWasm() must be awaited first!");
6356                 }
6357                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
6358                 // debug statements here
6359         }
6360         // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
6361         export function CResult_PingDecodeErrorZ_clone(orig: number): number {
6362                 if(!isWasmInitialized) {
6363                         throw new Error("initializeWasm() must be awaited first!");
6364                 }
6365                 const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
6366                 return nativeResponseValue;
6367         }
6368         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
6369         export function CResult_PongDecodeErrorZ_ok(o: number): number {
6370                 if(!isWasmInitialized) {
6371                         throw new Error("initializeWasm() must be awaited first!");
6372                 }
6373                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
6374                 return nativeResponseValue;
6375         }
6376         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
6377         export function CResult_PongDecodeErrorZ_err(e: number): number {
6378                 if(!isWasmInitialized) {
6379                         throw new Error("initializeWasm() must be awaited first!");
6380                 }
6381                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
6382                 return nativeResponseValue;
6383         }
6384         // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
6385         export function CResult_PongDecodeErrorZ_free(_res: number): void {
6386                 if(!isWasmInitialized) {
6387                         throw new Error("initializeWasm() must be awaited first!");
6388                 }
6389                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
6390                 // debug statements here
6391         }
6392         // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
6393         export function CResult_PongDecodeErrorZ_clone(orig: number): number {
6394                 if(!isWasmInitialized) {
6395                         throw new Error("initializeWasm() must be awaited first!");
6396                 }
6397                 const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
6398                 return nativeResponseValue;
6399         }
6400         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
6401         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
6402                 if(!isWasmInitialized) {
6403                         throw new Error("initializeWasm() must be awaited first!");
6404                 }
6405                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
6406                 return nativeResponseValue;
6407         }
6408         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
6409         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
6410                 if(!isWasmInitialized) {
6411                         throw new Error("initializeWasm() must be awaited first!");
6412                 }
6413                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
6414                 return nativeResponseValue;
6415         }
6416         // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
6417         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
6418                 if(!isWasmInitialized) {
6419                         throw new Error("initializeWasm() must be awaited first!");
6420                 }
6421                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
6422                 // debug statements here
6423         }
6424         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
6425         export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
6426                 if(!isWasmInitialized) {
6427                         throw new Error("initializeWasm() must be awaited first!");
6428                 }
6429                 const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
6430                 return nativeResponseValue;
6431         }
6432         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
6433         export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
6434                 if(!isWasmInitialized) {
6435                         throw new Error("initializeWasm() must be awaited first!");
6436                 }
6437                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
6438                 return nativeResponseValue;
6439         }
6440         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
6441         export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
6442                 if(!isWasmInitialized) {
6443                         throw new Error("initializeWasm() must be awaited first!");
6444                 }
6445                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
6446                 return nativeResponseValue;
6447         }
6448         // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
6449         export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
6450                 if(!isWasmInitialized) {
6451                         throw new Error("initializeWasm() must be awaited first!");
6452                 }
6453                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
6454                 // debug statements here
6455         }
6456         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
6457         export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
6458                 if(!isWasmInitialized) {
6459                         throw new Error("initializeWasm() must be awaited first!");
6460                 }
6461                 const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
6462                 return nativeResponseValue;
6463         }
6464         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
6465         export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
6466                 if(!isWasmInitialized) {
6467                         throw new Error("initializeWasm() must be awaited first!");
6468                 }
6469                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
6470                 return nativeResponseValue;
6471         }
6472         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
6473         export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
6474                 if(!isWasmInitialized) {
6475                         throw new Error("initializeWasm() must be awaited first!");
6476                 }
6477                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
6478                 return nativeResponseValue;
6479         }
6480         // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
6481         export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
6482                 if(!isWasmInitialized) {
6483                         throw new Error("initializeWasm() must be awaited first!");
6484                 }
6485                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
6486                 // debug statements here
6487         }
6488         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
6489         export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
6490                 if(!isWasmInitialized) {
6491                         throw new Error("initializeWasm() must be awaited first!");
6492                 }
6493                 const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
6494                 return nativeResponseValue;
6495         }
6496         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
6497         export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
6498                 if(!isWasmInitialized) {
6499                         throw new Error("initializeWasm() must be awaited first!");
6500                 }
6501                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
6502                 return nativeResponseValue;
6503         }
6504         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
6505         export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
6506                 if(!isWasmInitialized) {
6507                         throw new Error("initializeWasm() must be awaited first!");
6508                 }
6509                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
6510                 return nativeResponseValue;
6511         }
6512         // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
6513         export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
6514                 if(!isWasmInitialized) {
6515                         throw new Error("initializeWasm() must be awaited first!");
6516                 }
6517                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
6518                 // debug statements here
6519         }
6520         // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
6521         export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
6522                 if(!isWasmInitialized) {
6523                         throw new Error("initializeWasm() must be awaited first!");
6524                 }
6525                 const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
6526                 return nativeResponseValue;
6527         }
6528         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
6529         export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
6530                 if(!isWasmInitialized) {
6531                         throw new Error("initializeWasm() must be awaited first!");
6532                 }
6533                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
6534                 return nativeResponseValue;
6535         }
6536         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
6537         export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
6538                 if(!isWasmInitialized) {
6539                         throw new Error("initializeWasm() must be awaited first!");
6540                 }
6541                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
6542                 return nativeResponseValue;
6543         }
6544         // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
6545         export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
6546                 if(!isWasmInitialized) {
6547                         throw new Error("initializeWasm() must be awaited first!");
6548                 }
6549                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
6550                 // debug statements here
6551         }
6552         // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
6553         export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
6554                 if(!isWasmInitialized) {
6555                         throw new Error("initializeWasm() must be awaited first!");
6556                 }
6557                 const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
6558                 return nativeResponseValue;
6559         }
6560         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
6561         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
6562                 if(!isWasmInitialized) {
6563                         throw new Error("initializeWasm() must be awaited first!");
6564                 }
6565                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
6566                 return nativeResponseValue;
6567         }
6568         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
6569         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
6570                 if(!isWasmInitialized) {
6571                         throw new Error("initializeWasm() must be awaited first!");
6572                 }
6573                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
6574                 return nativeResponseValue;
6575         }
6576         // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
6577         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
6578                 if(!isWasmInitialized) {
6579                         throw new Error("initializeWasm() must be awaited first!");
6580                 }
6581                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
6582                 // debug statements here
6583         }
6584         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
6585         export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
6586                 if(!isWasmInitialized) {
6587                         throw new Error("initializeWasm() must be awaited first!");
6588                 }
6589                 const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
6590                 return nativeResponseValue;
6591         }
6592         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
6593         export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
6594                 if(!isWasmInitialized) {
6595                         throw new Error("initializeWasm() must be awaited first!");
6596                 }
6597                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
6598                 return nativeResponseValue;
6599         }
6600         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
6601         export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
6602                 if(!isWasmInitialized) {
6603                         throw new Error("initializeWasm() must be awaited first!");
6604                 }
6605                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
6606                 return nativeResponseValue;
6607         }
6608         // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
6609         export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
6610                 if(!isWasmInitialized) {
6611                         throw new Error("initializeWasm() must be awaited first!");
6612                 }
6613                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
6614                 // debug statements here
6615         }
6616         // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
6617         export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
6618                 if(!isWasmInitialized) {
6619                         throw new Error("initializeWasm() must be awaited first!");
6620                 }
6621                 const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
6622                 return nativeResponseValue;
6623         }
6624         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
6625         export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
6626                 if(!isWasmInitialized) {
6627                         throw new Error("initializeWasm() must be awaited first!");
6628                 }
6629                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
6630                 return nativeResponseValue;
6631         }
6632         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
6633         export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
6634                 if(!isWasmInitialized) {
6635                         throw new Error("initializeWasm() must be awaited first!");
6636                 }
6637                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
6638                 return nativeResponseValue;
6639         }
6640         // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
6641         export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
6642                 if(!isWasmInitialized) {
6643                         throw new Error("initializeWasm() must be awaited first!");
6644                 }
6645                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
6646                 // debug statements here
6647         }
6648         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
6649         export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
6650                 if(!isWasmInitialized) {
6651                         throw new Error("initializeWasm() must be awaited first!");
6652                 }
6653                 const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
6654                 return nativeResponseValue;
6655         }
6656         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
6657         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
6658                 if(!isWasmInitialized) {
6659                         throw new Error("initializeWasm() must be awaited first!");
6660                 }
6661                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
6662                 return nativeResponseValue;
6663         }
6664         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
6665         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
6666                 if(!isWasmInitialized) {
6667                         throw new Error("initializeWasm() must be awaited first!");
6668                 }
6669                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
6670                 return nativeResponseValue;
6671         }
6672         // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
6673         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
6674                 if(!isWasmInitialized) {
6675                         throw new Error("initializeWasm() must be awaited first!");
6676                 }
6677                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
6678                 // debug statements here
6679         }
6680         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
6681         export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
6682                 if(!isWasmInitialized) {
6683                         throw new Error("initializeWasm() must be awaited first!");
6684                 }
6685                 const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
6686                 return nativeResponseValue;
6687         }
6688         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
6689         export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
6690                 if(!isWasmInitialized) {
6691                         throw new Error("initializeWasm() must be awaited first!");
6692                 }
6693                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
6694                 return nativeResponseValue;
6695         }
6696         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
6697         export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
6698                 if(!isWasmInitialized) {
6699                         throw new Error("initializeWasm() must be awaited first!");
6700                 }
6701                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
6702                 return nativeResponseValue;
6703         }
6704         // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
6705         export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
6706                 if(!isWasmInitialized) {
6707                         throw new Error("initializeWasm() must be awaited first!");
6708                 }
6709                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
6710                 // debug statements here
6711         }
6712         // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
6713         export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
6714                 if(!isWasmInitialized) {
6715                         throw new Error("initializeWasm() must be awaited first!");
6716                 }
6717                 const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
6718                 return nativeResponseValue;
6719         }
6720         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
6721         export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
6722                 if(!isWasmInitialized) {
6723                         throw new Error("initializeWasm() must be awaited first!");
6724                 }
6725                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
6726                 return nativeResponseValue;
6727         }
6728         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
6729         export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
6730                 if(!isWasmInitialized) {
6731                         throw new Error("initializeWasm() must be awaited first!");
6732                 }
6733                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
6734                 return nativeResponseValue;
6735         }
6736         // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
6737         export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
6738                 if(!isWasmInitialized) {
6739                         throw new Error("initializeWasm() must be awaited first!");
6740                 }
6741                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
6742                 // debug statements here
6743         }
6744         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
6745         export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
6746                 if(!isWasmInitialized) {
6747                         throw new Error("initializeWasm() must be awaited first!");
6748                 }
6749                 const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
6750                 return nativeResponseValue;
6751         }
6752         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
6753         export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
6754                 if(!isWasmInitialized) {
6755                         throw new Error("initializeWasm() must be awaited first!");
6756                 }
6757                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
6758                 return nativeResponseValue;
6759         }
6760         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
6761         export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
6762                 if(!isWasmInitialized) {
6763                         throw new Error("initializeWasm() must be awaited first!");
6764                 }
6765                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
6766                 return nativeResponseValue;
6767         }
6768         // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
6769         export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
6770                 if(!isWasmInitialized) {
6771                         throw new Error("initializeWasm() must be awaited first!");
6772                 }
6773                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
6774                 // debug statements here
6775         }
6776         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
6777         export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
6778                 if(!isWasmInitialized) {
6779                         throw new Error("initializeWasm() must be awaited first!");
6780                 }
6781                 const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
6782                 return nativeResponseValue;
6783         }
6784         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_ok(struct LDKInvoice o);
6785         export function CResult_InvoiceSignOrCreationErrorZ_ok(o: number): number {
6786                 if(!isWasmInitialized) {
6787                         throw new Error("initializeWasm() must be awaited first!");
6788                 }
6789                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_ok(o);
6790                 return nativeResponseValue;
6791         }
6792         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e);
6793         export function CResult_InvoiceSignOrCreationErrorZ_err(e: number): number {
6794                 if(!isWasmInitialized) {
6795                         throw new Error("initializeWasm() must be awaited first!");
6796                 }
6797                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_err(e);
6798                 return nativeResponseValue;
6799         }
6800         // void CResult_InvoiceSignOrCreationErrorZ_free(struct LDKCResult_InvoiceSignOrCreationErrorZ _res);
6801         export function CResult_InvoiceSignOrCreationErrorZ_free(_res: number): void {
6802                 if(!isWasmInitialized) {
6803                         throw new Error("initializeWasm() must be awaited first!");
6804                 }
6805                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_free(_res);
6806                 // debug statements here
6807         }
6808         // struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig);
6809         export function CResult_InvoiceSignOrCreationErrorZ_clone(orig: number): number {
6810                 if(!isWasmInitialized) {
6811                         throw new Error("initializeWasm() must be awaited first!");
6812                 }
6813                 const nativeResponseValue = wasm.CResult_InvoiceSignOrCreationErrorZ_clone(orig);
6814                 return nativeResponseValue;
6815         }
6816         // struct LDKCOption_FilterZ COption_FilterZ_some(struct LDKFilter o);
6817         export function COption_FilterZ_some(o: number): number {
6818                 if(!isWasmInitialized) {
6819                         throw new Error("initializeWasm() must be awaited first!");
6820                 }
6821                 const nativeResponseValue = wasm.COption_FilterZ_some(o);
6822                 return nativeResponseValue;
6823         }
6824         // struct LDKCOption_FilterZ COption_FilterZ_none(void);
6825         export function COption_FilterZ_none(): number {
6826                 if(!isWasmInitialized) {
6827                         throw new Error("initializeWasm() must be awaited first!");
6828                 }
6829                 const nativeResponseValue = wasm.COption_FilterZ_none();
6830                 return nativeResponseValue;
6831         }
6832         // void COption_FilterZ_free(struct LDKCOption_FilterZ _res);
6833         export function COption_FilterZ_free(_res: number): void {
6834                 if(!isWasmInitialized) {
6835                         throw new Error("initializeWasm() must be awaited first!");
6836                 }
6837                 const nativeResponseValue = wasm.COption_FilterZ_free(_res);
6838                 // debug statements here
6839         }
6840         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_ok(struct LDKLockedChannelMonitor o);
6841         export function CResult_LockedChannelMonitorNoneZ_ok(o: number): number {
6842                 if(!isWasmInitialized) {
6843                         throw new Error("initializeWasm() must be awaited first!");
6844                 }
6845                 const nativeResponseValue = wasm.CResult_LockedChannelMonitorNoneZ_ok(o);
6846                 return nativeResponseValue;
6847         }
6848         // struct LDKCResult_LockedChannelMonitorNoneZ CResult_LockedChannelMonitorNoneZ_err(void);
6849         export function CResult_LockedChannelMonitorNoneZ_err(): number {
6850                 if(!isWasmInitialized) {
6851                         throw new Error("initializeWasm() must be awaited first!");
6852                 }
6853                 const nativeResponseValue = wasm.CResult_LockedChannelMonitorNoneZ_err();
6854                 return nativeResponseValue;
6855         }
6856         // void CResult_LockedChannelMonitorNoneZ_free(struct LDKCResult_LockedChannelMonitorNoneZ _res);
6857         export function CResult_LockedChannelMonitorNoneZ_free(_res: number): void {
6858                 if(!isWasmInitialized) {
6859                         throw new Error("initializeWasm() must be awaited first!");
6860                 }
6861                 const nativeResponseValue = wasm.CResult_LockedChannelMonitorNoneZ_free(_res);
6862                 // debug statements here
6863         }
6864         // void CVec_OutPointZ_free(struct LDKCVec_OutPointZ _res);
6865         export function CVec_OutPointZ_free(_res: number[]): void {
6866                 if(!isWasmInitialized) {
6867                         throw new Error("initializeWasm() must be awaited first!");
6868                 }
6869                 const nativeResponseValue = wasm.CVec_OutPointZ_free(_res);
6870                 // debug statements here
6871         }
6872         // void PaymentPurpose_free(struct LDKPaymentPurpose this_ptr);
6873         export function PaymentPurpose_free(this_ptr: number): void {
6874                 if(!isWasmInitialized) {
6875                         throw new Error("initializeWasm() must be awaited first!");
6876                 }
6877                 const nativeResponseValue = wasm.PaymentPurpose_free(this_ptr);
6878                 // debug statements here
6879         }
6880         // struct LDKPaymentPurpose PaymentPurpose_clone(const struct LDKPaymentPurpose *NONNULL_PTR orig);
6881         export function PaymentPurpose_clone(orig: number): number {
6882                 if(!isWasmInitialized) {
6883                         throw new Error("initializeWasm() must be awaited first!");
6884                 }
6885                 const nativeResponseValue = wasm.PaymentPurpose_clone(orig);
6886                 return nativeResponseValue;
6887         }
6888         // struct LDKPaymentPurpose PaymentPurpose_invoice_payment(struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_secret, uint64_t user_payment_id);
6889         export function PaymentPurpose_invoice_payment(payment_preimage: Uint8Array, payment_secret: Uint8Array, user_payment_id: number): number {
6890                 if(!isWasmInitialized) {
6891                         throw new Error("initializeWasm() must be awaited first!");
6892                 }
6893                 const nativeResponseValue = wasm.PaymentPurpose_invoice_payment(encodeArray(payment_preimage), encodeArray(payment_secret), user_payment_id);
6894                 return nativeResponseValue;
6895         }
6896         // struct LDKPaymentPurpose PaymentPurpose_spontaneous_payment(struct LDKThirtyTwoBytes a);
6897         export function PaymentPurpose_spontaneous_payment(a: Uint8Array): number {
6898                 if(!isWasmInitialized) {
6899                         throw new Error("initializeWasm() must be awaited first!");
6900                 }
6901                 const nativeResponseValue = wasm.PaymentPurpose_spontaneous_payment(encodeArray(a));
6902                 return nativeResponseValue;
6903         }
6904         // void ClosureReason_free(struct LDKClosureReason this_ptr);
6905         export function ClosureReason_free(this_ptr: number): void {
6906                 if(!isWasmInitialized) {
6907                         throw new Error("initializeWasm() must be awaited first!");
6908                 }
6909                 const nativeResponseValue = wasm.ClosureReason_free(this_ptr);
6910                 // debug statements here
6911         }
6912         // struct LDKClosureReason ClosureReason_clone(const struct LDKClosureReason *NONNULL_PTR orig);
6913         export function ClosureReason_clone(orig: number): number {
6914                 if(!isWasmInitialized) {
6915                         throw new Error("initializeWasm() must be awaited first!");
6916                 }
6917                 const nativeResponseValue = wasm.ClosureReason_clone(orig);
6918                 return nativeResponseValue;
6919         }
6920         // struct LDKClosureReason ClosureReason_counterparty_force_closed(struct LDKStr peer_msg);
6921         export function ClosureReason_counterparty_force_closed(peer_msg: String): number {
6922                 if(!isWasmInitialized) {
6923                         throw new Error("initializeWasm() must be awaited first!");
6924                 }
6925                 const nativeResponseValue = wasm.ClosureReason_counterparty_force_closed(peer_msg);
6926                 return nativeResponseValue;
6927         }
6928         // struct LDKClosureReason ClosureReason_holder_force_closed(void);
6929         export function ClosureReason_holder_force_closed(): number {
6930                 if(!isWasmInitialized) {
6931                         throw new Error("initializeWasm() must be awaited first!");
6932                 }
6933                 const nativeResponseValue = wasm.ClosureReason_holder_force_closed();
6934                 return nativeResponseValue;
6935         }
6936         // struct LDKClosureReason ClosureReason_cooperative_closure(void);
6937         export function ClosureReason_cooperative_closure(): number {
6938                 if(!isWasmInitialized) {
6939                         throw new Error("initializeWasm() must be awaited first!");
6940                 }
6941                 const nativeResponseValue = wasm.ClosureReason_cooperative_closure();
6942                 return nativeResponseValue;
6943         }
6944         // struct LDKClosureReason ClosureReason_commitment_tx_confirmed(void);
6945         export function ClosureReason_commitment_tx_confirmed(): number {
6946                 if(!isWasmInitialized) {
6947                         throw new Error("initializeWasm() must be awaited first!");
6948                 }
6949                 const nativeResponseValue = wasm.ClosureReason_commitment_tx_confirmed();
6950                 return nativeResponseValue;
6951         }
6952         // struct LDKClosureReason ClosureReason_processing_error(struct LDKStr err);
6953         export function ClosureReason_processing_error(err: String): number {
6954                 if(!isWasmInitialized) {
6955                         throw new Error("initializeWasm() must be awaited first!");
6956                 }
6957                 const nativeResponseValue = wasm.ClosureReason_processing_error(err);
6958                 return nativeResponseValue;
6959         }
6960         // struct LDKClosureReason ClosureReason_disconnected_peer(void);
6961         export function ClosureReason_disconnected_peer(): number {
6962                 if(!isWasmInitialized) {
6963                         throw new Error("initializeWasm() must be awaited first!");
6964                 }
6965                 const nativeResponseValue = wasm.ClosureReason_disconnected_peer();
6966                 return nativeResponseValue;
6967         }
6968         // struct LDKClosureReason ClosureReason_outdated_channel_manager(void);
6969         export function ClosureReason_outdated_channel_manager(): number {
6970                 if(!isWasmInitialized) {
6971                         throw new Error("initializeWasm() must be awaited first!");
6972                 }
6973                 const nativeResponseValue = wasm.ClosureReason_outdated_channel_manager();
6974                 return nativeResponseValue;
6975         }
6976         // struct LDKCVec_u8Z ClosureReason_write(const struct LDKClosureReason *NONNULL_PTR obj);
6977         export function ClosureReason_write(obj: number): Uint8Array {
6978                 if(!isWasmInitialized) {
6979                         throw new Error("initializeWasm() must be awaited first!");
6980                 }
6981                 const nativeResponseValue = wasm.ClosureReason_write(obj);
6982                 return decodeArray(nativeResponseValue);
6983         }
6984         // void Event_free(struct LDKEvent this_ptr);
6985         export function Event_free(this_ptr: number): void {
6986                 if(!isWasmInitialized) {
6987                         throw new Error("initializeWasm() must be awaited first!");
6988                 }
6989                 const nativeResponseValue = wasm.Event_free(this_ptr);
6990                 // debug statements here
6991         }
6992         // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
6993         export function Event_clone(orig: number): number {
6994                 if(!isWasmInitialized) {
6995                         throw new Error("initializeWasm() must be awaited first!");
6996                 }
6997                 const nativeResponseValue = wasm.Event_clone(orig);
6998                 return nativeResponseValue;
6999         }
7000         // 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);
7001         export function Event_funding_generation_ready(temporary_channel_id: Uint8Array, channel_value_satoshis: number, output_script: Uint8Array, user_channel_id: number): number {
7002                 if(!isWasmInitialized) {
7003                         throw new Error("initializeWasm() must be awaited first!");
7004                 }
7005                 const nativeResponseValue = wasm.Event_funding_generation_ready(encodeArray(temporary_channel_id), channel_value_satoshis, encodeArray(output_script), user_channel_id);
7006                 return nativeResponseValue;
7007         }
7008         // struct LDKEvent Event_payment_received(struct LDKThirtyTwoBytes payment_hash, uint64_t amt, struct LDKPaymentPurpose purpose);
7009         export function Event_payment_received(payment_hash: Uint8Array, amt: number, purpose: number): number {
7010                 if(!isWasmInitialized) {
7011                         throw new Error("initializeWasm() must be awaited first!");
7012                 }
7013                 const nativeResponseValue = wasm.Event_payment_received(encodeArray(payment_hash), amt, purpose);
7014                 return nativeResponseValue;
7015         }
7016         // struct LDKEvent Event_payment_sent(struct LDKThirtyTwoBytes payment_preimage, struct LDKThirtyTwoBytes payment_hash);
7017         export function Event_payment_sent(payment_preimage: Uint8Array, payment_hash: Uint8Array): number {
7018                 if(!isWasmInitialized) {
7019                         throw new Error("initializeWasm() must be awaited first!");
7020                 }
7021                 const nativeResponseValue = wasm.Event_payment_sent(encodeArray(payment_preimage), encodeArray(payment_hash));
7022                 return nativeResponseValue;
7023         }
7024         // 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);
7025         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 {
7026                 if(!isWasmInitialized) {
7027                         throw new Error("initializeWasm() must be awaited first!");
7028                 }
7029                 const nativeResponseValue = wasm.Event_payment_path_failed(encodeArray(payment_hash), rejected_by_dest, network_update, all_paths_failed, path, short_channel_id);
7030                 return nativeResponseValue;
7031         }
7032         // struct LDKEvent Event_pending_htlcs_forwardable(uint64_t time_forwardable);
7033         export function Event_pending_htlcs_forwardable(time_forwardable: number): number {
7034                 if(!isWasmInitialized) {
7035                         throw new Error("initializeWasm() must be awaited first!");
7036                 }
7037                 const nativeResponseValue = wasm.Event_pending_htlcs_forwardable(time_forwardable);
7038                 return nativeResponseValue;
7039         }
7040         // struct LDKEvent Event_spendable_outputs(struct LDKCVec_SpendableOutputDescriptorZ outputs);
7041         export function Event_spendable_outputs(outputs: number[]): number {
7042                 if(!isWasmInitialized) {
7043                         throw new Error("initializeWasm() must be awaited first!");
7044                 }
7045                 const nativeResponseValue = wasm.Event_spendable_outputs(outputs);
7046                 return nativeResponseValue;
7047         }
7048         // struct LDKEvent Event_payment_forwarded(struct LDKCOption_u64Z fee_earned_msat, bool claim_from_onchain_tx);
7049         export function Event_payment_forwarded(fee_earned_msat: number, claim_from_onchain_tx: boolean): number {
7050                 if(!isWasmInitialized) {
7051                         throw new Error("initializeWasm() must be awaited first!");
7052                 }
7053                 const nativeResponseValue = wasm.Event_payment_forwarded(fee_earned_msat, claim_from_onchain_tx);
7054                 return nativeResponseValue;
7055         }
7056         // struct LDKEvent Event_channel_closed(struct LDKThirtyTwoBytes channel_id, uint64_t user_channel_id, struct LDKClosureReason reason);
7057         export function Event_channel_closed(channel_id: Uint8Array, user_channel_id: number, reason: number): number {
7058                 if(!isWasmInitialized) {
7059                         throw new Error("initializeWasm() must be awaited first!");
7060                 }
7061                 const nativeResponseValue = wasm.Event_channel_closed(encodeArray(channel_id), user_channel_id, reason);
7062                 return nativeResponseValue;
7063         }
7064         // struct LDKEvent Event_discard_funding(struct LDKThirtyTwoBytes channel_id, struct LDKTransaction transaction);
7065         export function Event_discard_funding(channel_id: Uint8Array, transaction: Uint8Array): number {
7066                 if(!isWasmInitialized) {
7067                         throw new Error("initializeWasm() must be awaited first!");
7068                 }
7069                 const nativeResponseValue = wasm.Event_discard_funding(encodeArray(channel_id), encodeArray(transaction));
7070                 return nativeResponseValue;
7071         }
7072         // struct LDKCVec_u8Z Event_write(const struct LDKEvent *NONNULL_PTR obj);
7073         export function Event_write(obj: number): Uint8Array {
7074                 if(!isWasmInitialized) {
7075                         throw new Error("initializeWasm() must be awaited first!");
7076                 }
7077                 const nativeResponseValue = wasm.Event_write(obj);
7078                 return decodeArray(nativeResponseValue);
7079         }
7080         // void MessageSendEvent_free(struct LDKMessageSendEvent this_ptr);
7081         export function MessageSendEvent_free(this_ptr: number): void {
7082                 if(!isWasmInitialized) {
7083                         throw new Error("initializeWasm() must be awaited first!");
7084                 }
7085                 const nativeResponseValue = wasm.MessageSendEvent_free(this_ptr);
7086                 // debug statements here
7087         }
7088         // struct LDKMessageSendEvent MessageSendEvent_clone(const struct LDKMessageSendEvent *NONNULL_PTR orig);
7089         export function MessageSendEvent_clone(orig: number): number {
7090                 if(!isWasmInitialized) {
7091                         throw new Error("initializeWasm() must be awaited first!");
7092                 }
7093                 const nativeResponseValue = wasm.MessageSendEvent_clone(orig);
7094                 return nativeResponseValue;
7095         }
7096         // struct LDKMessageSendEvent MessageSendEvent_send_accept_channel(struct LDKPublicKey node_id, struct LDKAcceptChannel msg);
7097         export function MessageSendEvent_send_accept_channel(node_id: Uint8Array, msg: number): number {
7098                 if(!isWasmInitialized) {
7099                         throw new Error("initializeWasm() must be awaited first!");
7100                 }
7101                 const nativeResponseValue = wasm.MessageSendEvent_send_accept_channel(encodeArray(node_id), msg);
7102                 return nativeResponseValue;
7103         }
7104         // struct LDKMessageSendEvent MessageSendEvent_send_open_channel(struct LDKPublicKey node_id, struct LDKOpenChannel msg);
7105         export function MessageSendEvent_send_open_channel(node_id: Uint8Array, msg: number): number {
7106                 if(!isWasmInitialized) {
7107                         throw new Error("initializeWasm() must be awaited first!");
7108                 }
7109                 const nativeResponseValue = wasm.MessageSendEvent_send_open_channel(encodeArray(node_id), msg);
7110                 return nativeResponseValue;
7111         }
7112         // struct LDKMessageSendEvent MessageSendEvent_send_funding_created(struct LDKPublicKey node_id, struct LDKFundingCreated msg);
7113         export function MessageSendEvent_send_funding_created(node_id: Uint8Array, msg: number): number {
7114                 if(!isWasmInitialized) {
7115                         throw new Error("initializeWasm() must be awaited first!");
7116                 }
7117                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_created(encodeArray(node_id), msg);
7118                 return nativeResponseValue;
7119         }
7120         // struct LDKMessageSendEvent MessageSendEvent_send_funding_signed(struct LDKPublicKey node_id, struct LDKFundingSigned msg);
7121         export function MessageSendEvent_send_funding_signed(node_id: Uint8Array, msg: number): number {
7122                 if(!isWasmInitialized) {
7123                         throw new Error("initializeWasm() must be awaited first!");
7124                 }
7125                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_signed(encodeArray(node_id), msg);
7126                 return nativeResponseValue;
7127         }
7128         // struct LDKMessageSendEvent MessageSendEvent_send_funding_locked(struct LDKPublicKey node_id, struct LDKFundingLocked msg);
7129         export function MessageSendEvent_send_funding_locked(node_id: Uint8Array, msg: number): number {
7130                 if(!isWasmInitialized) {
7131                         throw new Error("initializeWasm() must be awaited first!");
7132                 }
7133                 const nativeResponseValue = wasm.MessageSendEvent_send_funding_locked(encodeArray(node_id), msg);
7134                 return nativeResponseValue;
7135         }
7136         // struct LDKMessageSendEvent MessageSendEvent_send_announcement_signatures(struct LDKPublicKey node_id, struct LDKAnnouncementSignatures msg);
7137         export function MessageSendEvent_send_announcement_signatures(node_id: Uint8Array, msg: number): number {
7138                 if(!isWasmInitialized) {
7139                         throw new Error("initializeWasm() must be awaited first!");
7140                 }
7141                 const nativeResponseValue = wasm.MessageSendEvent_send_announcement_signatures(encodeArray(node_id), msg);
7142                 return nativeResponseValue;
7143         }
7144         // struct LDKMessageSendEvent MessageSendEvent_update_htlcs(struct LDKPublicKey node_id, struct LDKCommitmentUpdate updates);
7145         export function MessageSendEvent_update_htlcs(node_id: Uint8Array, updates: number): number {
7146                 if(!isWasmInitialized) {
7147                         throw new Error("initializeWasm() must be awaited first!");
7148                 }
7149                 const nativeResponseValue = wasm.MessageSendEvent_update_htlcs(encodeArray(node_id), updates);
7150                 return nativeResponseValue;
7151         }
7152         // struct LDKMessageSendEvent MessageSendEvent_send_revoke_and_ack(struct LDKPublicKey node_id, struct LDKRevokeAndACK msg);
7153         export function MessageSendEvent_send_revoke_and_ack(node_id: Uint8Array, msg: number): number {
7154                 if(!isWasmInitialized) {
7155                         throw new Error("initializeWasm() must be awaited first!");
7156                 }
7157                 const nativeResponseValue = wasm.MessageSendEvent_send_revoke_and_ack(encodeArray(node_id), msg);
7158                 return nativeResponseValue;
7159         }
7160         // struct LDKMessageSendEvent MessageSendEvent_send_closing_signed(struct LDKPublicKey node_id, struct LDKClosingSigned msg);
7161         export function MessageSendEvent_send_closing_signed(node_id: Uint8Array, msg: number): number {
7162                 if(!isWasmInitialized) {
7163                         throw new Error("initializeWasm() must be awaited first!");
7164                 }
7165                 const nativeResponseValue = wasm.MessageSendEvent_send_closing_signed(encodeArray(node_id), msg);
7166                 return nativeResponseValue;
7167         }
7168         // struct LDKMessageSendEvent MessageSendEvent_send_shutdown(struct LDKPublicKey node_id, struct LDKShutdown msg);
7169         export function MessageSendEvent_send_shutdown(node_id: Uint8Array, msg: number): number {
7170                 if(!isWasmInitialized) {
7171                         throw new Error("initializeWasm() must be awaited first!");
7172                 }
7173                 const nativeResponseValue = wasm.MessageSendEvent_send_shutdown(encodeArray(node_id), msg);
7174                 return nativeResponseValue;
7175         }
7176         // struct LDKMessageSendEvent MessageSendEvent_send_channel_reestablish(struct LDKPublicKey node_id, struct LDKChannelReestablish msg);
7177         export function MessageSendEvent_send_channel_reestablish(node_id: Uint8Array, msg: number): number {
7178                 if(!isWasmInitialized) {
7179                         throw new Error("initializeWasm() must be awaited first!");
7180                 }
7181                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_reestablish(encodeArray(node_id), msg);
7182                 return nativeResponseValue;
7183         }
7184         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_announcement(struct LDKChannelAnnouncement msg, struct LDKChannelUpdate update_msg);
7185         export function MessageSendEvent_broadcast_channel_announcement(msg: number, update_msg: number): number {
7186                 if(!isWasmInitialized) {
7187                         throw new Error("initializeWasm() must be awaited first!");
7188                 }
7189                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_announcement(msg, update_msg);
7190                 return nativeResponseValue;
7191         }
7192         // struct LDKMessageSendEvent MessageSendEvent_broadcast_node_announcement(struct LDKNodeAnnouncement msg);
7193         export function MessageSendEvent_broadcast_node_announcement(msg: number): number {
7194                 if(!isWasmInitialized) {
7195                         throw new Error("initializeWasm() must be awaited first!");
7196                 }
7197                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_node_announcement(msg);
7198                 return nativeResponseValue;
7199         }
7200         // struct LDKMessageSendEvent MessageSendEvent_broadcast_channel_update(struct LDKChannelUpdate msg);
7201         export function MessageSendEvent_broadcast_channel_update(msg: number): number {
7202                 if(!isWasmInitialized) {
7203                         throw new Error("initializeWasm() must be awaited first!");
7204                 }
7205                 const nativeResponseValue = wasm.MessageSendEvent_broadcast_channel_update(msg);
7206                 return nativeResponseValue;
7207         }
7208         // struct LDKMessageSendEvent MessageSendEvent_send_channel_update(struct LDKPublicKey node_id, struct LDKChannelUpdate msg);
7209         export function MessageSendEvent_send_channel_update(node_id: Uint8Array, msg: number): number {
7210                 if(!isWasmInitialized) {
7211                         throw new Error("initializeWasm() must be awaited first!");
7212                 }
7213                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_update(encodeArray(node_id), msg);
7214                 return nativeResponseValue;
7215         }
7216         // struct LDKMessageSendEvent MessageSendEvent_handle_error(struct LDKPublicKey node_id, struct LDKErrorAction action);
7217         export function MessageSendEvent_handle_error(node_id: Uint8Array, action: number): number {
7218                 if(!isWasmInitialized) {
7219                         throw new Error("initializeWasm() must be awaited first!");
7220                 }
7221                 const nativeResponseValue = wasm.MessageSendEvent_handle_error(encodeArray(node_id), action);
7222                 return nativeResponseValue;
7223         }
7224         // struct LDKMessageSendEvent MessageSendEvent_send_channel_range_query(struct LDKPublicKey node_id, struct LDKQueryChannelRange msg);
7225         export function MessageSendEvent_send_channel_range_query(node_id: Uint8Array, msg: number): number {
7226                 if(!isWasmInitialized) {
7227                         throw new Error("initializeWasm() must be awaited first!");
7228                 }
7229                 const nativeResponseValue = wasm.MessageSendEvent_send_channel_range_query(encodeArray(node_id), msg);
7230                 return nativeResponseValue;
7231         }
7232         // struct LDKMessageSendEvent MessageSendEvent_send_short_ids_query(struct LDKPublicKey node_id, struct LDKQueryShortChannelIds msg);
7233         export function MessageSendEvent_send_short_ids_query(node_id: Uint8Array, msg: number): number {
7234                 if(!isWasmInitialized) {
7235                         throw new Error("initializeWasm() must be awaited first!");
7236                 }
7237                 const nativeResponseValue = wasm.MessageSendEvent_send_short_ids_query(encodeArray(node_id), msg);
7238                 return nativeResponseValue;
7239         }
7240         // struct LDKMessageSendEvent MessageSendEvent_send_reply_channel_range(struct LDKPublicKey node_id, struct LDKReplyChannelRange msg);
7241         export function MessageSendEvent_send_reply_channel_range(node_id: Uint8Array, msg: number): number {
7242                 if(!isWasmInitialized) {
7243                         throw new Error("initializeWasm() must be awaited first!");
7244                 }
7245                 const nativeResponseValue = wasm.MessageSendEvent_send_reply_channel_range(encodeArray(node_id), msg);
7246                 return nativeResponseValue;
7247         }
7248         // void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr);
7249         export function MessageSendEventsProvider_free(this_ptr: number): void {
7250                 if(!isWasmInitialized) {
7251                         throw new Error("initializeWasm() must be awaited first!");
7252                 }
7253                 const nativeResponseValue = wasm.MessageSendEventsProvider_free(this_ptr);
7254                 // debug statements here
7255         }
7256         // void EventsProvider_free(struct LDKEventsProvider this_ptr);
7257         export function EventsProvider_free(this_ptr: number): void {
7258                 if(!isWasmInitialized) {
7259                         throw new Error("initializeWasm() must be awaited first!");
7260                 }
7261                 const nativeResponseValue = wasm.EventsProvider_free(this_ptr);
7262                 // debug statements here
7263         }
7264         // void EventHandler_free(struct LDKEventHandler this_ptr);
7265         export function EventHandler_free(this_ptr: number): void {
7266                 if(!isWasmInitialized) {
7267                         throw new Error("initializeWasm() must be awaited first!");
7268                 }
7269                 const nativeResponseValue = wasm.EventHandler_free(this_ptr);
7270                 // debug statements here
7271         }
7272         // void APIError_free(struct LDKAPIError this_ptr);
7273         export function APIError_free(this_ptr: number): void {
7274                 if(!isWasmInitialized) {
7275                         throw new Error("initializeWasm() must be awaited first!");
7276                 }
7277                 const nativeResponseValue = wasm.APIError_free(this_ptr);
7278                 // debug statements here
7279         }
7280         // struct LDKAPIError APIError_clone(const struct LDKAPIError *NONNULL_PTR orig);
7281         export function APIError_clone(orig: number): number {
7282                 if(!isWasmInitialized) {
7283                         throw new Error("initializeWasm() must be awaited first!");
7284                 }
7285                 const nativeResponseValue = wasm.APIError_clone(orig);
7286                 return nativeResponseValue;
7287         }
7288         // struct LDKAPIError APIError_apimisuse_error(struct LDKStr err);
7289         export function APIError_apimisuse_error(err: String): number {
7290                 if(!isWasmInitialized) {
7291                         throw new Error("initializeWasm() must be awaited first!");
7292                 }
7293                 const nativeResponseValue = wasm.APIError_apimisuse_error(err);
7294                 return nativeResponseValue;
7295         }
7296         // struct LDKAPIError APIError_fee_rate_too_high(struct LDKStr err, uint32_t feerate);
7297         export function APIError_fee_rate_too_high(err: String, feerate: number): number {
7298                 if(!isWasmInitialized) {
7299                         throw new Error("initializeWasm() must be awaited first!");
7300                 }
7301                 const nativeResponseValue = wasm.APIError_fee_rate_too_high(err, feerate);
7302                 return nativeResponseValue;
7303         }
7304         // struct LDKAPIError APIError_route_error(struct LDKStr err);
7305         export function APIError_route_error(err: String): number {
7306                 if(!isWasmInitialized) {
7307                         throw new Error("initializeWasm() must be awaited first!");
7308                 }
7309                 const nativeResponseValue = wasm.APIError_route_error(err);
7310                 return nativeResponseValue;
7311         }
7312         // struct LDKAPIError APIError_channel_unavailable(struct LDKStr err);
7313         export function APIError_channel_unavailable(err: String): number {
7314                 if(!isWasmInitialized) {
7315                         throw new Error("initializeWasm() must be awaited first!");
7316                 }
7317                 const nativeResponseValue = wasm.APIError_channel_unavailable(err);
7318                 return nativeResponseValue;
7319         }
7320         // struct LDKAPIError APIError_monitor_update_failed(void);
7321         export function APIError_monitor_update_failed(): number {
7322                 if(!isWasmInitialized) {
7323                         throw new Error("initializeWasm() must be awaited first!");
7324                 }
7325                 const nativeResponseValue = wasm.APIError_monitor_update_failed();
7326                 return nativeResponseValue;
7327         }
7328         // struct LDKAPIError APIError_incompatible_shutdown_script(struct LDKShutdownScript script);
7329         export function APIError_incompatible_shutdown_script(script: number): number {
7330                 if(!isWasmInitialized) {
7331                         throw new Error("initializeWasm() must be awaited first!");
7332                 }
7333                 const nativeResponseValue = wasm.APIError_incompatible_shutdown_script(script);
7334                 return nativeResponseValue;
7335         }
7336         // struct LDKCResult_StringErrorZ sign(struct LDKu8slice msg, const uint8_t (*sk)[32]);
7337         export function sign(msg: Uint8Array, sk: Uint8Array): number {
7338                 if(!isWasmInitialized) {
7339                         throw new Error("initializeWasm() must be awaited first!");
7340                 }
7341                 const nativeResponseValue = wasm.sign(encodeArray(msg), encodeArray(sk));
7342                 return nativeResponseValue;
7343         }
7344         // struct LDKCResult_PublicKeyErrorZ recover_pk(struct LDKu8slice msg, struct LDKStr sig);
7345         export function recover_pk(msg: Uint8Array, sig: String): number {
7346                 if(!isWasmInitialized) {
7347                         throw new Error("initializeWasm() must be awaited first!");
7348                 }
7349                 const nativeResponseValue = wasm.recover_pk(encodeArray(msg), sig);
7350                 return nativeResponseValue;
7351         }
7352         // bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk);
7353         export function verify(msg: Uint8Array, sig: String, pk: Uint8Array): boolean {
7354                 if(!isWasmInitialized) {
7355                         throw new Error("initializeWasm() must be awaited first!");
7356                 }
7357                 const nativeResponseValue = wasm.verify(encodeArray(msg), sig, encodeArray(pk));
7358                 return nativeResponseValue;
7359         }
7360         // enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig);
7361         export function Level_clone(orig: number): Level {
7362                 if(!isWasmInitialized) {
7363                         throw new Error("initializeWasm() must be awaited first!");
7364                 }
7365                 const nativeResponseValue = wasm.Level_clone(orig);
7366                 return nativeResponseValue;
7367         }
7368         // enum LDKLevel Level_trace(void);
7369         export function Level_trace(): Level {
7370                 if(!isWasmInitialized) {
7371                         throw new Error("initializeWasm() must be awaited first!");
7372                 }
7373                 const nativeResponseValue = wasm.Level_trace();
7374                 return nativeResponseValue;
7375         }
7376         // enum LDKLevel Level_debug(void);
7377         export function Level_debug(): Level {
7378                 if(!isWasmInitialized) {
7379                         throw new Error("initializeWasm() must be awaited first!");
7380                 }
7381                 const nativeResponseValue = wasm.Level_debug();
7382                 return nativeResponseValue;
7383         }
7384         // enum LDKLevel Level_info(void);
7385         export function Level_info(): Level {
7386                 if(!isWasmInitialized) {
7387                         throw new Error("initializeWasm() must be awaited first!");
7388                 }
7389                 const nativeResponseValue = wasm.Level_info();
7390                 return nativeResponseValue;
7391         }
7392         // enum LDKLevel Level_warn(void);
7393         export function Level_warn(): Level {
7394                 if(!isWasmInitialized) {
7395                         throw new Error("initializeWasm() must be awaited first!");
7396                 }
7397                 const nativeResponseValue = wasm.Level_warn();
7398                 return nativeResponseValue;
7399         }
7400         // enum LDKLevel Level_error(void);
7401         export function Level_error(): Level {
7402                 if(!isWasmInitialized) {
7403                         throw new Error("initializeWasm() must be awaited first!");
7404                 }
7405                 const nativeResponseValue = wasm.Level_error();
7406                 return nativeResponseValue;
7407         }
7408         // bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b);
7409         export function Level_eq(a: number, b: number): boolean {
7410                 if(!isWasmInitialized) {
7411                         throw new Error("initializeWasm() must be awaited first!");
7412                 }
7413                 const nativeResponseValue = wasm.Level_eq(a, b);
7414                 return nativeResponseValue;
7415         }
7416         // uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o);
7417         export function Level_hash(o: number): number {
7418                 if(!isWasmInitialized) {
7419                         throw new Error("initializeWasm() must be awaited first!");
7420                 }
7421                 const nativeResponseValue = wasm.Level_hash(o);
7422                 return nativeResponseValue;
7423         }
7424         // MUST_USE_RES enum LDKLevel Level_max(void);
7425         export function Level_max(): Level {
7426                 if(!isWasmInitialized) {
7427                         throw new Error("initializeWasm() must be awaited first!");
7428                 }
7429                 const nativeResponseValue = wasm.Level_max();
7430                 return nativeResponseValue;
7431         }
7432         // void Logger_free(struct LDKLogger this_ptr);
7433         export function Logger_free(this_ptr: number): void {
7434                 if(!isWasmInitialized) {
7435                         throw new Error("initializeWasm() must be awaited first!");
7436                 }
7437                 const nativeResponseValue = wasm.Logger_free(this_ptr);
7438                 // debug statements here
7439         }
7440         // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_obj);
7441         export function ChannelHandshakeConfig_free(this_obj: number): void {
7442                 if(!isWasmInitialized) {
7443                         throw new Error("initializeWasm() must be awaited first!");
7444                 }
7445                 const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_obj);
7446                 // debug statements here
7447         }
7448         // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
7449         export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
7450                 if(!isWasmInitialized) {
7451                         throw new Error("initializeWasm() must be awaited first!");
7452                 }
7453                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_minimum_depth(this_ptr);
7454                 return nativeResponseValue;
7455         }
7456         // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
7457         export function ChannelHandshakeConfig_set_minimum_depth(this_ptr: number, val: number): void {
7458                 if(!isWasmInitialized) {
7459                         throw new Error("initializeWasm() must be awaited first!");
7460                 }
7461                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_minimum_depth(this_ptr, val);
7462                 // debug statements here
7463         }
7464         // uint16_t ChannelHandshakeConfig_get_our_to_self_delay(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
7465         export function ChannelHandshakeConfig_get_our_to_self_delay(this_ptr: number): number {
7466                 if(!isWasmInitialized) {
7467                         throw new Error("initializeWasm() must be awaited first!");
7468                 }
7469                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_to_self_delay(this_ptr);
7470                 return nativeResponseValue;
7471         }
7472         // void ChannelHandshakeConfig_set_our_to_self_delay(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint16_t val);
7473         export function ChannelHandshakeConfig_set_our_to_self_delay(this_ptr: number, val: number): void {
7474                 if(!isWasmInitialized) {
7475                         throw new Error("initializeWasm() must be awaited first!");
7476                 }
7477                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_to_self_delay(this_ptr, val);
7478                 // debug statements here
7479         }
7480         // uint64_t ChannelHandshakeConfig_get_our_htlc_minimum_msat(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
7481         export function ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr: number): number {
7482                 if(!isWasmInitialized) {
7483                         throw new Error("initializeWasm() must be awaited first!");
7484                 }
7485                 const nativeResponseValue = wasm.ChannelHandshakeConfig_get_our_htlc_minimum_msat(this_ptr);
7486                 return nativeResponseValue;
7487         }
7488         // void ChannelHandshakeConfig_set_our_htlc_minimum_msat(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint64_t val);
7489         export function ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr: number, val: number): void {
7490                 if(!isWasmInitialized) {
7491                         throw new Error("initializeWasm() must be awaited first!");
7492                 }
7493                 const nativeResponseValue = wasm.ChannelHandshakeConfig_set_our_htlc_minimum_msat(this_ptr, val);
7494                 // debug statements here
7495         }
7496         // 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);
7497         export function ChannelHandshakeConfig_new(minimum_depth_arg: number, our_to_self_delay_arg: number, our_htlc_minimum_msat_arg: number): number {
7498                 if(!isWasmInitialized) {
7499                         throw new Error("initializeWasm() must be awaited first!");
7500                 }
7501                 const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
7502                 return nativeResponseValue;
7503         }
7504         // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
7505         export function ChannelHandshakeConfig_clone(orig: number): number {
7506                 if(!isWasmInitialized) {
7507                         throw new Error("initializeWasm() must be awaited first!");
7508                 }
7509                 const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
7510                 return nativeResponseValue;
7511         }
7512         // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
7513         export function ChannelHandshakeConfig_default(): number {
7514                 if(!isWasmInitialized) {
7515                         throw new Error("initializeWasm() must be awaited first!");
7516                 }
7517                 const nativeResponseValue = wasm.ChannelHandshakeConfig_default();
7518                 return nativeResponseValue;
7519         }
7520         // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_obj);
7521         export function ChannelHandshakeLimits_free(this_obj: number): void {
7522                 if(!isWasmInitialized) {
7523                         throw new Error("initializeWasm() must be awaited first!");
7524                 }
7525                 const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_obj);
7526                 // debug statements here
7527         }
7528         // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7529         export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
7530                 if(!isWasmInitialized) {
7531                         throw new Error("initializeWasm() must be awaited first!");
7532                 }
7533                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr);
7534                 return nativeResponseValue;
7535         }
7536         // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7537         export function ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr: number, val: number): void {
7538                 if(!isWasmInitialized) {
7539                         throw new Error("initializeWasm() must be awaited first!");
7540                 }
7541                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_funding_satoshis(this_ptr, val);
7542                 // debug statements here
7543         }
7544         // uint64_t ChannelHandshakeLimits_get_max_htlc_minimum_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7545         export function ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr: number): number {
7546                 if(!isWasmInitialized) {
7547                         throw new Error("initializeWasm() must be awaited first!");
7548                 }
7549                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_htlc_minimum_msat(this_ptr);
7550                 return nativeResponseValue;
7551         }
7552         // void ChannelHandshakeLimits_set_max_htlc_minimum_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7553         export function ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr: number, val: number): void {
7554                 if(!isWasmInitialized) {
7555                         throw new Error("initializeWasm() must be awaited first!");
7556                 }
7557                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_htlc_minimum_msat(this_ptr, val);
7558                 // debug statements here
7559         }
7560         // uint64_t ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7561         export function ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr: number): number {
7562                 if(!isWasmInitialized) {
7563                         throw new Error("initializeWasm() must be awaited first!");
7564                 }
7565                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_htlc_value_in_flight_msat(this_ptr);
7566                 return nativeResponseValue;
7567         }
7568         // void ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7569         export function ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
7570                 if(!isWasmInitialized) {
7571                         throw new Error("initializeWasm() must be awaited first!");
7572                 }
7573                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_htlc_value_in_flight_msat(this_ptr, val);
7574                 // debug statements here
7575         }
7576         // uint64_t ChannelHandshakeLimits_get_max_channel_reserve_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7577         export function ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr: number): number {
7578                 if(!isWasmInitialized) {
7579                         throw new Error("initializeWasm() must be awaited first!");
7580                 }
7581                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_channel_reserve_satoshis(this_ptr);
7582                 return nativeResponseValue;
7583         }
7584         // void ChannelHandshakeLimits_set_max_channel_reserve_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
7585         export function ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr: number, val: number): void {
7586                 if(!isWasmInitialized) {
7587                         throw new Error("initializeWasm() must be awaited first!");
7588                 }
7589                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_channel_reserve_satoshis(this_ptr, val);
7590                 // debug statements here
7591         }
7592         // uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7593         export function ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr: number): number {
7594                 if(!isWasmInitialized) {
7595                         throw new Error("initializeWasm() must be awaited first!");
7596                 }
7597                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptr);
7598                 return nativeResponseValue;
7599         }
7600         // void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
7601         export function ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr: number, val: number): void {
7602                 if(!isWasmInitialized) {
7603                         throw new Error("initializeWasm() must be awaited first!");
7604                 }
7605                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptr, val);
7606                 // debug statements here
7607         }
7608         // uint32_t ChannelHandshakeLimits_get_max_minimum_depth(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7609         export function ChannelHandshakeLimits_get_max_minimum_depth(this_ptr: number): number {
7610                 if(!isWasmInitialized) {
7611                         throw new Error("initializeWasm() must be awaited first!");
7612                 }
7613                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_max_minimum_depth(this_ptr);
7614                 return nativeResponseValue;
7615         }
7616         // void ChannelHandshakeLimits_set_max_minimum_depth(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint32_t val);
7617         export function ChannelHandshakeLimits_set_max_minimum_depth(this_ptr: number, val: number): void {
7618                 if(!isWasmInitialized) {
7619                         throw new Error("initializeWasm() must be awaited first!");
7620                 }
7621                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_max_minimum_depth(this_ptr, val);
7622                 // debug statements here
7623         }
7624         // bool ChannelHandshakeLimits_get_force_announced_channel_preference(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7625         export function ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr: number): boolean {
7626                 if(!isWasmInitialized) {
7627                         throw new Error("initializeWasm() must be awaited first!");
7628                 }
7629                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_force_announced_channel_preference(this_ptr);
7630                 return nativeResponseValue;
7631         }
7632         // void ChannelHandshakeLimits_set_force_announced_channel_preference(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, bool val);
7633         export function ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr: number, val: boolean): void {
7634                 if(!isWasmInitialized) {
7635                         throw new Error("initializeWasm() must be awaited first!");
7636                 }
7637                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_force_announced_channel_preference(this_ptr, val);
7638                 // debug statements here
7639         }
7640         // uint16_t ChannelHandshakeLimits_get_their_to_self_delay(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
7641         export function ChannelHandshakeLimits_get_their_to_self_delay(this_ptr: number): number {
7642                 if(!isWasmInitialized) {
7643                         throw new Error("initializeWasm() must be awaited first!");
7644                 }
7645                 const nativeResponseValue = wasm.ChannelHandshakeLimits_get_their_to_self_delay(this_ptr);
7646                 return nativeResponseValue;
7647         }
7648         // void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val);
7649         export function ChannelHandshakeLimits_set_their_to_self_delay(this_ptr: number, val: number): void {
7650                 if(!isWasmInitialized) {
7651                         throw new Error("initializeWasm() must be awaited first!");
7652                 }
7653                 const nativeResponseValue = wasm.ChannelHandshakeLimits_set_their_to_self_delay(this_ptr, val);
7654                 // debug statements here
7655         }
7656         // 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);
7657         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 {
7658                 if(!isWasmInitialized) {
7659                         throw new Error("initializeWasm() must be awaited first!");
7660                 }
7661                 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);
7662                 return nativeResponseValue;
7663         }
7664         // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
7665         export function ChannelHandshakeLimits_clone(orig: number): number {
7666                 if(!isWasmInitialized) {
7667                         throw new Error("initializeWasm() must be awaited first!");
7668                 }
7669                 const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
7670                 return nativeResponseValue;
7671         }
7672         // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
7673         export function ChannelHandshakeLimits_default(): number {
7674                 if(!isWasmInitialized) {
7675                         throw new Error("initializeWasm() must be awaited first!");
7676                 }
7677                 const nativeResponseValue = wasm.ChannelHandshakeLimits_default();
7678                 return nativeResponseValue;
7679         }
7680         // void ChannelConfig_free(struct LDKChannelConfig this_obj);
7681         export function ChannelConfig_free(this_obj: number): void {
7682                 if(!isWasmInitialized) {
7683                         throw new Error("initializeWasm() must be awaited first!");
7684                 }
7685                 const nativeResponseValue = wasm.ChannelConfig_free(this_obj);
7686                 // debug statements here
7687         }
7688         // uint32_t ChannelConfig_get_forwarding_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7689         export function ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr: number): number {
7690                 if(!isWasmInitialized) {
7691                         throw new Error("initializeWasm() must be awaited first!");
7692                 }
7693                 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_proportional_millionths(this_ptr);
7694                 return nativeResponseValue;
7695         }
7696         // void ChannelConfig_set_forwarding_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
7697         export function ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr: number, val: number): void {
7698                 if(!isWasmInitialized) {
7699                         throw new Error("initializeWasm() must be awaited first!");
7700                 }
7701                 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_proportional_millionths(this_ptr, val);
7702                 // debug statements here
7703         }
7704         // uint32_t ChannelConfig_get_forwarding_fee_base_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7705         export function ChannelConfig_get_forwarding_fee_base_msat(this_ptr: number): number {
7706                 if(!isWasmInitialized) {
7707                         throw new Error("initializeWasm() must be awaited first!");
7708                 }
7709                 const nativeResponseValue = wasm.ChannelConfig_get_forwarding_fee_base_msat(this_ptr);
7710                 return nativeResponseValue;
7711         }
7712         // void ChannelConfig_set_forwarding_fee_base_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
7713         export function ChannelConfig_set_forwarding_fee_base_msat(this_ptr: number, val: number): void {
7714                 if(!isWasmInitialized) {
7715                         throw new Error("initializeWasm() must be awaited first!");
7716                 }
7717                 const nativeResponseValue = wasm.ChannelConfig_set_forwarding_fee_base_msat(this_ptr, val);
7718                 // debug statements here
7719         }
7720         // uint16_t ChannelConfig_get_cltv_expiry_delta(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7721         export function ChannelConfig_get_cltv_expiry_delta(this_ptr: number): number {
7722                 if(!isWasmInitialized) {
7723                         throw new Error("initializeWasm() must be awaited first!");
7724                 }
7725                 const nativeResponseValue = wasm.ChannelConfig_get_cltv_expiry_delta(this_ptr);
7726                 return nativeResponseValue;
7727         }
7728         // void ChannelConfig_set_cltv_expiry_delta(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint16_t val);
7729         export function ChannelConfig_set_cltv_expiry_delta(this_ptr: number, val: number): void {
7730                 if(!isWasmInitialized) {
7731                         throw new Error("initializeWasm() must be awaited first!");
7732                 }
7733                 const nativeResponseValue = wasm.ChannelConfig_set_cltv_expiry_delta(this_ptr, val);
7734                 // debug statements here
7735         }
7736         // bool ChannelConfig_get_announced_channel(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7737         export function ChannelConfig_get_announced_channel(this_ptr: number): boolean {
7738                 if(!isWasmInitialized) {
7739                         throw new Error("initializeWasm() must be awaited first!");
7740                 }
7741                 const nativeResponseValue = wasm.ChannelConfig_get_announced_channel(this_ptr);
7742                 return nativeResponseValue;
7743         }
7744         // void ChannelConfig_set_announced_channel(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
7745         export function ChannelConfig_set_announced_channel(this_ptr: number, val: boolean): void {
7746                 if(!isWasmInitialized) {
7747                         throw new Error("initializeWasm() must be awaited first!");
7748                 }
7749                 const nativeResponseValue = wasm.ChannelConfig_set_announced_channel(this_ptr, val);
7750                 // debug statements here
7751         }
7752         // bool ChannelConfig_get_commit_upfront_shutdown_pubkey(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7753         export function ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr: number): boolean {
7754                 if(!isWasmInitialized) {
7755                         throw new Error("initializeWasm() must be awaited first!");
7756                 }
7757                 const nativeResponseValue = wasm.ChannelConfig_get_commit_upfront_shutdown_pubkey(this_ptr);
7758                 return nativeResponseValue;
7759         }
7760         // void ChannelConfig_set_commit_upfront_shutdown_pubkey(struct LDKChannelConfig *NONNULL_PTR this_ptr, bool val);
7761         export function ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr: number, val: boolean): void {
7762                 if(!isWasmInitialized) {
7763                         throw new Error("initializeWasm() must be awaited first!");
7764                 }
7765                 const nativeResponseValue = wasm.ChannelConfig_set_commit_upfront_shutdown_pubkey(this_ptr, val);
7766                 // debug statements here
7767         }
7768         // uint64_t ChannelConfig_get_max_dust_htlc_exposure_msat(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7769         export function ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr: number): number {
7770                 if(!isWasmInitialized) {
7771                         throw new Error("initializeWasm() must be awaited first!");
7772                 }
7773                 const nativeResponseValue = wasm.ChannelConfig_get_max_dust_htlc_exposure_msat(this_ptr);
7774                 return nativeResponseValue;
7775         }
7776         // void ChannelConfig_set_max_dust_htlc_exposure_msat(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
7777         export function ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr: number, val: number): void {
7778                 if(!isWasmInitialized) {
7779                         throw new Error("initializeWasm() must be awaited first!");
7780                 }
7781                 const nativeResponseValue = wasm.ChannelConfig_set_max_dust_htlc_exposure_msat(this_ptr, val);
7782                 // debug statements here
7783         }
7784         // uint64_t ChannelConfig_get_force_close_avoidance_max_fee_satoshis(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
7785         export function ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr: number): number {
7786                 if(!isWasmInitialized) {
7787                         throw new Error("initializeWasm() must be awaited first!");
7788                 }
7789                 const nativeResponseValue = wasm.ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this_ptr);
7790                 return nativeResponseValue;
7791         }
7792         // void ChannelConfig_set_force_close_avoidance_max_fee_satoshis(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint64_t val);
7793         export function ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr: number, val: number): void {
7794                 if(!isWasmInitialized) {
7795                         throw new Error("initializeWasm() must be awaited first!");
7796                 }
7797                 const nativeResponseValue = wasm.ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this_ptr, val);
7798                 // debug statements here
7799         }
7800         // 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);
7801         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 {
7802                 if(!isWasmInitialized) {
7803                         throw new Error("initializeWasm() must be awaited first!");
7804                 }
7805                 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);
7806                 return nativeResponseValue;
7807         }
7808         // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
7809         export function ChannelConfig_clone(orig: number): number {
7810                 if(!isWasmInitialized) {
7811                         throw new Error("initializeWasm() must be awaited first!");
7812                 }
7813                 const nativeResponseValue = wasm.ChannelConfig_clone(orig);
7814                 return nativeResponseValue;
7815         }
7816         // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
7817         export function ChannelConfig_default(): number {
7818                 if(!isWasmInitialized) {
7819                         throw new Error("initializeWasm() must be awaited first!");
7820                 }
7821                 const nativeResponseValue = wasm.ChannelConfig_default();
7822                 return nativeResponseValue;
7823         }
7824         // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
7825         export function ChannelConfig_write(obj: number): Uint8Array {
7826                 if(!isWasmInitialized) {
7827                         throw new Error("initializeWasm() must be awaited first!");
7828                 }
7829                 const nativeResponseValue = wasm.ChannelConfig_write(obj);
7830                 return decodeArray(nativeResponseValue);
7831         }
7832         // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
7833         export function ChannelConfig_read(ser: Uint8Array): number {
7834                 if(!isWasmInitialized) {
7835                         throw new Error("initializeWasm() must be awaited first!");
7836                 }
7837                 const nativeResponseValue = wasm.ChannelConfig_read(encodeArray(ser));
7838                 return nativeResponseValue;
7839         }
7840         // void UserConfig_free(struct LDKUserConfig this_obj);
7841         export function UserConfig_free(this_obj: number): void {
7842                 if(!isWasmInitialized) {
7843                         throw new Error("initializeWasm() must be awaited first!");
7844                 }
7845                 const nativeResponseValue = wasm.UserConfig_free(this_obj);
7846                 // debug statements here
7847         }
7848         // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
7849         export function UserConfig_get_own_channel_config(this_ptr: number): number {
7850                 if(!isWasmInitialized) {
7851                         throw new Error("initializeWasm() must be awaited first!");
7852                 }
7853                 const nativeResponseValue = wasm.UserConfig_get_own_channel_config(this_ptr);
7854                 return nativeResponseValue;
7855         }
7856         // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
7857         export function UserConfig_set_own_channel_config(this_ptr: number, val: number): void {
7858                 if(!isWasmInitialized) {
7859                         throw new Error("initializeWasm() must be awaited first!");
7860                 }
7861                 const nativeResponseValue = wasm.UserConfig_set_own_channel_config(this_ptr, val);
7862                 // debug statements here
7863         }
7864         // struct LDKChannelHandshakeLimits UserConfig_get_peer_channel_config_limits(const struct LDKUserConfig *NONNULL_PTR this_ptr);
7865         export function UserConfig_get_peer_channel_config_limits(this_ptr: number): number {
7866                 if(!isWasmInitialized) {
7867                         throw new Error("initializeWasm() must be awaited first!");
7868                 }
7869                 const nativeResponseValue = wasm.UserConfig_get_peer_channel_config_limits(this_ptr);
7870                 return nativeResponseValue;
7871         }
7872         // void UserConfig_set_peer_channel_config_limits(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeLimits val);
7873         export function UserConfig_set_peer_channel_config_limits(this_ptr: number, val: number): void {
7874                 if(!isWasmInitialized) {
7875                         throw new Error("initializeWasm() must be awaited first!");
7876                 }
7877                 const nativeResponseValue = wasm.UserConfig_set_peer_channel_config_limits(this_ptr, val);
7878                 // debug statements here
7879         }
7880         // struct LDKChannelConfig UserConfig_get_channel_options(const struct LDKUserConfig *NONNULL_PTR this_ptr);
7881         export function UserConfig_get_channel_options(this_ptr: number): number {
7882                 if(!isWasmInitialized) {
7883                         throw new Error("initializeWasm() must be awaited first!");
7884                 }
7885                 const nativeResponseValue = wasm.UserConfig_get_channel_options(this_ptr);
7886                 return nativeResponseValue;
7887         }
7888         // void UserConfig_set_channel_options(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelConfig val);
7889         export function UserConfig_set_channel_options(this_ptr: number, val: number): void {
7890                 if(!isWasmInitialized) {
7891                         throw new Error("initializeWasm() must be awaited first!");
7892                 }
7893                 const nativeResponseValue = wasm.UserConfig_set_channel_options(this_ptr, val);
7894                 // debug statements here
7895         }
7896         // bool UserConfig_get_accept_forwards_to_priv_channels(const struct LDKUserConfig *NONNULL_PTR this_ptr);
7897         export function UserConfig_get_accept_forwards_to_priv_channels(this_ptr: number): boolean {
7898                 if(!isWasmInitialized) {
7899                         throw new Error("initializeWasm() must be awaited first!");
7900                 }
7901                 const nativeResponseValue = wasm.UserConfig_get_accept_forwards_to_priv_channels(this_ptr);
7902                 return nativeResponseValue;
7903         }
7904         // void UserConfig_set_accept_forwards_to_priv_channels(struct LDKUserConfig *NONNULL_PTR this_ptr, bool val);
7905         export function UserConfig_set_accept_forwards_to_priv_channels(this_ptr: number, val: boolean): void {
7906                 if(!isWasmInitialized) {
7907                         throw new Error("initializeWasm() must be awaited first!");
7908                 }
7909                 const nativeResponseValue = wasm.UserConfig_set_accept_forwards_to_priv_channels(this_ptr, val);
7910                 // debug statements here
7911         }
7912         // 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);
7913         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 {
7914                 if(!isWasmInitialized) {
7915                         throw new Error("initializeWasm() must be awaited first!");
7916                 }
7917                 const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg, accept_forwards_to_priv_channels_arg);
7918                 return nativeResponseValue;
7919         }
7920         // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
7921         export function UserConfig_clone(orig: number): number {
7922                 if(!isWasmInitialized) {
7923                         throw new Error("initializeWasm() must be awaited first!");
7924                 }
7925                 const nativeResponseValue = wasm.UserConfig_clone(orig);
7926                 return nativeResponseValue;
7927         }
7928         // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
7929         export function UserConfig_default(): number {
7930                 if(!isWasmInitialized) {
7931                         throw new Error("initializeWasm() must be awaited first!");
7932                 }
7933                 const nativeResponseValue = wasm.UserConfig_default();
7934                 return nativeResponseValue;
7935         }
7936         // void BestBlock_free(struct LDKBestBlock this_obj);
7937         export function BestBlock_free(this_obj: number): void {
7938                 if(!isWasmInitialized) {
7939                         throw new Error("initializeWasm() must be awaited first!");
7940                 }
7941                 const nativeResponseValue = wasm.BestBlock_free(this_obj);
7942                 // debug statements here
7943         }
7944         // struct LDKBestBlock BestBlock_clone(const struct LDKBestBlock *NONNULL_PTR orig);
7945         export function BestBlock_clone(orig: number): number {
7946                 if(!isWasmInitialized) {
7947                         throw new Error("initializeWasm() must be awaited first!");
7948                 }
7949                 const nativeResponseValue = wasm.BestBlock_clone(orig);
7950                 return nativeResponseValue;
7951         }
7952         // MUST_USE_RES struct LDKBestBlock BestBlock_from_genesis(enum LDKNetwork network);
7953         export function BestBlock_from_genesis(network: Network): number {
7954                 if(!isWasmInitialized) {
7955                         throw new Error("initializeWasm() must be awaited first!");
7956                 }
7957                 const nativeResponseValue = wasm.BestBlock_from_genesis(network);
7958                 return nativeResponseValue;
7959         }
7960         // MUST_USE_RES struct LDKBestBlock BestBlock_new(struct LDKThirtyTwoBytes block_hash, uint32_t height);
7961         export function BestBlock_new(block_hash: Uint8Array, height: number): number {
7962                 if(!isWasmInitialized) {
7963                         throw new Error("initializeWasm() must be awaited first!");
7964                 }
7965                 const nativeResponseValue = wasm.BestBlock_new(encodeArray(block_hash), height);
7966                 return nativeResponseValue;
7967         }
7968         // MUST_USE_RES struct LDKThirtyTwoBytes BestBlock_block_hash(const struct LDKBestBlock *NONNULL_PTR this_arg);
7969         export function BestBlock_block_hash(this_arg: number): Uint8Array {
7970                 if(!isWasmInitialized) {
7971                         throw new Error("initializeWasm() must be awaited first!");
7972                 }
7973                 const nativeResponseValue = wasm.BestBlock_block_hash(this_arg);
7974                 return decodeArray(nativeResponseValue);
7975         }
7976         // MUST_USE_RES uint32_t BestBlock_height(const struct LDKBestBlock *NONNULL_PTR this_arg);
7977         export function BestBlock_height(this_arg: number): number {
7978                 if(!isWasmInitialized) {
7979                         throw new Error("initializeWasm() must be awaited first!");
7980                 }
7981                 const nativeResponseValue = wasm.BestBlock_height(this_arg);
7982                 return nativeResponseValue;
7983         }
7984         // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
7985         export function AccessError_clone(orig: number): AccessError {
7986                 if(!isWasmInitialized) {
7987                         throw new Error("initializeWasm() must be awaited first!");
7988                 }
7989                 const nativeResponseValue = wasm.AccessError_clone(orig);
7990                 return nativeResponseValue;
7991         }
7992         // enum LDKAccessError AccessError_unknown_chain(void);
7993         export function AccessError_unknown_chain(): AccessError {
7994                 if(!isWasmInitialized) {
7995                         throw new Error("initializeWasm() must be awaited first!");
7996                 }
7997                 const nativeResponseValue = wasm.AccessError_unknown_chain();
7998                 return nativeResponseValue;
7999         }
8000         // enum LDKAccessError AccessError_unknown_tx(void);
8001         export function AccessError_unknown_tx(): AccessError {
8002                 if(!isWasmInitialized) {
8003                         throw new Error("initializeWasm() must be awaited first!");
8004                 }
8005                 const nativeResponseValue = wasm.AccessError_unknown_tx();
8006                 return nativeResponseValue;
8007         }
8008         // void Access_free(struct LDKAccess this_ptr);
8009         export function Access_free(this_ptr: number): void {
8010                 if(!isWasmInitialized) {
8011                         throw new Error("initializeWasm() must be awaited first!");
8012                 }
8013                 const nativeResponseValue = wasm.Access_free(this_ptr);
8014                 // debug statements here
8015         }
8016         // void Listen_free(struct LDKListen this_ptr);
8017         export function Listen_free(this_ptr: number): void {
8018                 if(!isWasmInitialized) {
8019                         throw new Error("initializeWasm() must be awaited first!");
8020                 }
8021                 const nativeResponseValue = wasm.Listen_free(this_ptr);
8022                 // debug statements here
8023         }
8024         // void Confirm_free(struct LDKConfirm this_ptr);
8025         export function Confirm_free(this_ptr: number): void {
8026                 if(!isWasmInitialized) {
8027                         throw new Error("initializeWasm() must be awaited first!");
8028                 }
8029                 const nativeResponseValue = wasm.Confirm_free(this_ptr);
8030                 // debug statements here
8031         }
8032         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_clone(const enum LDKChannelMonitorUpdateErr *NONNULL_PTR orig);
8033         export function ChannelMonitorUpdateErr_clone(orig: number): ChannelMonitorUpdateErr {
8034                 if(!isWasmInitialized) {
8035                         throw new Error("initializeWasm() must be awaited first!");
8036                 }
8037                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_clone(orig);
8038                 return nativeResponseValue;
8039         }
8040         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_temporary_failure(void);
8041         export function ChannelMonitorUpdateErr_temporary_failure(): ChannelMonitorUpdateErr {
8042                 if(!isWasmInitialized) {
8043                         throw new Error("initializeWasm() must be awaited first!");
8044                 }
8045                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_temporary_failure();
8046                 return nativeResponseValue;
8047         }
8048         // enum LDKChannelMonitorUpdateErr ChannelMonitorUpdateErr_permanent_failure(void);
8049         export function ChannelMonitorUpdateErr_permanent_failure(): ChannelMonitorUpdateErr {
8050                 if(!isWasmInitialized) {
8051                         throw new Error("initializeWasm() must be awaited first!");
8052                 }
8053                 const nativeResponseValue = wasm.ChannelMonitorUpdateErr_permanent_failure();
8054                 return nativeResponseValue;
8055         }
8056         // void Watch_free(struct LDKWatch this_ptr);
8057         export function Watch_free(this_ptr: number): void {
8058                 if(!isWasmInitialized) {
8059                         throw new Error("initializeWasm() must be awaited first!");
8060                 }
8061                 const nativeResponseValue = wasm.Watch_free(this_ptr);
8062                 // debug statements here
8063         }
8064         // void Filter_free(struct LDKFilter this_ptr);
8065         export function Filter_free(this_ptr: number): void {
8066                 if(!isWasmInitialized) {
8067                         throw new Error("initializeWasm() must be awaited first!");
8068                 }
8069                 const nativeResponseValue = wasm.Filter_free(this_ptr);
8070                 // debug statements here
8071         }
8072         // void WatchedOutput_free(struct LDKWatchedOutput this_obj);
8073         export function WatchedOutput_free(this_obj: number): void {
8074                 if(!isWasmInitialized) {
8075                         throw new Error("initializeWasm() must be awaited first!");
8076                 }
8077                 const nativeResponseValue = wasm.WatchedOutput_free(this_obj);
8078                 // debug statements here
8079         }
8080         // struct LDKThirtyTwoBytes WatchedOutput_get_block_hash(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
8081         export function WatchedOutput_get_block_hash(this_ptr: number): Uint8Array {
8082                 if(!isWasmInitialized) {
8083                         throw new Error("initializeWasm() must be awaited first!");
8084                 }
8085                 const nativeResponseValue = wasm.WatchedOutput_get_block_hash(this_ptr);
8086                 return decodeArray(nativeResponseValue);
8087         }
8088         // void WatchedOutput_set_block_hash(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8089         export function WatchedOutput_set_block_hash(this_ptr: number, val: Uint8Array): void {
8090                 if(!isWasmInitialized) {
8091                         throw new Error("initializeWasm() must be awaited first!");
8092                 }
8093                 const nativeResponseValue = wasm.WatchedOutput_set_block_hash(this_ptr, encodeArray(val));
8094                 // debug statements here
8095         }
8096         // struct LDKOutPoint WatchedOutput_get_outpoint(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
8097         export function WatchedOutput_get_outpoint(this_ptr: number): number {
8098                 if(!isWasmInitialized) {
8099                         throw new Error("initializeWasm() must be awaited first!");
8100                 }
8101                 const nativeResponseValue = wasm.WatchedOutput_get_outpoint(this_ptr);
8102                 return nativeResponseValue;
8103         }
8104         // void WatchedOutput_set_outpoint(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKOutPoint val);
8105         export function WatchedOutput_set_outpoint(this_ptr: number, val: number): void {
8106                 if(!isWasmInitialized) {
8107                         throw new Error("initializeWasm() must be awaited first!");
8108                 }
8109                 const nativeResponseValue = wasm.WatchedOutput_set_outpoint(this_ptr, val);
8110                 // debug statements here
8111         }
8112         // struct LDKu8slice WatchedOutput_get_script_pubkey(const struct LDKWatchedOutput *NONNULL_PTR this_ptr);
8113         export function WatchedOutput_get_script_pubkey(this_ptr: number): Uint8Array {
8114                 if(!isWasmInitialized) {
8115                         throw new Error("initializeWasm() must be awaited first!");
8116                 }
8117                 const nativeResponseValue = wasm.WatchedOutput_get_script_pubkey(this_ptr);
8118                 return decodeArray(nativeResponseValue);
8119         }
8120         // void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
8121         export function WatchedOutput_set_script_pubkey(this_ptr: number, val: Uint8Array): void {
8122                 if(!isWasmInitialized) {
8123                         throw new Error("initializeWasm() must be awaited first!");
8124                 }
8125                 const nativeResponseValue = wasm.WatchedOutput_set_script_pubkey(this_ptr, encodeArray(val));
8126                 // debug statements here
8127         }
8128         // MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg);
8129         export function WatchedOutput_new(block_hash_arg: Uint8Array, outpoint_arg: number, script_pubkey_arg: Uint8Array): number {
8130                 if(!isWasmInitialized) {
8131                         throw new Error("initializeWasm() must be awaited first!");
8132                 }
8133                 const nativeResponseValue = wasm.WatchedOutput_new(encodeArray(block_hash_arg), outpoint_arg, encodeArray(script_pubkey_arg));
8134                 return nativeResponseValue;
8135         }
8136         // struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig);
8137         export function WatchedOutput_clone(orig: number): number {
8138                 if(!isWasmInitialized) {
8139                         throw new Error("initializeWasm() must be awaited first!");
8140                 }
8141                 const nativeResponseValue = wasm.WatchedOutput_clone(orig);
8142                 return nativeResponseValue;
8143         }
8144         // uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o);
8145         export function WatchedOutput_hash(o: number): number {
8146                 if(!isWasmInitialized) {
8147                         throw new Error("initializeWasm() must be awaited first!");
8148                 }
8149                 const nativeResponseValue = wasm.WatchedOutput_hash(o);
8150                 return nativeResponseValue;
8151         }
8152         // void BroadcasterInterface_free(struct LDKBroadcasterInterface this_ptr);
8153         export function BroadcasterInterface_free(this_ptr: number): void {
8154                 if(!isWasmInitialized) {
8155                         throw new Error("initializeWasm() must be awaited first!");
8156                 }
8157                 const nativeResponseValue = wasm.BroadcasterInterface_free(this_ptr);
8158                 // debug statements here
8159         }
8160         // enum LDKConfirmationTarget ConfirmationTarget_clone(const enum LDKConfirmationTarget *NONNULL_PTR orig);
8161         export function ConfirmationTarget_clone(orig: number): ConfirmationTarget {
8162                 if(!isWasmInitialized) {
8163                         throw new Error("initializeWasm() must be awaited first!");
8164                 }
8165                 const nativeResponseValue = wasm.ConfirmationTarget_clone(orig);
8166                 return nativeResponseValue;
8167         }
8168         // enum LDKConfirmationTarget ConfirmationTarget_background(void);
8169         export function ConfirmationTarget_background(): ConfirmationTarget {
8170                 if(!isWasmInitialized) {
8171                         throw new Error("initializeWasm() must be awaited first!");
8172                 }
8173                 const nativeResponseValue = wasm.ConfirmationTarget_background();
8174                 return nativeResponseValue;
8175         }
8176         // enum LDKConfirmationTarget ConfirmationTarget_normal(void);
8177         export function ConfirmationTarget_normal(): ConfirmationTarget {
8178                 if(!isWasmInitialized) {
8179                         throw new Error("initializeWasm() must be awaited first!");
8180                 }
8181                 const nativeResponseValue = wasm.ConfirmationTarget_normal();
8182                 return nativeResponseValue;
8183         }
8184         // enum LDKConfirmationTarget ConfirmationTarget_high_priority(void);
8185         export function ConfirmationTarget_high_priority(): ConfirmationTarget {
8186                 if(!isWasmInitialized) {
8187                         throw new Error("initializeWasm() must be awaited first!");
8188                 }
8189                 const nativeResponseValue = wasm.ConfirmationTarget_high_priority();
8190                 return nativeResponseValue;
8191         }
8192         // bool ConfirmationTarget_eq(const enum LDKConfirmationTarget *NONNULL_PTR a, const enum LDKConfirmationTarget *NONNULL_PTR b);
8193         export function ConfirmationTarget_eq(a: number, b: number): boolean {
8194                 if(!isWasmInitialized) {
8195                         throw new Error("initializeWasm() must be awaited first!");
8196                 }
8197                 const nativeResponseValue = wasm.ConfirmationTarget_eq(a, b);
8198                 return nativeResponseValue;
8199         }
8200         // void FeeEstimator_free(struct LDKFeeEstimator this_ptr);
8201         export function FeeEstimator_free(this_ptr: number): void {
8202                 if(!isWasmInitialized) {
8203                         throw new Error("initializeWasm() must be awaited first!");
8204                 }
8205                 const nativeResponseValue = wasm.FeeEstimator_free(this_ptr);
8206                 // debug statements here
8207         }
8208         // void Persist_free(struct LDKPersist this_ptr);
8209         export function Persist_free(this_ptr: number): void {
8210                 if(!isWasmInitialized) {
8211                         throw new Error("initializeWasm() must be awaited first!");
8212                 }
8213                 const nativeResponseValue = wasm.Persist_free(this_ptr);
8214                 // debug statements here
8215         }
8216         // void LockedChannelMonitor_free(struct LDKLockedChannelMonitor this_obj);
8217         export function LockedChannelMonitor_free(this_obj: number): void {
8218                 if(!isWasmInitialized) {
8219                         throw new Error("initializeWasm() must be awaited first!");
8220                 }
8221                 const nativeResponseValue = wasm.LockedChannelMonitor_free(this_obj);
8222                 // debug statements here
8223         }
8224         // void ChainMonitor_free(struct LDKChainMonitor this_obj);
8225         export function ChainMonitor_free(this_obj: number): void {
8226                 if(!isWasmInitialized) {
8227                         throw new Error("initializeWasm() must be awaited first!");
8228                 }
8229                 const nativeResponseValue = wasm.ChainMonitor_free(this_obj);
8230                 // debug statements here
8231         }
8232         // MUST_USE_RES struct LDKChainMonitor ChainMonitor_new(struct LDKCOption_FilterZ chain_source, struct LDKBroadcasterInterface broadcaster, struct LDKLogger logger, struct LDKFeeEstimator feeest, struct LDKPersist persister);
8233         export function ChainMonitor_new(chain_source: number, broadcaster: number, logger: number, feeest: number, persister: number): number {
8234                 if(!isWasmInitialized) {
8235                         throw new Error("initializeWasm() must be awaited first!");
8236                 }
8237                 const nativeResponseValue = wasm.ChainMonitor_new(chain_source, broadcaster, logger, feeest, persister);
8238                 return nativeResponseValue;
8239         }
8240         // MUST_USE_RES struct LDKCVec_BalanceZ ChainMonitor_get_claimable_balances(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKCVec_ChannelDetailsZ ignored_channels);
8241         export function ChainMonitor_get_claimable_balances(this_arg: number, ignored_channels: number[]): number[] {
8242                 if(!isWasmInitialized) {
8243                         throw new Error("initializeWasm() must be awaited first!");
8244                 }
8245                 const nativeResponseValue = wasm.ChainMonitor_get_claimable_balances(this_arg, ignored_channels);
8246                 return nativeResponseValue;
8247         }
8248         // MUST_USE_RES struct LDKCResult_LockedChannelMonitorNoneZ ChainMonitor_get_monitor(const struct LDKChainMonitor *NONNULL_PTR this_arg, struct LDKOutPoint funding_txo);
8249         export function ChainMonitor_get_monitor(this_arg: number, funding_txo: number): number {
8250                 if(!isWasmInitialized) {
8251                         throw new Error("initializeWasm() must be awaited first!");
8252                 }
8253                 const nativeResponseValue = wasm.ChainMonitor_get_monitor(this_arg, funding_txo);
8254                 return nativeResponseValue;
8255         }
8256         // MUST_USE_RES struct LDKCVec_OutPointZ ChainMonitor_list_monitors(const struct LDKChainMonitor *NONNULL_PTR this_arg);
8257         export function ChainMonitor_list_monitors(this_arg: number): number[] {
8258                 if(!isWasmInitialized) {
8259                         throw new Error("initializeWasm() must be awaited first!");
8260                 }
8261                 const nativeResponseValue = wasm.ChainMonitor_list_monitors(this_arg);
8262                 return nativeResponseValue;
8263         }
8264         // struct LDKListen ChainMonitor_as_Listen(const struct LDKChainMonitor *NONNULL_PTR this_arg);
8265         export function ChainMonitor_as_Listen(this_arg: number): number {
8266                 if(!isWasmInitialized) {
8267                         throw new Error("initializeWasm() must be awaited first!");
8268                 }
8269                 const nativeResponseValue = wasm.ChainMonitor_as_Listen(this_arg);
8270                 return nativeResponseValue;
8271         }
8272         // struct LDKConfirm ChainMonitor_as_Confirm(const struct LDKChainMonitor *NONNULL_PTR this_arg);
8273         export function ChainMonitor_as_Confirm(this_arg: number): number {
8274                 if(!isWasmInitialized) {
8275                         throw new Error("initializeWasm() must be awaited first!");
8276                 }
8277                 const nativeResponseValue = wasm.ChainMonitor_as_Confirm(this_arg);
8278                 return nativeResponseValue;
8279         }
8280         // struct LDKWatch ChainMonitor_as_Watch(const struct LDKChainMonitor *NONNULL_PTR this_arg);
8281         export function ChainMonitor_as_Watch(this_arg: number): number {
8282                 if(!isWasmInitialized) {
8283                         throw new Error("initializeWasm() must be awaited first!");
8284                 }
8285                 const nativeResponseValue = wasm.ChainMonitor_as_Watch(this_arg);
8286                 return nativeResponseValue;
8287         }
8288         // struct LDKEventsProvider ChainMonitor_as_EventsProvider(const struct LDKChainMonitor *NONNULL_PTR this_arg);
8289         export function ChainMonitor_as_EventsProvider(this_arg: number): number {
8290                 if(!isWasmInitialized) {
8291                         throw new Error("initializeWasm() must be awaited first!");
8292                 }
8293                 const nativeResponseValue = wasm.ChainMonitor_as_EventsProvider(this_arg);
8294                 return nativeResponseValue;
8295         }
8296         // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_obj);
8297         export function ChannelMonitorUpdate_free(this_obj: number): void {
8298                 if(!isWasmInitialized) {
8299                         throw new Error("initializeWasm() must be awaited first!");
8300                 }
8301                 const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_obj);
8302                 // debug statements here
8303         }
8304         // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
8305         export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
8306                 if(!isWasmInitialized) {
8307                         throw new Error("initializeWasm() must be awaited first!");
8308                 }
8309                 const nativeResponseValue = wasm.ChannelMonitorUpdate_get_update_id(this_ptr);
8310                 return nativeResponseValue;
8311         }
8312         // void ChannelMonitorUpdate_set_update_id(struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr, uint64_t val);
8313         export function ChannelMonitorUpdate_set_update_id(this_ptr: number, val: number): void {
8314                 if(!isWasmInitialized) {
8315                         throw new Error("initializeWasm() must be awaited first!");
8316                 }
8317                 const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
8318                 // debug statements here
8319         }
8320         // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
8321         export function ChannelMonitorUpdate_clone(orig: number): number {
8322                 if(!isWasmInitialized) {
8323                         throw new Error("initializeWasm() must be awaited first!");
8324                 }
8325                 const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
8326                 return nativeResponseValue;
8327         }
8328         // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
8329         export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
8330                 if(!isWasmInitialized) {
8331                         throw new Error("initializeWasm() must be awaited first!");
8332                 }
8333                 const nativeResponseValue = wasm.ChannelMonitorUpdate_write(obj);
8334                 return decodeArray(nativeResponseValue);
8335         }
8336         // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
8337         export function ChannelMonitorUpdate_read(ser: Uint8Array): number {
8338                 if(!isWasmInitialized) {
8339                         throw new Error("initializeWasm() must be awaited first!");
8340                 }
8341                 const nativeResponseValue = wasm.ChannelMonitorUpdate_read(encodeArray(ser));
8342                 return nativeResponseValue;
8343         }
8344         // void MonitorUpdateError_free(struct LDKMonitorUpdateError this_obj);
8345         export function MonitorUpdateError_free(this_obj: number): void {
8346                 if(!isWasmInitialized) {
8347                         throw new Error("initializeWasm() must be awaited first!");
8348                 }
8349                 const nativeResponseValue = wasm.MonitorUpdateError_free(this_obj);
8350                 // debug statements here
8351         }
8352         // struct LDKMonitorUpdateError MonitorUpdateError_clone(const struct LDKMonitorUpdateError *NONNULL_PTR orig);
8353         export function MonitorUpdateError_clone(orig: number): number {
8354                 if(!isWasmInitialized) {
8355                         throw new Error("initializeWasm() must be awaited first!");
8356                 }
8357                 const nativeResponseValue = wasm.MonitorUpdateError_clone(orig);
8358                 return nativeResponseValue;
8359         }
8360         // void MonitorEvent_free(struct LDKMonitorEvent this_ptr);
8361         export function MonitorEvent_free(this_ptr: number): void {
8362                 if(!isWasmInitialized) {
8363                         throw new Error("initializeWasm() must be awaited first!");
8364                 }
8365                 const nativeResponseValue = wasm.MonitorEvent_free(this_ptr);
8366                 // debug statements here
8367         }
8368         // struct LDKMonitorEvent MonitorEvent_clone(const struct LDKMonitorEvent *NONNULL_PTR orig);
8369         export function MonitorEvent_clone(orig: number): number {
8370                 if(!isWasmInitialized) {
8371                         throw new Error("initializeWasm() must be awaited first!");
8372                 }
8373                 const nativeResponseValue = wasm.MonitorEvent_clone(orig);
8374                 return nativeResponseValue;
8375         }
8376         // struct LDKMonitorEvent MonitorEvent_htlcevent(struct LDKHTLCUpdate a);
8377         export function MonitorEvent_htlcevent(a: number): number {
8378                 if(!isWasmInitialized) {
8379                         throw new Error("initializeWasm() must be awaited first!");
8380                 }
8381                 const nativeResponseValue = wasm.MonitorEvent_htlcevent(a);
8382                 return nativeResponseValue;
8383         }
8384         // struct LDKMonitorEvent MonitorEvent_commitment_tx_confirmed(struct LDKOutPoint a);
8385         export function MonitorEvent_commitment_tx_confirmed(a: number): number {
8386                 if(!isWasmInitialized) {
8387                         throw new Error("initializeWasm() must be awaited first!");
8388                 }
8389                 const nativeResponseValue = wasm.MonitorEvent_commitment_tx_confirmed(a);
8390                 return nativeResponseValue;
8391         }
8392         // void HTLCUpdate_free(struct LDKHTLCUpdate this_obj);
8393         export function HTLCUpdate_free(this_obj: number): void {
8394                 if(!isWasmInitialized) {
8395                         throw new Error("initializeWasm() must be awaited first!");
8396                 }
8397                 const nativeResponseValue = wasm.HTLCUpdate_free(this_obj);
8398                 // debug statements here
8399         }
8400         // struct LDKHTLCUpdate HTLCUpdate_clone(const struct LDKHTLCUpdate *NONNULL_PTR orig);
8401         export function HTLCUpdate_clone(orig: number): number {
8402                 if(!isWasmInitialized) {
8403                         throw new Error("initializeWasm() must be awaited first!");
8404                 }
8405                 const nativeResponseValue = wasm.HTLCUpdate_clone(orig);
8406                 return nativeResponseValue;
8407         }
8408         // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
8409         export function HTLCUpdate_write(obj: number): Uint8Array {
8410                 if(!isWasmInitialized) {
8411                         throw new Error("initializeWasm() must be awaited first!");
8412                 }
8413                 const nativeResponseValue = wasm.HTLCUpdate_write(obj);
8414                 return decodeArray(nativeResponseValue);
8415         }
8416         // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
8417         export function HTLCUpdate_read(ser: Uint8Array): number {
8418                 if(!isWasmInitialized) {
8419                         throw new Error("initializeWasm() must be awaited first!");
8420                 }
8421                 const nativeResponseValue = wasm.HTLCUpdate_read(encodeArray(ser));
8422                 return nativeResponseValue;
8423         }
8424         // void Balance_free(struct LDKBalance this_ptr);
8425         export function Balance_free(this_ptr: number): void {
8426                 if(!isWasmInitialized) {
8427                         throw new Error("initializeWasm() must be awaited first!");
8428                 }
8429                 const nativeResponseValue = wasm.Balance_free(this_ptr);
8430                 // debug statements here
8431         }
8432         // struct LDKBalance Balance_clone(const struct LDKBalance *NONNULL_PTR orig);
8433         export function Balance_clone(orig: number): number {
8434                 if(!isWasmInitialized) {
8435                         throw new Error("initializeWasm() must be awaited first!");
8436                 }
8437                 const nativeResponseValue = wasm.Balance_clone(orig);
8438                 return nativeResponseValue;
8439         }
8440         // struct LDKBalance Balance_claimable_on_channel_close(uint64_t claimable_amount_satoshis);
8441         export function Balance_claimable_on_channel_close(claimable_amount_satoshis: number): number {
8442                 if(!isWasmInitialized) {
8443                         throw new Error("initializeWasm() must be awaited first!");
8444                 }
8445                 const nativeResponseValue = wasm.Balance_claimable_on_channel_close(claimable_amount_satoshis);
8446                 return nativeResponseValue;
8447         }
8448         // struct LDKBalance Balance_claimable_awaiting_confirmations(uint64_t claimable_amount_satoshis, uint32_t confirmation_height);
8449         export function Balance_claimable_awaiting_confirmations(claimable_amount_satoshis: number, confirmation_height: number): number {
8450                 if(!isWasmInitialized) {
8451                         throw new Error("initializeWasm() must be awaited first!");
8452                 }
8453                 const nativeResponseValue = wasm.Balance_claimable_awaiting_confirmations(claimable_amount_satoshis, confirmation_height);
8454                 return nativeResponseValue;
8455         }
8456         // struct LDKBalance Balance_contentious_claimable(uint64_t claimable_amount_satoshis, uint32_t timeout_height);
8457         export function Balance_contentious_claimable(claimable_amount_satoshis: number, timeout_height: number): number {
8458                 if(!isWasmInitialized) {
8459                         throw new Error("initializeWasm() must be awaited first!");
8460                 }
8461                 const nativeResponseValue = wasm.Balance_contentious_claimable(claimable_amount_satoshis, timeout_height);
8462                 return nativeResponseValue;
8463         }
8464         // struct LDKBalance Balance_maybe_claimable_htlcawaiting_timeout(uint64_t claimable_amount_satoshis, uint32_t claimable_height);
8465         export function Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis: number, claimable_height: number): number {
8466                 if(!isWasmInitialized) {
8467                         throw new Error("initializeWasm() must be awaited first!");
8468                 }
8469                 const nativeResponseValue = wasm.Balance_maybe_claimable_htlcawaiting_timeout(claimable_amount_satoshis, claimable_height);
8470                 return nativeResponseValue;
8471         }
8472         // bool Balance_eq(const struct LDKBalance *NONNULL_PTR a, const struct LDKBalance *NONNULL_PTR b);
8473         export function Balance_eq(a: number, b: number): boolean {
8474                 if(!isWasmInitialized) {
8475                         throw new Error("initializeWasm() must be awaited first!");
8476                 }
8477                 const nativeResponseValue = wasm.Balance_eq(a, b);
8478                 return nativeResponseValue;
8479         }
8480         // void ChannelMonitor_free(struct LDKChannelMonitor this_obj);
8481         export function ChannelMonitor_free(this_obj: number): void {
8482                 if(!isWasmInitialized) {
8483                         throw new Error("initializeWasm() must be awaited first!");
8484                 }
8485                 const nativeResponseValue = wasm.ChannelMonitor_free(this_obj);
8486                 // debug statements here
8487         }
8488         // struct LDKChannelMonitor ChannelMonitor_clone(const struct LDKChannelMonitor *NONNULL_PTR orig);
8489         export function ChannelMonitor_clone(orig: number): number {
8490                 if(!isWasmInitialized) {
8491                         throw new Error("initializeWasm() must be awaited first!");
8492                 }
8493                 const nativeResponseValue = wasm.ChannelMonitor_clone(orig);
8494                 return nativeResponseValue;
8495         }
8496         // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
8497         export function ChannelMonitor_write(obj: number): Uint8Array {
8498                 if(!isWasmInitialized) {
8499                         throw new Error("initializeWasm() must be awaited first!");
8500                 }
8501                 const nativeResponseValue = wasm.ChannelMonitor_write(obj);
8502                 return decodeArray(nativeResponseValue);
8503         }
8504         // 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);
8505         export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
8506                 if(!isWasmInitialized) {
8507                         throw new Error("initializeWasm() must be awaited first!");
8508                 }
8509                 const nativeResponseValue = wasm.ChannelMonitor_update_monitor(this_arg, updates, broadcaster, fee_estimator, logger);
8510                 return nativeResponseValue;
8511         }
8512         // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8513         export function ChannelMonitor_get_latest_update_id(this_arg: number): number {
8514                 if(!isWasmInitialized) {
8515                         throw new Error("initializeWasm() must be awaited first!");
8516                 }
8517                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_update_id(this_arg);
8518                 return nativeResponseValue;
8519         }
8520         // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ ChannelMonitor_get_funding_txo(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8521         export function ChannelMonitor_get_funding_txo(this_arg: number): number {
8522                 if(!isWasmInitialized) {
8523                         throw new Error("initializeWasm() must be awaited first!");
8524                 }
8525                 const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
8526                 return nativeResponseValue;
8527         }
8528         // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ ChannelMonitor_get_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8529         export function ChannelMonitor_get_outputs_to_watch(this_arg: number): number[] {
8530                 if(!isWasmInitialized) {
8531                         throw new Error("initializeWasm() must be awaited first!");
8532                 }
8533                 const nativeResponseValue = wasm.ChannelMonitor_get_outputs_to_watch(this_arg);
8534                 return nativeResponseValue;
8535         }
8536         // void ChannelMonitor_load_outputs_to_watch(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKFilter *NONNULL_PTR filter);
8537         export function ChannelMonitor_load_outputs_to_watch(this_arg: number, filter: number): void {
8538                 if(!isWasmInitialized) {
8539                         throw new Error("initializeWasm() must be awaited first!");
8540                 }
8541                 const nativeResponseValue = wasm.ChannelMonitor_load_outputs_to_watch(this_arg, filter);
8542                 // debug statements here
8543         }
8544         // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8545         export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
8546                 if(!isWasmInitialized) {
8547                         throw new Error("initializeWasm() must be awaited first!");
8548                 }
8549                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
8550                 return nativeResponseValue;
8551         }
8552         // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8553         export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
8554                 if(!isWasmInitialized) {
8555                         throw new Error("initializeWasm() must be awaited first!");
8556                 }
8557                 const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
8558                 return nativeResponseValue;
8559         }
8560         // 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);
8561         export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
8562                 if(!isWasmInitialized) {
8563                         throw new Error("initializeWasm() must be awaited first!");
8564                 }
8565                 const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
8566                 return nativeResponseValue;
8567         }
8568         // 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);
8569         export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
8570                 if(!isWasmInitialized) {
8571                         throw new Error("initializeWasm() must be awaited first!");
8572                 }
8573                 const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
8574                 return nativeResponseValue;
8575         }
8576         // 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);
8577         export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
8578                 if(!isWasmInitialized) {
8579                         throw new Error("initializeWasm() must be awaited first!");
8580                 }
8581                 const nativeResponseValue = wasm.ChannelMonitor_block_disconnected(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
8582                 // debug statements here
8583         }
8584         // 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);
8585         export function ChannelMonitor_transactions_confirmed(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
8586                 if(!isWasmInitialized) {
8587                         throw new Error("initializeWasm() must be awaited first!");
8588                 }
8589                 const nativeResponseValue = wasm.ChannelMonitor_transactions_confirmed(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
8590                 return nativeResponseValue;
8591         }
8592         // 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);
8593         export function ChannelMonitor_transaction_unconfirmed(this_arg: number, txid: Uint8Array, broadcaster: number, fee_estimator: number, logger: number): void {
8594                 if(!isWasmInitialized) {
8595                         throw new Error("initializeWasm() must be awaited first!");
8596                 }
8597                 const nativeResponseValue = wasm.ChannelMonitor_transaction_unconfirmed(this_arg, encodeArray(txid), broadcaster, fee_estimator, logger);
8598                 // debug statements here
8599         }
8600         // 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);
8601         export function ChannelMonitor_best_block_updated(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
8602                 if(!isWasmInitialized) {
8603                         throw new Error("initializeWasm() must be awaited first!");
8604                 }
8605                 const nativeResponseValue = wasm.ChannelMonitor_best_block_updated(this_arg, encodeArray(header), height, broadcaster, fee_estimator, logger);
8606                 return nativeResponseValue;
8607         }
8608         // MUST_USE_RES struct LDKCVec_TxidZ ChannelMonitor_get_relevant_txids(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8609         export function ChannelMonitor_get_relevant_txids(this_arg: number): Uint8Array[] {
8610                 if(!isWasmInitialized) {
8611                         throw new Error("initializeWasm() must be awaited first!");
8612                 }
8613                 const nativeResponseValue = wasm.ChannelMonitor_get_relevant_txids(this_arg);
8614                 return nativeResponseValue;
8615         }
8616         // MUST_USE_RES struct LDKBestBlock ChannelMonitor_current_best_block(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8617         export function ChannelMonitor_current_best_block(this_arg: number): number {
8618                 if(!isWasmInitialized) {
8619                         throw new Error("initializeWasm() must be awaited first!");
8620                 }
8621                 const nativeResponseValue = wasm.ChannelMonitor_current_best_block(this_arg);
8622                 return nativeResponseValue;
8623         }
8624         // MUST_USE_RES struct LDKCVec_BalanceZ ChannelMonitor_get_claimable_balances(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
8625         export function ChannelMonitor_get_claimable_balances(this_arg: number): number[] {
8626                 if(!isWasmInitialized) {
8627                         throw new Error("initializeWasm() must be awaited first!");
8628                 }
8629                 const nativeResponseValue = wasm.ChannelMonitor_get_claimable_balances(this_arg);
8630                 return nativeResponseValue;
8631         }
8632         // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ C2Tuple_BlockHashChannelMonitorZ_read(struct LDKu8slice ser, const struct LDKKeysInterface *NONNULL_PTR arg);
8633         export function C2Tuple_BlockHashChannelMonitorZ_read(ser: Uint8Array, arg: number): number {
8634                 if(!isWasmInitialized) {
8635                         throw new Error("initializeWasm() must be awaited first!");
8636                 }
8637                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_read(encodeArray(ser), arg);
8638                 return nativeResponseValue;
8639         }
8640         // void OutPoint_free(struct LDKOutPoint this_obj);
8641         export function OutPoint_free(this_obj: number): void {
8642                 if(!isWasmInitialized) {
8643                         throw new Error("initializeWasm() must be awaited first!");
8644                 }
8645                 const nativeResponseValue = wasm.OutPoint_free(this_obj);
8646                 // debug statements here
8647         }
8648         // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
8649         export function OutPoint_get_txid(this_ptr: number): Uint8Array {
8650                 if(!isWasmInitialized) {
8651                         throw new Error("initializeWasm() must be awaited first!");
8652                 }
8653                 const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
8654                 return decodeArray(nativeResponseValue);
8655         }
8656         // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8657         export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
8658                 if(!isWasmInitialized) {
8659                         throw new Error("initializeWasm() must be awaited first!");
8660                 }
8661                 const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
8662                 // debug statements here
8663         }
8664         // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
8665         export function OutPoint_get_index(this_ptr: number): number {
8666                 if(!isWasmInitialized) {
8667                         throw new Error("initializeWasm() must be awaited first!");
8668                 }
8669                 const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
8670                 return nativeResponseValue;
8671         }
8672         // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
8673         export function OutPoint_set_index(this_ptr: number, val: number): void {
8674                 if(!isWasmInitialized) {
8675                         throw new Error("initializeWasm() must be awaited first!");
8676                 }
8677                 const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
8678                 // debug statements here
8679         }
8680         // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
8681         export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
8682                 if(!isWasmInitialized) {
8683                         throw new Error("initializeWasm() must be awaited first!");
8684                 }
8685                 const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
8686                 return nativeResponseValue;
8687         }
8688         // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
8689         export function OutPoint_clone(orig: number): number {
8690                 if(!isWasmInitialized) {
8691                         throw new Error("initializeWasm() must be awaited first!");
8692                 }
8693                 const nativeResponseValue = wasm.OutPoint_clone(orig);
8694                 return nativeResponseValue;
8695         }
8696         // bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b);
8697         export function OutPoint_eq(a: number, b: number): boolean {
8698                 if(!isWasmInitialized) {
8699                         throw new Error("initializeWasm() must be awaited first!");
8700                 }
8701                 const nativeResponseValue = wasm.OutPoint_eq(a, b);
8702                 return nativeResponseValue;
8703         }
8704         // uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o);
8705         export function OutPoint_hash(o: number): number {
8706                 if(!isWasmInitialized) {
8707                         throw new Error("initializeWasm() must be awaited first!");
8708                 }
8709                 const nativeResponseValue = wasm.OutPoint_hash(o);
8710                 return nativeResponseValue;
8711         }
8712         // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
8713         export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
8714                 if(!isWasmInitialized) {
8715                         throw new Error("initializeWasm() must be awaited first!");
8716                 }
8717                 const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
8718                 return decodeArray(nativeResponseValue);
8719         }
8720         // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
8721         export function OutPoint_write(obj: number): Uint8Array {
8722                 if(!isWasmInitialized) {
8723                         throw new Error("initializeWasm() must be awaited first!");
8724                 }
8725                 const nativeResponseValue = wasm.OutPoint_write(obj);
8726                 return decodeArray(nativeResponseValue);
8727         }
8728         // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
8729         export function OutPoint_read(ser: Uint8Array): number {
8730                 if(!isWasmInitialized) {
8731                         throw new Error("initializeWasm() must be awaited first!");
8732                 }
8733                 const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
8734                 return nativeResponseValue;
8735         }
8736         // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_obj);
8737         export function DelayedPaymentOutputDescriptor_free(this_obj: number): void {
8738                 if(!isWasmInitialized) {
8739                         throw new Error("initializeWasm() must be awaited first!");
8740                 }
8741                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_obj);
8742                 // debug statements here
8743         }
8744         // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8745         export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
8746                 if(!isWasmInitialized) {
8747                         throw new Error("initializeWasm() must be awaited first!");
8748                 }
8749                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
8750                 return nativeResponseValue;
8751         }
8752         // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
8753         export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
8754                 if(!isWasmInitialized) {
8755                         throw new Error("initializeWasm() must be awaited first!");
8756                 }
8757                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
8758                 // debug statements here
8759         }
8760         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8761         export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
8762                 if(!isWasmInitialized) {
8763                         throw new Error("initializeWasm() must be awaited first!");
8764                 }
8765                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
8766                 return decodeArray(nativeResponseValue);
8767         }
8768         // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8769         export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
8770                 if(!isWasmInitialized) {
8771                         throw new Error("initializeWasm() must be awaited first!");
8772                 }
8773                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
8774                 // debug statements here
8775         }
8776         // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8777         export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
8778                 if(!isWasmInitialized) {
8779                         throw new Error("initializeWasm() must be awaited first!");
8780                 }
8781                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
8782                 return nativeResponseValue;
8783         }
8784         // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
8785         export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
8786                 if(!isWasmInitialized) {
8787                         throw new Error("initializeWasm() must be awaited first!");
8788                 }
8789                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
8790                 // debug statements here
8791         }
8792         // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
8793         export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
8794                 if(!isWasmInitialized) {
8795                         throw new Error("initializeWasm() must be awaited first!");
8796                 }
8797                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
8798                 // debug statements here
8799         }
8800         // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8801         export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
8802                 if(!isWasmInitialized) {
8803                         throw new Error("initializeWasm() must be awaited first!");
8804                 }
8805                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
8806                 return decodeArray(nativeResponseValue);
8807         }
8808         // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
8809         export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
8810                 if(!isWasmInitialized) {
8811                         throw new Error("initializeWasm() must be awaited first!");
8812                 }
8813                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
8814                 // debug statements here
8815         }
8816         // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
8817         export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
8818                 if(!isWasmInitialized) {
8819                         throw new Error("initializeWasm() must be awaited first!");
8820                 }
8821                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
8822                 return decodeArray(nativeResponseValue);
8823         }
8824         // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8825         export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
8826                 if(!isWasmInitialized) {
8827                         throw new Error("initializeWasm() must be awaited first!");
8828                 }
8829                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
8830                 // debug statements here
8831         }
8832         // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8833         export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
8834                 if(!isWasmInitialized) {
8835                         throw new Error("initializeWasm() must be awaited first!");
8836                 }
8837                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
8838                 return nativeResponseValue;
8839         }
8840         // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
8841         export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
8842                 if(!isWasmInitialized) {
8843                         throw new Error("initializeWasm() must be awaited first!");
8844                 }
8845                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
8846                 // debug statements here
8847         }
8848         // 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);
8849         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 {
8850                 if(!isWasmInitialized) {
8851                         throw new Error("initializeWasm() must be awaited first!");
8852                 }
8853                 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);
8854                 return nativeResponseValue;
8855         }
8856         // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
8857         export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
8858                 if(!isWasmInitialized) {
8859                         throw new Error("initializeWasm() must be awaited first!");
8860                 }
8861                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
8862                 return nativeResponseValue;
8863         }
8864         // struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj);
8865         export function DelayedPaymentOutputDescriptor_write(obj: number): Uint8Array {
8866                 if(!isWasmInitialized) {
8867                         throw new Error("initializeWasm() must be awaited first!");
8868                 }
8869                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_write(obj);
8870                 return decodeArray(nativeResponseValue);
8871         }
8872         // struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser);
8873         export function DelayedPaymentOutputDescriptor_read(ser: Uint8Array): number {
8874                 if(!isWasmInitialized) {
8875                         throw new Error("initializeWasm() must be awaited first!");
8876                 }
8877                 const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_read(encodeArray(ser));
8878                 return nativeResponseValue;
8879         }
8880         // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_obj);
8881         export function StaticPaymentOutputDescriptor_free(this_obj: number): void {
8882                 if(!isWasmInitialized) {
8883                         throw new Error("initializeWasm() must be awaited first!");
8884                 }
8885                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_obj);
8886                 // debug statements here
8887         }
8888         // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8889         export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
8890                 if(!isWasmInitialized) {
8891                         throw new Error("initializeWasm() must be awaited first!");
8892                 }
8893                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
8894                 return nativeResponseValue;
8895         }
8896         // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
8897         export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
8898                 if(!isWasmInitialized) {
8899                         throw new Error("initializeWasm() must be awaited first!");
8900                 }
8901                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
8902                 // debug statements here
8903         }
8904         // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
8905         export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
8906                 if(!isWasmInitialized) {
8907                         throw new Error("initializeWasm() must be awaited first!");
8908                 }
8909                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
8910                 // debug statements here
8911         }
8912         // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
8913         export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
8914                 if(!isWasmInitialized) {
8915                         throw new Error("initializeWasm() must be awaited first!");
8916                 }
8917                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
8918                 return decodeArray(nativeResponseValue);
8919         }
8920         // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
8921         export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
8922                 if(!isWasmInitialized) {
8923                         throw new Error("initializeWasm() must be awaited first!");
8924                 }
8925                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
8926                 // debug statements here
8927         }
8928         // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
8929         export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
8930                 if(!isWasmInitialized) {
8931                         throw new Error("initializeWasm() must be awaited first!");
8932                 }
8933                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
8934                 return nativeResponseValue;
8935         }
8936         // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
8937         export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
8938                 if(!isWasmInitialized) {
8939                         throw new Error("initializeWasm() must be awaited first!");
8940                 }
8941                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
8942                 // debug statements here
8943         }
8944         // 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);
8945         export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
8946                 if(!isWasmInitialized) {
8947                         throw new Error("initializeWasm() must be awaited first!");
8948                 }
8949                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
8950                 return nativeResponseValue;
8951         }
8952         // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
8953         export function StaticPaymentOutputDescriptor_clone(orig: number): number {
8954                 if(!isWasmInitialized) {
8955                         throw new Error("initializeWasm() must be awaited first!");
8956                 }
8957                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
8958                 return nativeResponseValue;
8959         }
8960         // struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj);
8961         export function StaticPaymentOutputDescriptor_write(obj: number): Uint8Array {
8962                 if(!isWasmInitialized) {
8963                         throw new Error("initializeWasm() must be awaited first!");
8964                 }
8965                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_write(obj);
8966                 return decodeArray(nativeResponseValue);
8967         }
8968         // struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser);
8969         export function StaticPaymentOutputDescriptor_read(ser: Uint8Array): number {
8970                 if(!isWasmInitialized) {
8971                         throw new Error("initializeWasm() must be awaited first!");
8972                 }
8973                 const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_read(encodeArray(ser));
8974                 return nativeResponseValue;
8975         }
8976         // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
8977         export function SpendableOutputDescriptor_free(this_ptr: number): void {
8978                 if(!isWasmInitialized) {
8979                         throw new Error("initializeWasm() must be awaited first!");
8980                 }
8981                 const nativeResponseValue = wasm.SpendableOutputDescriptor_free(this_ptr);
8982                 // debug statements here
8983         }
8984         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
8985         export function SpendableOutputDescriptor_clone(orig: number): number {
8986                 if(!isWasmInitialized) {
8987                         throw new Error("initializeWasm() must be awaited first!");
8988                 }
8989                 const nativeResponseValue = wasm.SpendableOutputDescriptor_clone(orig);
8990                 return nativeResponseValue;
8991         }
8992         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_output(struct LDKOutPoint outpoint, struct LDKTxOut output);
8993         export function SpendableOutputDescriptor_static_output(outpoint: number, output: number): number {
8994                 if(!isWasmInitialized) {
8995                         throw new Error("initializeWasm() must be awaited first!");
8996                 }
8997                 const nativeResponseValue = wasm.SpendableOutputDescriptor_static_output(outpoint, output);
8998                 return nativeResponseValue;
8999         }
9000         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_delayed_payment_output(struct LDKDelayedPaymentOutputDescriptor a);
9001         export function SpendableOutputDescriptor_delayed_payment_output(a: number): number {
9002                 if(!isWasmInitialized) {
9003                         throw new Error("initializeWasm() must be awaited first!");
9004                 }
9005                 const nativeResponseValue = wasm.SpendableOutputDescriptor_delayed_payment_output(a);
9006                 return nativeResponseValue;
9007         }
9008         // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_static_payment_output(struct LDKStaticPaymentOutputDescriptor a);
9009         export function SpendableOutputDescriptor_static_payment_output(a: number): number {
9010                 if(!isWasmInitialized) {
9011                         throw new Error("initializeWasm() must be awaited first!");
9012                 }
9013                 const nativeResponseValue = wasm.SpendableOutputDescriptor_static_payment_output(a);
9014                 return nativeResponseValue;
9015         }
9016         // struct LDKCVec_u8Z SpendableOutputDescriptor_write(const struct LDKSpendableOutputDescriptor *NONNULL_PTR obj);
9017         export function SpendableOutputDescriptor_write(obj: number): Uint8Array {
9018                 if(!isWasmInitialized) {
9019                         throw new Error("initializeWasm() must be awaited first!");
9020                 }
9021                 const nativeResponseValue = wasm.SpendableOutputDescriptor_write(obj);
9022                 return decodeArray(nativeResponseValue);
9023         }
9024         // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
9025         export function SpendableOutputDescriptor_read(ser: Uint8Array): number {
9026                 if(!isWasmInitialized) {
9027                         throw new Error("initializeWasm() must be awaited first!");
9028                 }
9029                 const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
9030                 return nativeResponseValue;
9031         }
9032         // void BaseSign_free(struct LDKBaseSign this_ptr);
9033         export function BaseSign_free(this_ptr: number): void {
9034                 if(!isWasmInitialized) {
9035                         throw new Error("initializeWasm() must be awaited first!");
9036                 }
9037                 const nativeResponseValue = wasm.BaseSign_free(this_ptr);
9038                 // debug statements here
9039         }
9040         // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
9041         export function Sign_clone(orig: number): number {
9042                 if(!isWasmInitialized) {
9043                         throw new Error("initializeWasm() must be awaited first!");
9044                 }
9045                 const nativeResponseValue = wasm.Sign_clone(orig);
9046                 return nativeResponseValue;
9047         }
9048         // void Sign_free(struct LDKSign this_ptr);
9049         export function Sign_free(this_ptr: number): void {
9050                 if(!isWasmInitialized) {
9051                         throw new Error("initializeWasm() must be awaited first!");
9052                 }
9053                 const nativeResponseValue = wasm.Sign_free(this_ptr);
9054                 // debug statements here
9055         }
9056         // void KeysInterface_free(struct LDKKeysInterface this_ptr);
9057         export function KeysInterface_free(this_ptr: number): void {
9058                 if(!isWasmInitialized) {
9059                         throw new Error("initializeWasm() must be awaited first!");
9060                 }
9061                 const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
9062                 // debug statements here
9063         }
9064         // void InMemorySigner_free(struct LDKInMemorySigner this_obj);
9065         export function InMemorySigner_free(this_obj: number): void {
9066                 if(!isWasmInitialized) {
9067                         throw new Error("initializeWasm() must be awaited first!");
9068                 }
9069                 const nativeResponseValue = wasm.InMemorySigner_free(this_obj);
9070                 // debug statements here
9071         }
9072         // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
9073         export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
9074                 if(!isWasmInitialized) {
9075                         throw new Error("initializeWasm() must be awaited first!");
9076                 }
9077                 const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
9078                 return decodeArray(nativeResponseValue);
9079         }
9080         // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
9081         export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
9082                 if(!isWasmInitialized) {
9083                         throw new Error("initializeWasm() must be awaited first!");
9084                 }
9085                 const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
9086                 // debug statements here
9087         }
9088         // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
9089         export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
9090                 if(!isWasmInitialized) {
9091                         throw new Error("initializeWasm() must be awaited first!");
9092                 }
9093                 const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
9094                 return decodeArray(nativeResponseValue);
9095         }
9096         // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
9097         export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
9098                 if(!isWasmInitialized) {
9099                         throw new Error("initializeWasm() must be awaited first!");
9100                 }
9101                 const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
9102                 // debug statements here
9103         }
9104         // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
9105         export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
9106                 if(!isWasmInitialized) {
9107                         throw new Error("initializeWasm() must be awaited first!");
9108                 }
9109                 const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
9110                 return decodeArray(nativeResponseValue);
9111         }
9112         // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
9113         export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
9114                 if(!isWasmInitialized) {
9115                         throw new Error("initializeWasm() must be awaited first!");
9116                 }
9117                 const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
9118                 // debug statements here
9119         }
9120         // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
9121         export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
9122                 if(!isWasmInitialized) {
9123                         throw new Error("initializeWasm() must be awaited first!");
9124                 }
9125                 const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
9126                 return decodeArray(nativeResponseValue);
9127         }
9128         // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
9129         export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
9130                 if(!isWasmInitialized) {
9131                         throw new Error("initializeWasm() must be awaited first!");
9132                 }
9133                 const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
9134                 // debug statements here
9135         }
9136         // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
9137         export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
9138                 if(!isWasmInitialized) {
9139                         throw new Error("initializeWasm() must be awaited first!");
9140                 }
9141                 const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
9142                 return decodeArray(nativeResponseValue);
9143         }
9144         // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
9145         export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
9146                 if(!isWasmInitialized) {
9147                         throw new Error("initializeWasm() must be awaited first!");
9148                 }
9149                 const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
9150                 // debug statements here
9151         }
9152         // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
9153         export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
9154                 if(!isWasmInitialized) {
9155                         throw new Error("initializeWasm() must be awaited first!");
9156                 }
9157                 const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
9158                 return decodeArray(nativeResponseValue);
9159         }
9160         // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9161         export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
9162                 if(!isWasmInitialized) {
9163                         throw new Error("initializeWasm() must be awaited first!");
9164                 }
9165                 const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
9166                 // debug statements here
9167         }
9168         // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
9169         export function InMemorySigner_clone(orig: number): number {
9170                 if(!isWasmInitialized) {
9171                         throw new Error("initializeWasm() must be awaited first!");
9172                 }
9173                 const nativeResponseValue = wasm.InMemorySigner_clone(orig);
9174                 return nativeResponseValue;
9175         }
9176         // 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);
9177         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 {
9178                 if(!isWasmInitialized) {
9179                         throw new Error("initializeWasm() must be awaited first!");
9180                 }
9181                 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));
9182                 return nativeResponseValue;
9183         }
9184         // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9185         export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
9186                 if(!isWasmInitialized) {
9187                         throw new Error("initializeWasm() must be awaited first!");
9188                 }
9189                 const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
9190                 return nativeResponseValue;
9191         }
9192         // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9193         export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
9194                 if(!isWasmInitialized) {
9195                         throw new Error("initializeWasm() must be awaited first!");
9196                 }
9197                 const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
9198                 return nativeResponseValue;
9199         }
9200         // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9201         export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
9202                 if(!isWasmInitialized) {
9203                         throw new Error("initializeWasm() must be awaited first!");
9204                 }
9205                 const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
9206                 return nativeResponseValue;
9207         }
9208         // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9209         export function InMemorySigner_is_outbound(this_arg: number): boolean {
9210                 if(!isWasmInitialized) {
9211                         throw new Error("initializeWasm() must be awaited first!");
9212                 }
9213                 const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
9214                 return nativeResponseValue;
9215         }
9216         // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9217         export function InMemorySigner_funding_outpoint(this_arg: number): number {
9218                 if(!isWasmInitialized) {
9219                         throw new Error("initializeWasm() must be awaited first!");
9220                 }
9221                 const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
9222                 return nativeResponseValue;
9223         }
9224         // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9225         export function InMemorySigner_get_channel_parameters(this_arg: number): number {
9226                 if(!isWasmInitialized) {
9227                         throw new Error("initializeWasm() must be awaited first!");
9228                 }
9229                 const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
9230                 return nativeResponseValue;
9231         }
9232         // 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);
9233         export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
9234                 if(!isWasmInitialized) {
9235                         throw new Error("initializeWasm() must be awaited first!");
9236                 }
9237                 const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
9238                 return nativeResponseValue;
9239         }
9240         // 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);
9241         export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
9242                 if(!isWasmInitialized) {
9243                         throw new Error("initializeWasm() must be awaited first!");
9244                 }
9245                 const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
9246                 return nativeResponseValue;
9247         }
9248         // struct LDKBaseSign InMemorySigner_as_BaseSign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9249         export function InMemorySigner_as_BaseSign(this_arg: number): number {
9250                 if(!isWasmInitialized) {
9251                         throw new Error("initializeWasm() must be awaited first!");
9252                 }
9253                 const nativeResponseValue = wasm.InMemorySigner_as_BaseSign(this_arg);
9254                 return nativeResponseValue;
9255         }
9256         // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
9257         export function InMemorySigner_as_Sign(this_arg: number): number {
9258                 if(!isWasmInitialized) {
9259                         throw new Error("initializeWasm() must be awaited first!");
9260                 }
9261                 const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
9262                 return nativeResponseValue;
9263         }
9264         // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
9265         export function InMemorySigner_write(obj: number): Uint8Array {
9266                 if(!isWasmInitialized) {
9267                         throw new Error("initializeWasm() must be awaited first!");
9268                 }
9269                 const nativeResponseValue = wasm.InMemorySigner_write(obj);
9270                 return decodeArray(nativeResponseValue);
9271         }
9272         // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
9273         export function InMemorySigner_read(ser: Uint8Array): number {
9274                 if(!isWasmInitialized) {
9275                         throw new Error("initializeWasm() must be awaited first!");
9276                 }
9277                 const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
9278                 return nativeResponseValue;
9279         }
9280         // void KeysManager_free(struct LDKKeysManager this_obj);
9281         export function KeysManager_free(this_obj: number): void {
9282                 if(!isWasmInitialized) {
9283                         throw new Error("initializeWasm() must be awaited first!");
9284                 }
9285                 const nativeResponseValue = wasm.KeysManager_free(this_obj);
9286                 // debug statements here
9287         }
9288         // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
9289         export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
9290                 if(!isWasmInitialized) {
9291                         throw new Error("initializeWasm() must be awaited first!");
9292                 }
9293                 const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
9294                 return nativeResponseValue;
9295         }
9296         // 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]);
9297         export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
9298                 if(!isWasmInitialized) {
9299                         throw new Error("initializeWasm() must be awaited first!");
9300                 }
9301                 const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
9302                 return nativeResponseValue;
9303         }
9304         // 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);
9305         export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
9306                 if(!isWasmInitialized) {
9307                         throw new Error("initializeWasm() must be awaited first!");
9308                 }
9309                 const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
9310                 return nativeResponseValue;
9311         }
9312         // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
9313         export function KeysManager_as_KeysInterface(this_arg: number): number {
9314                 if(!isWasmInitialized) {
9315                         throw new Error("initializeWasm() must be awaited first!");
9316                 }
9317                 const nativeResponseValue = wasm.KeysManager_as_KeysInterface(this_arg);
9318                 return nativeResponseValue;
9319         }
9320         // void PaymentId_free(struct LDKPaymentId this_obj);
9321         export function PaymentId_free(this_obj: number): void {
9322                 if(!isWasmInitialized) {
9323                         throw new Error("initializeWasm() must be awaited first!");
9324                 }
9325                 const nativeResponseValue = wasm.PaymentId_free(this_obj);
9326                 // debug statements here
9327         }
9328         // uint64_t PaymentId_hash(const struct LDKPaymentId *NONNULL_PTR o);
9329         export function PaymentId_hash(o: number): number {
9330                 if(!isWasmInitialized) {
9331                         throw new Error("initializeWasm() must be awaited first!");
9332                 }
9333                 const nativeResponseValue = wasm.PaymentId_hash(o);
9334                 return nativeResponseValue;
9335         }
9336         // struct LDKPaymentId PaymentId_clone(const struct LDKPaymentId *NONNULL_PTR orig);
9337         export function PaymentId_clone(orig: number): number {
9338                 if(!isWasmInitialized) {
9339                         throw new Error("initializeWasm() must be awaited first!");
9340                 }
9341                 const nativeResponseValue = wasm.PaymentId_clone(orig);
9342                 return nativeResponseValue;
9343         }
9344         // bool PaymentId_eq(const struct LDKPaymentId *NONNULL_PTR a, const struct LDKPaymentId *NONNULL_PTR b);
9345         export function PaymentId_eq(a: number, b: number): boolean {
9346                 if(!isWasmInitialized) {
9347                         throw new Error("initializeWasm() must be awaited first!");
9348                 }
9349                 const nativeResponseValue = wasm.PaymentId_eq(a, b);
9350                 return nativeResponseValue;
9351         }
9352         // struct LDKCVec_u8Z PaymentId_write(const struct LDKPaymentId *NONNULL_PTR obj);
9353         export function PaymentId_write(obj: number): Uint8Array {
9354                 if(!isWasmInitialized) {
9355                         throw new Error("initializeWasm() must be awaited first!");
9356                 }
9357                 const nativeResponseValue = wasm.PaymentId_write(obj);
9358                 return decodeArray(nativeResponseValue);
9359         }
9360         // struct LDKCResult_PaymentIdDecodeErrorZ PaymentId_read(struct LDKu8slice ser);
9361         export function PaymentId_read(ser: Uint8Array): number {
9362                 if(!isWasmInitialized) {
9363                         throw new Error("initializeWasm() must be awaited first!");
9364                 }
9365                 const nativeResponseValue = wasm.PaymentId_read(encodeArray(ser));
9366                 return nativeResponseValue;
9367         }
9368         // void ChannelManager_free(struct LDKChannelManager this_obj);
9369         export function ChannelManager_free(this_obj: number): void {
9370                 if(!isWasmInitialized) {
9371                         throw new Error("initializeWasm() must be awaited first!");
9372                 }
9373                 const nativeResponseValue = wasm.ChannelManager_free(this_obj);
9374                 // debug statements here
9375         }
9376         // void ChainParameters_free(struct LDKChainParameters this_obj);
9377         export function ChainParameters_free(this_obj: number): void {
9378                 if(!isWasmInitialized) {
9379                         throw new Error("initializeWasm() must be awaited first!");
9380                 }
9381                 const nativeResponseValue = wasm.ChainParameters_free(this_obj);
9382                 // debug statements here
9383         }
9384         // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
9385         export function ChainParameters_get_network(this_ptr: number): Network {
9386                 if(!isWasmInitialized) {
9387                         throw new Error("initializeWasm() must be awaited first!");
9388                 }
9389                 const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
9390                 return nativeResponseValue;
9391         }
9392         // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
9393         export function ChainParameters_set_network(this_ptr: number, val: Network): void {
9394                 if(!isWasmInitialized) {
9395                         throw new Error("initializeWasm() must be awaited first!");
9396                 }
9397                 const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
9398                 // debug statements here
9399         }
9400         // struct LDKBestBlock ChainParameters_get_best_block(const struct LDKChainParameters *NONNULL_PTR this_ptr);
9401         export function ChainParameters_get_best_block(this_ptr: number): number {
9402                 if(!isWasmInitialized) {
9403                         throw new Error("initializeWasm() must be awaited first!");
9404                 }
9405                 const nativeResponseValue = wasm.ChainParameters_get_best_block(this_ptr);
9406                 return nativeResponseValue;
9407         }
9408         // void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKBestBlock val);
9409         export function ChainParameters_set_best_block(this_ptr: number, val: number): void {
9410                 if(!isWasmInitialized) {
9411                         throw new Error("initializeWasm() must be awaited first!");
9412                 }
9413                 const nativeResponseValue = wasm.ChainParameters_set_best_block(this_ptr, val);
9414                 // debug statements here
9415         }
9416         // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg);
9417         export function ChainParameters_new(network_arg: Network, best_block_arg: number): number {
9418                 if(!isWasmInitialized) {
9419                         throw new Error("initializeWasm() must be awaited first!");
9420                 }
9421                 const nativeResponseValue = wasm.ChainParameters_new(network_arg, best_block_arg);
9422                 return nativeResponseValue;
9423         }
9424         // struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig);
9425         export function ChainParameters_clone(orig: number): number {
9426                 if(!isWasmInitialized) {
9427                         throw new Error("initializeWasm() must be awaited first!");
9428                 }
9429                 const nativeResponseValue = wasm.ChainParameters_clone(orig);
9430                 return nativeResponseValue;
9431         }
9432         // void CounterpartyForwardingInfo_free(struct LDKCounterpartyForwardingInfo this_obj);
9433         export function CounterpartyForwardingInfo_free(this_obj: number): void {
9434                 if(!isWasmInitialized) {
9435                         throw new Error("initializeWasm() must be awaited first!");
9436                 }
9437                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_free(this_obj);
9438                 // debug statements here
9439         }
9440         // uint32_t CounterpartyForwardingInfo_get_fee_base_msat(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
9441         export function CounterpartyForwardingInfo_get_fee_base_msat(this_ptr: number): number {
9442                 if(!isWasmInitialized) {
9443                         throw new Error("initializeWasm() must be awaited first!");
9444                 }
9445                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_fee_base_msat(this_ptr);
9446                 return nativeResponseValue;
9447         }
9448         // void CounterpartyForwardingInfo_set_fee_base_msat(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
9449         export function CounterpartyForwardingInfo_set_fee_base_msat(this_ptr: number, val: number): void {
9450                 if(!isWasmInitialized) {
9451                         throw new Error("initializeWasm() must be awaited first!");
9452                 }
9453                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_fee_base_msat(this_ptr, val);
9454                 // debug statements here
9455         }
9456         // uint32_t CounterpartyForwardingInfo_get_fee_proportional_millionths(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
9457         export function CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr: number): number {
9458                 if(!isWasmInitialized) {
9459                         throw new Error("initializeWasm() must be awaited first!");
9460                 }
9461                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_fee_proportional_millionths(this_ptr);
9462                 return nativeResponseValue;
9463         }
9464         // void CounterpartyForwardingInfo_set_fee_proportional_millionths(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint32_t val);
9465         export function CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr: number, val: number): void {
9466                 if(!isWasmInitialized) {
9467                         throw new Error("initializeWasm() must be awaited first!");
9468                 }
9469                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_fee_proportional_millionths(this_ptr, val);
9470                 // debug statements here
9471         }
9472         // uint16_t CounterpartyForwardingInfo_get_cltv_expiry_delta(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr);
9473         export function CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr: number): number {
9474                 if(!isWasmInitialized) {
9475                         throw new Error("initializeWasm() must be awaited first!");
9476                 }
9477                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_get_cltv_expiry_delta(this_ptr);
9478                 return nativeResponseValue;
9479         }
9480         // void CounterpartyForwardingInfo_set_cltv_expiry_delta(struct LDKCounterpartyForwardingInfo *NONNULL_PTR this_ptr, uint16_t val);
9481         export function CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
9482                 if(!isWasmInitialized) {
9483                         throw new Error("initializeWasm() must be awaited first!");
9484                 }
9485                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_set_cltv_expiry_delta(this_ptr, val);
9486                 // debug statements here
9487         }
9488         // 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);
9489         export function CounterpartyForwardingInfo_new(fee_base_msat_arg: number, fee_proportional_millionths_arg: number, cltv_expiry_delta_arg: number): number {
9490                 if(!isWasmInitialized) {
9491                         throw new Error("initializeWasm() must be awaited first!");
9492                 }
9493                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_new(fee_base_msat_arg, fee_proportional_millionths_arg, cltv_expiry_delta_arg);
9494                 return nativeResponseValue;
9495         }
9496         // struct LDKCounterpartyForwardingInfo CounterpartyForwardingInfo_clone(const struct LDKCounterpartyForwardingInfo *NONNULL_PTR orig);
9497         export function CounterpartyForwardingInfo_clone(orig: number): number {
9498                 if(!isWasmInitialized) {
9499                         throw new Error("initializeWasm() must be awaited first!");
9500                 }
9501                 const nativeResponseValue = wasm.CounterpartyForwardingInfo_clone(orig);
9502                 return nativeResponseValue;
9503         }
9504         // void ChannelCounterparty_free(struct LDKChannelCounterparty this_obj);
9505         export function ChannelCounterparty_free(this_obj: number): void {
9506                 if(!isWasmInitialized) {
9507                         throw new Error("initializeWasm() must be awaited first!");
9508                 }
9509                 const nativeResponseValue = wasm.ChannelCounterparty_free(this_obj);
9510                 // debug statements here
9511         }
9512         // struct LDKPublicKey ChannelCounterparty_get_node_id(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
9513         export function ChannelCounterparty_get_node_id(this_ptr: number): Uint8Array {
9514                 if(!isWasmInitialized) {
9515                         throw new Error("initializeWasm() must be awaited first!");
9516                 }
9517                 const nativeResponseValue = wasm.ChannelCounterparty_get_node_id(this_ptr);
9518                 return decodeArray(nativeResponseValue);
9519         }
9520         // void ChannelCounterparty_set_node_id(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKPublicKey val);
9521         export function ChannelCounterparty_set_node_id(this_ptr: number, val: Uint8Array): void {
9522                 if(!isWasmInitialized) {
9523                         throw new Error("initializeWasm() must be awaited first!");
9524                 }
9525                 const nativeResponseValue = wasm.ChannelCounterparty_set_node_id(this_ptr, encodeArray(val));
9526                 // debug statements here
9527         }
9528         // struct LDKInitFeatures ChannelCounterparty_get_features(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
9529         export function ChannelCounterparty_get_features(this_ptr: number): number {
9530                 if(!isWasmInitialized) {
9531                         throw new Error("initializeWasm() must be awaited first!");
9532                 }
9533                 const nativeResponseValue = wasm.ChannelCounterparty_get_features(this_ptr);
9534                 return nativeResponseValue;
9535         }
9536         // void ChannelCounterparty_set_features(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
9537         export function ChannelCounterparty_set_features(this_ptr: number, val: number): void {
9538                 if(!isWasmInitialized) {
9539                         throw new Error("initializeWasm() must be awaited first!");
9540                 }
9541                 const nativeResponseValue = wasm.ChannelCounterparty_set_features(this_ptr, val);
9542                 // debug statements here
9543         }
9544         // uint64_t ChannelCounterparty_get_unspendable_punishment_reserve(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
9545         export function ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr: number): number {
9546                 if(!isWasmInitialized) {
9547                         throw new Error("initializeWasm() must be awaited first!");
9548                 }
9549                 const nativeResponseValue = wasm.ChannelCounterparty_get_unspendable_punishment_reserve(this_ptr);
9550                 return nativeResponseValue;
9551         }
9552         // void ChannelCounterparty_set_unspendable_punishment_reserve(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, uint64_t val);
9553         export function ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
9554                 if(!isWasmInitialized) {
9555                         throw new Error("initializeWasm() must be awaited first!");
9556                 }
9557                 const nativeResponseValue = wasm.ChannelCounterparty_set_unspendable_punishment_reserve(this_ptr, val);
9558                 // debug statements here
9559         }
9560         // struct LDKCounterpartyForwardingInfo ChannelCounterparty_get_forwarding_info(const struct LDKChannelCounterparty *NONNULL_PTR this_ptr);
9561         export function ChannelCounterparty_get_forwarding_info(this_ptr: number): number {
9562                 if(!isWasmInitialized) {
9563                         throw new Error("initializeWasm() must be awaited first!");
9564                 }
9565                 const nativeResponseValue = wasm.ChannelCounterparty_get_forwarding_info(this_ptr);
9566                 return nativeResponseValue;
9567         }
9568         // void ChannelCounterparty_set_forwarding_info(struct LDKChannelCounterparty *NONNULL_PTR this_ptr, struct LDKCounterpartyForwardingInfo val);
9569         export function ChannelCounterparty_set_forwarding_info(this_ptr: number, val: number): void {
9570                 if(!isWasmInitialized) {
9571                         throw new Error("initializeWasm() must be awaited first!");
9572                 }
9573                 const nativeResponseValue = wasm.ChannelCounterparty_set_forwarding_info(this_ptr, val);
9574                 // debug statements here
9575         }
9576         // 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);
9577         export function ChannelCounterparty_new(node_id_arg: Uint8Array, features_arg: number, unspendable_punishment_reserve_arg: number, forwarding_info_arg: number): number {
9578                 if(!isWasmInitialized) {
9579                         throw new Error("initializeWasm() must be awaited first!");
9580                 }
9581                 const nativeResponseValue = wasm.ChannelCounterparty_new(encodeArray(node_id_arg), features_arg, unspendable_punishment_reserve_arg, forwarding_info_arg);
9582                 return nativeResponseValue;
9583         }
9584         // struct LDKChannelCounterparty ChannelCounterparty_clone(const struct LDKChannelCounterparty *NONNULL_PTR orig);
9585         export function ChannelCounterparty_clone(orig: number): number {
9586                 if(!isWasmInitialized) {
9587                         throw new Error("initializeWasm() must be awaited first!");
9588                 }
9589                 const nativeResponseValue = wasm.ChannelCounterparty_clone(orig);
9590                 return nativeResponseValue;
9591         }
9592         // void ChannelDetails_free(struct LDKChannelDetails this_obj);
9593         export function ChannelDetails_free(this_obj: number): void {
9594                 if(!isWasmInitialized) {
9595                         throw new Error("initializeWasm() must be awaited first!");
9596                 }
9597                 const nativeResponseValue = wasm.ChannelDetails_free(this_obj);
9598                 // debug statements here
9599         }
9600         // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
9601         export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
9602                 if(!isWasmInitialized) {
9603                         throw new Error("initializeWasm() must be awaited first!");
9604                 }
9605                 const nativeResponseValue = wasm.ChannelDetails_get_channel_id(this_ptr);
9606                 return decodeArray(nativeResponseValue);
9607         }
9608         // void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
9609         export function ChannelDetails_set_channel_id(this_ptr: number, val: Uint8Array): void {
9610                 if(!isWasmInitialized) {
9611                         throw new Error("initializeWasm() must be awaited first!");
9612                 }
9613                 const nativeResponseValue = wasm.ChannelDetails_set_channel_id(this_ptr, encodeArray(val));
9614                 // debug statements here
9615         }
9616         // struct LDKChannelCounterparty ChannelDetails_get_counterparty(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9617         export function ChannelDetails_get_counterparty(this_ptr: number): number {
9618                 if(!isWasmInitialized) {
9619                         throw new Error("initializeWasm() must be awaited first!");
9620                 }
9621                 const nativeResponseValue = wasm.ChannelDetails_get_counterparty(this_ptr);
9622                 return nativeResponseValue;
9623         }
9624         // void ChannelDetails_set_counterparty(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKChannelCounterparty val);
9625         export function ChannelDetails_set_counterparty(this_ptr: number, val: number): void {
9626                 if(!isWasmInitialized) {
9627                         throw new Error("initializeWasm() must be awaited first!");
9628                 }
9629                 const nativeResponseValue = wasm.ChannelDetails_set_counterparty(this_ptr, val);
9630                 // debug statements here
9631         }
9632         // struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9633         export function ChannelDetails_get_funding_txo(this_ptr: number): number {
9634                 if(!isWasmInitialized) {
9635                         throw new Error("initializeWasm() must be awaited first!");
9636                 }
9637                 const nativeResponseValue = wasm.ChannelDetails_get_funding_txo(this_ptr);
9638                 return nativeResponseValue;
9639         }
9640         // void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val);
9641         export function ChannelDetails_set_funding_txo(this_ptr: number, val: number): void {
9642                 if(!isWasmInitialized) {
9643                         throw new Error("initializeWasm() must be awaited first!");
9644                 }
9645                 const nativeResponseValue = wasm.ChannelDetails_set_funding_txo(this_ptr, val);
9646                 // debug statements here
9647         }
9648         // struct LDKCOption_u64Z ChannelDetails_get_short_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9649         export function ChannelDetails_get_short_channel_id(this_ptr: number): number {
9650                 if(!isWasmInitialized) {
9651                         throw new Error("initializeWasm() must be awaited first!");
9652                 }
9653                 const nativeResponseValue = wasm.ChannelDetails_get_short_channel_id(this_ptr);
9654                 return nativeResponseValue;
9655         }
9656         // void ChannelDetails_set_short_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
9657         export function ChannelDetails_set_short_channel_id(this_ptr: number, val: number): void {
9658                 if(!isWasmInitialized) {
9659                         throw new Error("initializeWasm() must be awaited first!");
9660                 }
9661                 const nativeResponseValue = wasm.ChannelDetails_set_short_channel_id(this_ptr, val);
9662                 // debug statements here
9663         }
9664         // uint64_t ChannelDetails_get_channel_value_satoshis(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9665         export function ChannelDetails_get_channel_value_satoshis(this_ptr: number): number {
9666                 if(!isWasmInitialized) {
9667                         throw new Error("initializeWasm() must be awaited first!");
9668                 }
9669                 const nativeResponseValue = wasm.ChannelDetails_get_channel_value_satoshis(this_ptr);
9670                 return nativeResponseValue;
9671         }
9672         // void ChannelDetails_set_channel_value_satoshis(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
9673         export function ChannelDetails_set_channel_value_satoshis(this_ptr: number, val: number): void {
9674                 if(!isWasmInitialized) {
9675                         throw new Error("initializeWasm() must be awaited first!");
9676                 }
9677                 const nativeResponseValue = wasm.ChannelDetails_set_channel_value_satoshis(this_ptr, val);
9678                 // debug statements here
9679         }
9680         // struct LDKCOption_u64Z ChannelDetails_get_unspendable_punishment_reserve(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9681         export function ChannelDetails_get_unspendable_punishment_reserve(this_ptr: number): number {
9682                 if(!isWasmInitialized) {
9683                         throw new Error("initializeWasm() must be awaited first!");
9684                 }
9685                 const nativeResponseValue = wasm.ChannelDetails_get_unspendable_punishment_reserve(this_ptr);
9686                 return nativeResponseValue;
9687         }
9688         // void ChannelDetails_set_unspendable_punishment_reserve(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
9689         export function ChannelDetails_set_unspendable_punishment_reserve(this_ptr: number, val: number): void {
9690                 if(!isWasmInitialized) {
9691                         throw new Error("initializeWasm() must be awaited first!");
9692                 }
9693                 const nativeResponseValue = wasm.ChannelDetails_set_unspendable_punishment_reserve(this_ptr, val);
9694                 // debug statements here
9695         }
9696         // uint64_t ChannelDetails_get_user_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9697         export function ChannelDetails_get_user_channel_id(this_ptr: number): number {
9698                 if(!isWasmInitialized) {
9699                         throw new Error("initializeWasm() must be awaited first!");
9700                 }
9701                 const nativeResponseValue = wasm.ChannelDetails_get_user_channel_id(this_ptr);
9702                 return nativeResponseValue;
9703         }
9704         // void ChannelDetails_set_user_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
9705         export function ChannelDetails_set_user_channel_id(this_ptr: number, val: number): void {
9706                 if(!isWasmInitialized) {
9707                         throw new Error("initializeWasm() must be awaited first!");
9708                 }
9709                 const nativeResponseValue = wasm.ChannelDetails_set_user_channel_id(this_ptr, val);
9710                 // debug statements here
9711         }
9712         // uint64_t ChannelDetails_get_outbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9713         export function ChannelDetails_get_outbound_capacity_msat(this_ptr: number): number {
9714                 if(!isWasmInitialized) {
9715                         throw new Error("initializeWasm() must be awaited first!");
9716                 }
9717                 const nativeResponseValue = wasm.ChannelDetails_get_outbound_capacity_msat(this_ptr);
9718                 return nativeResponseValue;
9719         }
9720         // void ChannelDetails_set_outbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
9721         export function ChannelDetails_set_outbound_capacity_msat(this_ptr: number, val: number): void {
9722                 if(!isWasmInitialized) {
9723                         throw new Error("initializeWasm() must be awaited first!");
9724                 }
9725                 const nativeResponseValue = wasm.ChannelDetails_set_outbound_capacity_msat(this_ptr, val);
9726                 // debug statements here
9727         }
9728         // uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9729         export function ChannelDetails_get_inbound_capacity_msat(this_ptr: number): number {
9730                 if(!isWasmInitialized) {
9731                         throw new Error("initializeWasm() must be awaited first!");
9732                 }
9733                 const nativeResponseValue = wasm.ChannelDetails_get_inbound_capacity_msat(this_ptr);
9734                 return nativeResponseValue;
9735         }
9736         // void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val);
9737         export function ChannelDetails_set_inbound_capacity_msat(this_ptr: number, val: number): void {
9738                 if(!isWasmInitialized) {
9739                         throw new Error("initializeWasm() must be awaited first!");
9740                 }
9741                 const nativeResponseValue = wasm.ChannelDetails_set_inbound_capacity_msat(this_ptr, val);
9742                 // debug statements here
9743         }
9744         // struct LDKCOption_u32Z ChannelDetails_get_confirmations_required(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9745         export function ChannelDetails_get_confirmations_required(this_ptr: number): number {
9746                 if(!isWasmInitialized) {
9747                         throw new Error("initializeWasm() must be awaited first!");
9748                 }
9749                 const nativeResponseValue = wasm.ChannelDetails_get_confirmations_required(this_ptr);
9750                 return nativeResponseValue;
9751         }
9752         // void ChannelDetails_set_confirmations_required(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
9753         export function ChannelDetails_set_confirmations_required(this_ptr: number, val: number): void {
9754                 if(!isWasmInitialized) {
9755                         throw new Error("initializeWasm() must be awaited first!");
9756                 }
9757                 const nativeResponseValue = wasm.ChannelDetails_set_confirmations_required(this_ptr, val);
9758                 // debug statements here
9759         }
9760         // struct LDKCOption_u16Z ChannelDetails_get_force_close_spend_delay(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9761         export function ChannelDetails_get_force_close_spend_delay(this_ptr: number): number {
9762                 if(!isWasmInitialized) {
9763                         throw new Error("initializeWasm() must be awaited first!");
9764                 }
9765                 const nativeResponseValue = wasm.ChannelDetails_get_force_close_spend_delay(this_ptr);
9766                 return nativeResponseValue;
9767         }
9768         // void ChannelDetails_set_force_close_spend_delay(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKCOption_u16Z val);
9769         export function ChannelDetails_set_force_close_spend_delay(this_ptr: number, val: number): void {
9770                 if(!isWasmInitialized) {
9771                         throw new Error("initializeWasm() must be awaited first!");
9772                 }
9773                 const nativeResponseValue = wasm.ChannelDetails_set_force_close_spend_delay(this_ptr, val);
9774                 // debug statements here
9775         }
9776         // bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9777         export function ChannelDetails_get_is_outbound(this_ptr: number): boolean {
9778                 if(!isWasmInitialized) {
9779                         throw new Error("initializeWasm() must be awaited first!");
9780                 }
9781                 const nativeResponseValue = wasm.ChannelDetails_get_is_outbound(this_ptr);
9782                 return nativeResponseValue;
9783         }
9784         // void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
9785         export function ChannelDetails_set_is_outbound(this_ptr: number, val: boolean): void {
9786                 if(!isWasmInitialized) {
9787                         throw new Error("initializeWasm() must be awaited first!");
9788                 }
9789                 const nativeResponseValue = wasm.ChannelDetails_set_is_outbound(this_ptr, val);
9790                 // debug statements here
9791         }
9792         // bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9793         export function ChannelDetails_get_is_funding_locked(this_ptr: number): boolean {
9794                 if(!isWasmInitialized) {
9795                         throw new Error("initializeWasm() must be awaited first!");
9796                 }
9797                 const nativeResponseValue = wasm.ChannelDetails_get_is_funding_locked(this_ptr);
9798                 return nativeResponseValue;
9799         }
9800         // void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
9801         export function ChannelDetails_set_is_funding_locked(this_ptr: number, val: boolean): void {
9802                 if(!isWasmInitialized) {
9803                         throw new Error("initializeWasm() must be awaited first!");
9804                 }
9805                 const nativeResponseValue = wasm.ChannelDetails_set_is_funding_locked(this_ptr, val);
9806                 // debug statements here
9807         }
9808         // bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9809         export function ChannelDetails_get_is_usable(this_ptr: number): boolean {
9810                 if(!isWasmInitialized) {
9811                         throw new Error("initializeWasm() must be awaited first!");
9812                 }
9813                 const nativeResponseValue = wasm.ChannelDetails_get_is_usable(this_ptr);
9814                 return nativeResponseValue;
9815         }
9816         // void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
9817         export function ChannelDetails_set_is_usable(this_ptr: number, val: boolean): void {
9818                 if(!isWasmInitialized) {
9819                         throw new Error("initializeWasm() must be awaited first!");
9820                 }
9821                 const nativeResponseValue = wasm.ChannelDetails_set_is_usable(this_ptr, val);
9822                 // debug statements here
9823         }
9824         // bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr);
9825         export function ChannelDetails_get_is_public(this_ptr: number): boolean {
9826                 if(!isWasmInitialized) {
9827                         throw new Error("initializeWasm() must be awaited first!");
9828                 }
9829                 const nativeResponseValue = wasm.ChannelDetails_get_is_public(this_ptr);
9830                 return nativeResponseValue;
9831         }
9832         // void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
9833         export function ChannelDetails_set_is_public(this_ptr: number, val: boolean): void {
9834                 if(!isWasmInitialized) {
9835                         throw new Error("initializeWasm() must be awaited first!");
9836                 }
9837                 const nativeResponseValue = wasm.ChannelDetails_set_is_public(this_ptr, val);
9838                 // debug statements here
9839         }
9840         // 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);
9841         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 {
9842                 if(!isWasmInitialized) {
9843                         throw new Error("initializeWasm() must be awaited first!");
9844                 }
9845                 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);
9846                 return nativeResponseValue;
9847         }
9848         // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
9849         export function ChannelDetails_clone(orig: number): number {
9850                 if(!isWasmInitialized) {
9851                         throw new Error("initializeWasm() must be awaited first!");
9852                 }
9853                 const nativeResponseValue = wasm.ChannelDetails_clone(orig);
9854                 return nativeResponseValue;
9855         }
9856         // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
9857         export function PaymentSendFailure_free(this_ptr: number): void {
9858                 if(!isWasmInitialized) {
9859                         throw new Error("initializeWasm() must be awaited first!");
9860                 }
9861                 const nativeResponseValue = wasm.PaymentSendFailure_free(this_ptr);
9862                 // debug statements here
9863         }
9864         // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
9865         export function PaymentSendFailure_clone(orig: number): number {
9866                 if(!isWasmInitialized) {
9867                         throw new Error("initializeWasm() must be awaited first!");
9868                 }
9869                 const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
9870                 return nativeResponseValue;
9871         }
9872         // struct LDKPaymentSendFailure PaymentSendFailure_parameter_error(struct LDKAPIError a);
9873         export function PaymentSendFailure_parameter_error(a: number): number {
9874                 if(!isWasmInitialized) {
9875                         throw new Error("initializeWasm() must be awaited first!");
9876                 }
9877                 const nativeResponseValue = wasm.PaymentSendFailure_parameter_error(a);
9878                 return nativeResponseValue;
9879         }
9880         // struct LDKPaymentSendFailure PaymentSendFailure_path_parameter_error(struct LDKCVec_CResult_NoneAPIErrorZZ a);
9881         export function PaymentSendFailure_path_parameter_error(a: number[]): number {
9882                 if(!isWasmInitialized) {
9883                         throw new Error("initializeWasm() must be awaited first!");
9884                 }
9885                 const nativeResponseValue = wasm.PaymentSendFailure_path_parameter_error(a);
9886                 return nativeResponseValue;
9887         }
9888         // struct LDKPaymentSendFailure PaymentSendFailure_all_failed_retry_safe(struct LDKCVec_APIErrorZ a);
9889         export function PaymentSendFailure_all_failed_retry_safe(a: number[]): number {
9890                 if(!isWasmInitialized) {
9891                         throw new Error("initializeWasm() must be awaited first!");
9892                 }
9893                 const nativeResponseValue = wasm.PaymentSendFailure_all_failed_retry_safe(a);
9894                 return nativeResponseValue;
9895         }
9896         // struct LDKPaymentSendFailure PaymentSendFailure_partial_failure(struct LDKCVec_CResult_NoneAPIErrorZZ a);
9897         export function PaymentSendFailure_partial_failure(a: number[]): number {
9898                 if(!isWasmInitialized) {
9899                         throw new Error("initializeWasm() must be awaited first!");
9900                 }
9901                 const nativeResponseValue = wasm.PaymentSendFailure_partial_failure(a);
9902                 return nativeResponseValue;
9903         }
9904         // 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);
9905         export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
9906                 if(!isWasmInitialized) {
9907                         throw new Error("initializeWasm() must be awaited first!");
9908                 }
9909                 const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
9910                 return nativeResponseValue;
9911         }
9912         // MUST_USE_RES struct LDKUserConfig ChannelManager_get_current_default_configuration(const struct LDKChannelManager *NONNULL_PTR this_arg);
9913         export function ChannelManager_get_current_default_configuration(this_arg: number): number {
9914                 if(!isWasmInitialized) {
9915                         throw new Error("initializeWasm() must be awaited first!");
9916                 }
9917                 const nativeResponseValue = wasm.ChannelManager_get_current_default_configuration(this_arg);
9918                 return nativeResponseValue;
9919         }
9920         // 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);
9921         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 {
9922                 if(!isWasmInitialized) {
9923                         throw new Error("initializeWasm() must be awaited first!");
9924                 }
9925                 const nativeResponseValue = wasm.ChannelManager_create_channel(this_arg, encodeArray(their_network_key), channel_value_satoshis, push_msat, user_channel_id, override_config);
9926                 return nativeResponseValue;
9927         }
9928         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
9929         export function ChannelManager_list_channels(this_arg: number): number[] {
9930                 if(!isWasmInitialized) {
9931                         throw new Error("initializeWasm() must be awaited first!");
9932                 }
9933                 const nativeResponseValue = wasm.ChannelManager_list_channels(this_arg);
9934                 return nativeResponseValue;
9935         }
9936         // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
9937         export function ChannelManager_list_usable_channels(this_arg: number): number[] {
9938                 if(!isWasmInitialized) {
9939                         throw new Error("initializeWasm() must be awaited first!");
9940                 }
9941                 const nativeResponseValue = wasm.ChannelManager_list_usable_channels(this_arg);
9942                 return nativeResponseValue;
9943         }
9944         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
9945         export function ChannelManager_close_channel(this_arg: number, channel_id: Uint8Array): number {
9946                 if(!isWasmInitialized) {
9947                         throw new Error("initializeWasm() must be awaited first!");
9948                 }
9949                 const nativeResponseValue = wasm.ChannelManager_close_channel(this_arg, encodeArray(channel_id));
9950                 return nativeResponseValue;
9951         }
9952         // 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);
9953         export function ChannelManager_close_channel_with_target_feerate(this_arg: number, channel_id: Uint8Array, target_feerate_sats_per_1000_weight: number): number {
9954                 if(!isWasmInitialized) {
9955                         throw new Error("initializeWasm() must be awaited first!");
9956                 }
9957                 const nativeResponseValue = wasm.ChannelManager_close_channel_with_target_feerate(this_arg, encodeArray(channel_id), target_feerate_sats_per_1000_weight);
9958                 return nativeResponseValue;
9959         }
9960         // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_force_close_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*channel_id)[32]);
9961         export function ChannelManager_force_close_channel(this_arg: number, channel_id: Uint8Array): number {
9962                 if(!isWasmInitialized) {
9963                         throw new Error("initializeWasm() must be awaited first!");
9964                 }
9965                 const nativeResponseValue = wasm.ChannelManager_force_close_channel(this_arg, encodeArray(channel_id));
9966                 return nativeResponseValue;
9967         }
9968         // void ChannelManager_force_close_all_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
9969         export function ChannelManager_force_close_all_channels(this_arg: number): void {
9970                 if(!isWasmInitialized) {
9971                         throw new Error("initializeWasm() must be awaited first!");
9972                 }
9973                 const nativeResponseValue = wasm.ChannelManager_force_close_all_channels(this_arg);
9974                 // debug statements here
9975         }
9976         // 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);
9977         export function ChannelManager_send_payment(this_arg: number, route: number, payment_hash: Uint8Array, payment_secret: Uint8Array): number {
9978                 if(!isWasmInitialized) {
9979                         throw new Error("initializeWasm() must be awaited first!");
9980                 }
9981                 const nativeResponseValue = wasm.ChannelManager_send_payment(this_arg, route, encodeArray(payment_hash), encodeArray(payment_secret));
9982                 return nativeResponseValue;
9983         }
9984         // 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);
9985         export function ChannelManager_retry_payment(this_arg: number, route: number, payment_id: number): number {
9986                 if(!isWasmInitialized) {
9987                         throw new Error("initializeWasm() must be awaited first!");
9988                 }
9989                 const nativeResponseValue = wasm.ChannelManager_retry_payment(this_arg, route, payment_id);
9990                 return nativeResponseValue;
9991         }
9992         // 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);
9993         export function ChannelManager_send_spontaneous_payment(this_arg: number, route: number, payment_preimage: Uint8Array): number {
9994                 if(!isWasmInitialized) {
9995                         throw new Error("initializeWasm() must be awaited first!");
9996                 }
9997                 const nativeResponseValue = wasm.ChannelManager_send_spontaneous_payment(this_arg, route, encodeArray(payment_preimage));
9998                 return nativeResponseValue;
9999         }
10000         // 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);
10001         export function ChannelManager_funding_transaction_generated(this_arg: number, temporary_channel_id: Uint8Array, funding_transaction: Uint8Array): number {
10002                 if(!isWasmInitialized) {
10003                         throw new Error("initializeWasm() must be awaited first!");
10004                 }
10005                 const nativeResponseValue = wasm.ChannelManager_funding_transaction_generated(this_arg, encodeArray(temporary_channel_id), encodeArray(funding_transaction));
10006                 return nativeResponseValue;
10007         }
10008         // void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses);
10009         export function ChannelManager_broadcast_node_announcement(this_arg: number, rgb: Uint8Array, alias: Uint8Array, addresses: number[]): void {
10010                 if(!isWasmInitialized) {
10011                         throw new Error("initializeWasm() must be awaited first!");
10012                 }
10013                 const nativeResponseValue = wasm.ChannelManager_broadcast_node_announcement(this_arg, encodeArray(rgb), encodeArray(alias), addresses);
10014                 // debug statements here
10015         }
10016         // void ChannelManager_process_pending_htlc_forwards(const struct LDKChannelManager *NONNULL_PTR this_arg);
10017         export function ChannelManager_process_pending_htlc_forwards(this_arg: number): void {
10018                 if(!isWasmInitialized) {
10019                         throw new Error("initializeWasm() must be awaited first!");
10020                 }
10021                 const nativeResponseValue = wasm.ChannelManager_process_pending_htlc_forwards(this_arg);
10022                 // debug statements here
10023         }
10024         // void ChannelManager_timer_tick_occurred(const struct LDKChannelManager *NONNULL_PTR this_arg);
10025         export function ChannelManager_timer_tick_occurred(this_arg: number): void {
10026                 if(!isWasmInitialized) {
10027                         throw new Error("initializeWasm() must be awaited first!");
10028                 }
10029                 const nativeResponseValue = wasm.ChannelManager_timer_tick_occurred(this_arg);
10030                 // debug statements here
10031         }
10032         // MUST_USE_RES bool ChannelManager_fail_htlc_backwards(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*payment_hash)[32]);
10033         export function ChannelManager_fail_htlc_backwards(this_arg: number, payment_hash: Uint8Array): boolean {
10034                 if(!isWasmInitialized) {
10035                         throw new Error("initializeWasm() must be awaited first!");
10036                 }
10037                 const nativeResponseValue = wasm.ChannelManager_fail_htlc_backwards(this_arg, encodeArray(payment_hash));
10038                 return nativeResponseValue;
10039         }
10040         // MUST_USE_RES bool ChannelManager_claim_funds(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThirtyTwoBytes payment_preimage);
10041         export function ChannelManager_claim_funds(this_arg: number, payment_preimage: Uint8Array): boolean {
10042                 if(!isWasmInitialized) {
10043                         throw new Error("initializeWasm() must be awaited first!");
10044                 }
10045                 const nativeResponseValue = wasm.ChannelManager_claim_funds(this_arg, encodeArray(payment_preimage));
10046                 return nativeResponseValue;
10047         }
10048         // MUST_USE_RES struct LDKPublicKey ChannelManager_get_our_node_id(const struct LDKChannelManager *NONNULL_PTR this_arg);
10049         export function ChannelManager_get_our_node_id(this_arg: number): Uint8Array {
10050                 if(!isWasmInitialized) {
10051                         throw new Error("initializeWasm() must be awaited first!");
10052                 }
10053                 const nativeResponseValue = wasm.ChannelManager_get_our_node_id(this_arg);
10054                 return decodeArray(nativeResponseValue);
10055         }
10056         // 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);
10057         export function ChannelManager_channel_monitor_updated(this_arg: number, funding_txo: number, highest_applied_update_id: number): void {
10058                 if(!isWasmInitialized) {
10059                         throw new Error("initializeWasm() must be awaited first!");
10060                 }
10061                 const nativeResponseValue = wasm.ChannelManager_channel_monitor_updated(this_arg, funding_txo, highest_applied_update_id);
10062                 // debug statements here
10063         }
10064         // 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);
10065         export function ChannelManager_create_inbound_payment(this_arg: number, min_value_msat: number, invoice_expiry_delta_secs: number, user_payment_id: number): number {
10066                 if(!isWasmInitialized) {
10067                         throw new Error("initializeWasm() must be awaited first!");
10068                 }
10069                 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment(this_arg, min_value_msat, invoice_expiry_delta_secs, user_payment_id);
10070                 return nativeResponseValue;
10071         }
10072         // 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);
10073         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 {
10074                 if(!isWasmInitialized) {
10075                         throw new Error("initializeWasm() must be awaited first!");
10076                 }
10077                 const nativeResponseValue = wasm.ChannelManager_create_inbound_payment_for_hash(this_arg, encodeArray(payment_hash), min_value_msat, invoice_expiry_delta_secs, user_payment_id);
10078                 return nativeResponseValue;
10079         }
10080         // struct LDKMessageSendEventsProvider ChannelManager_as_MessageSendEventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
10081         export function ChannelManager_as_MessageSendEventsProvider(this_arg: number): number {
10082                 if(!isWasmInitialized) {
10083                         throw new Error("initializeWasm() must be awaited first!");
10084                 }
10085                 const nativeResponseValue = wasm.ChannelManager_as_MessageSendEventsProvider(this_arg);
10086                 return nativeResponseValue;
10087         }
10088         // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
10089         export function ChannelManager_as_EventsProvider(this_arg: number): number {
10090                 if(!isWasmInitialized) {
10091                         throw new Error("initializeWasm() must be awaited first!");
10092                 }
10093                 const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
10094                 return nativeResponseValue;
10095         }
10096         // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
10097         export function ChannelManager_as_Listen(this_arg: number): number {
10098                 if(!isWasmInitialized) {
10099                         throw new Error("initializeWasm() must be awaited first!");
10100                 }
10101                 const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
10102                 return nativeResponseValue;
10103         }
10104         // struct LDKConfirm ChannelManager_as_Confirm(const struct LDKChannelManager *NONNULL_PTR this_arg);
10105         export function ChannelManager_as_Confirm(this_arg: number): number {
10106                 if(!isWasmInitialized) {
10107                         throw new Error("initializeWasm() must be awaited first!");
10108                 }
10109                 const nativeResponseValue = wasm.ChannelManager_as_Confirm(this_arg);
10110                 return nativeResponseValue;
10111         }
10112         // MUST_USE_RES bool ChannelManager_await_persistable_update_timeout(const struct LDKChannelManager *NONNULL_PTR this_arg, uint64_t max_wait);
10113         export function ChannelManager_await_persistable_update_timeout(this_arg: number, max_wait: number): boolean {
10114                 if(!isWasmInitialized) {
10115                         throw new Error("initializeWasm() must be awaited first!");
10116                 }
10117                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update_timeout(this_arg, max_wait);
10118                 return nativeResponseValue;
10119         }
10120         // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
10121         export function ChannelManager_await_persistable_update(this_arg: number): void {
10122                 if(!isWasmInitialized) {
10123                         throw new Error("initializeWasm() must be awaited first!");
10124                 }
10125                 const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
10126                 // debug statements here
10127         }
10128         // MUST_USE_RES struct LDKBestBlock ChannelManager_current_best_block(const struct LDKChannelManager *NONNULL_PTR this_arg);
10129         export function ChannelManager_current_best_block(this_arg: number): number {
10130                 if(!isWasmInitialized) {
10131                         throw new Error("initializeWasm() must be awaited first!");
10132                 }
10133                 const nativeResponseValue = wasm.ChannelManager_current_best_block(this_arg);
10134                 return nativeResponseValue;
10135         }
10136         // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
10137         export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
10138                 if(!isWasmInitialized) {
10139                         throw new Error("initializeWasm() must be awaited first!");
10140                 }
10141                 const nativeResponseValue = wasm.ChannelManager_as_ChannelMessageHandler(this_arg);
10142                 return nativeResponseValue;
10143         }
10144         // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
10145         export function ChannelManager_write(obj: number): Uint8Array {
10146                 if(!isWasmInitialized) {
10147                         throw new Error("initializeWasm() must be awaited first!");
10148                 }
10149                 const nativeResponseValue = wasm.ChannelManager_write(obj);
10150                 return decodeArray(nativeResponseValue);
10151         }
10152         // void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_obj);
10153         export function ChannelManagerReadArgs_free(this_obj: number): void {
10154                 if(!isWasmInitialized) {
10155                         throw new Error("initializeWasm() must be awaited first!");
10156                 }
10157                 const nativeResponseValue = wasm.ChannelManagerReadArgs_free(this_obj);
10158                 // debug statements here
10159         }
10160         // const struct LDKKeysInterface *ChannelManagerReadArgs_get_keys_manager(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
10161         export function ChannelManagerReadArgs_get_keys_manager(this_ptr: number): number {
10162                 if(!isWasmInitialized) {
10163                         throw new Error("initializeWasm() must be awaited first!");
10164                 }
10165                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_keys_manager(this_ptr);
10166                 return nativeResponseValue;
10167         }
10168         // void ChannelManagerReadArgs_set_keys_manager(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKKeysInterface val);
10169         export function ChannelManagerReadArgs_set_keys_manager(this_ptr: number, val: number): void {
10170                 if(!isWasmInitialized) {
10171                         throw new Error("initializeWasm() must be awaited first!");
10172                 }
10173                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_keys_manager(this_ptr, val);
10174                 // debug statements here
10175         }
10176         // const struct LDKFeeEstimator *ChannelManagerReadArgs_get_fee_estimator(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
10177         export function ChannelManagerReadArgs_get_fee_estimator(this_ptr: number): number {
10178                 if(!isWasmInitialized) {
10179                         throw new Error("initializeWasm() must be awaited first!");
10180                 }
10181                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_fee_estimator(this_ptr);
10182                 return nativeResponseValue;
10183         }
10184         // void ChannelManagerReadArgs_set_fee_estimator(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKFeeEstimator val);
10185         export function ChannelManagerReadArgs_set_fee_estimator(this_ptr: number, val: number): void {
10186                 if(!isWasmInitialized) {
10187                         throw new Error("initializeWasm() must be awaited first!");
10188                 }
10189                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_fee_estimator(this_ptr, val);
10190                 // debug statements here
10191         }
10192         // const struct LDKWatch *ChannelManagerReadArgs_get_chain_monitor(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
10193         export function ChannelManagerReadArgs_get_chain_monitor(this_ptr: number): number {
10194                 if(!isWasmInitialized) {
10195                         throw new Error("initializeWasm() must be awaited first!");
10196                 }
10197                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_chain_monitor(this_ptr);
10198                 return nativeResponseValue;
10199         }
10200         // void ChannelManagerReadArgs_set_chain_monitor(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKWatch val);
10201         export function ChannelManagerReadArgs_set_chain_monitor(this_ptr: number, val: number): void {
10202                 if(!isWasmInitialized) {
10203                         throw new Error("initializeWasm() must be awaited first!");
10204                 }
10205                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_chain_monitor(this_ptr, val);
10206                 // debug statements here
10207         }
10208         // const struct LDKBroadcasterInterface *ChannelManagerReadArgs_get_tx_broadcaster(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
10209         export function ChannelManagerReadArgs_get_tx_broadcaster(this_ptr: number): number {
10210                 if(!isWasmInitialized) {
10211                         throw new Error("initializeWasm() must be awaited first!");
10212                 }
10213                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_tx_broadcaster(this_ptr);
10214                 return nativeResponseValue;
10215         }
10216         // void ChannelManagerReadArgs_set_tx_broadcaster(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKBroadcasterInterface val);
10217         export function ChannelManagerReadArgs_set_tx_broadcaster(this_ptr: number, val: number): void {
10218                 if(!isWasmInitialized) {
10219                         throw new Error("initializeWasm() must be awaited first!");
10220                 }
10221                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_tx_broadcaster(this_ptr, val);
10222                 // debug statements here
10223         }
10224         // const struct LDKLogger *ChannelManagerReadArgs_get_logger(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
10225         export function ChannelManagerReadArgs_get_logger(this_ptr: number): number {
10226                 if(!isWasmInitialized) {
10227                         throw new Error("initializeWasm() must be awaited first!");
10228                 }
10229                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_logger(this_ptr);
10230                 return nativeResponseValue;
10231         }
10232         // void ChannelManagerReadArgs_set_logger(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKLogger val);
10233         export function ChannelManagerReadArgs_set_logger(this_ptr: number, val: number): void {
10234                 if(!isWasmInitialized) {
10235                         throw new Error("initializeWasm() must be awaited first!");
10236                 }
10237                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_logger(this_ptr, val);
10238                 // debug statements here
10239         }
10240         // struct LDKUserConfig ChannelManagerReadArgs_get_default_config(const struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr);
10241         export function ChannelManagerReadArgs_get_default_config(this_ptr: number): number {
10242                 if(!isWasmInitialized) {
10243                         throw new Error("initializeWasm() must be awaited first!");
10244                 }
10245                 const nativeResponseValue = wasm.ChannelManagerReadArgs_get_default_config(this_ptr);
10246                 return nativeResponseValue;
10247         }
10248         // void ChannelManagerReadArgs_set_default_config(struct LDKChannelManagerReadArgs *NONNULL_PTR this_ptr, struct LDKUserConfig val);
10249         export function ChannelManagerReadArgs_set_default_config(this_ptr: number, val: number): void {
10250                 if(!isWasmInitialized) {
10251                         throw new Error("initializeWasm() must be awaited first!");
10252                 }
10253                 const nativeResponseValue = wasm.ChannelManagerReadArgs_set_default_config(this_ptr, val);
10254                 // debug statements here
10255         }
10256         // 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);
10257         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 {
10258                 if(!isWasmInitialized) {
10259                         throw new Error("initializeWasm() must be awaited first!");
10260                 }
10261                 const nativeResponseValue = wasm.ChannelManagerReadArgs_new(keys_manager, fee_estimator, chain_monitor, tx_broadcaster, logger, default_config, channel_monitors);
10262                 return nativeResponseValue;
10263         }
10264         // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ C2Tuple_BlockHashChannelManagerZ_read(struct LDKu8slice ser, struct LDKChannelManagerReadArgs arg);
10265         export function C2Tuple_BlockHashChannelManagerZ_read(ser: Uint8Array, arg: number): number {
10266                 if(!isWasmInitialized) {
10267                         throw new Error("initializeWasm() must be awaited first!");
10268                 }
10269                 const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_read(encodeArray(ser), arg);
10270                 return nativeResponseValue;
10271         }
10272         // void DecodeError_free(struct LDKDecodeError this_obj);
10273         export function DecodeError_free(this_obj: number): void {
10274                 if(!isWasmInitialized) {
10275                         throw new Error("initializeWasm() must be awaited first!");
10276                 }
10277                 const nativeResponseValue = wasm.DecodeError_free(this_obj);
10278                 // debug statements here
10279         }
10280         // struct LDKDecodeError DecodeError_clone(const struct LDKDecodeError *NONNULL_PTR orig);
10281         export function DecodeError_clone(orig: number): number {
10282                 if(!isWasmInitialized) {
10283                         throw new Error("initializeWasm() must be awaited first!");
10284                 }
10285                 const nativeResponseValue = wasm.DecodeError_clone(orig);
10286                 return nativeResponseValue;
10287         }
10288         // void Init_free(struct LDKInit this_obj);
10289         export function Init_free(this_obj: number): void {
10290                 if(!isWasmInitialized) {
10291                         throw new Error("initializeWasm() must be awaited first!");
10292                 }
10293                 const nativeResponseValue = wasm.Init_free(this_obj);
10294                 // debug statements here
10295         }
10296         // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
10297         export function Init_get_features(this_ptr: number): number {
10298                 if(!isWasmInitialized) {
10299                         throw new Error("initializeWasm() must be awaited first!");
10300                 }
10301                 const nativeResponseValue = wasm.Init_get_features(this_ptr);
10302                 return nativeResponseValue;
10303         }
10304         // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
10305         export function Init_set_features(this_ptr: number, val: number): void {
10306                 if(!isWasmInitialized) {
10307                         throw new Error("initializeWasm() must be awaited first!");
10308                 }
10309                 const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
10310                 // debug statements here
10311         }
10312         // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
10313         export function Init_new(features_arg: number): number {
10314                 if(!isWasmInitialized) {
10315                         throw new Error("initializeWasm() must be awaited first!");
10316                 }
10317                 const nativeResponseValue = wasm.Init_new(features_arg);
10318                 return nativeResponseValue;
10319         }
10320         // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
10321         export function Init_clone(orig: number): number {
10322                 if(!isWasmInitialized) {
10323                         throw new Error("initializeWasm() must be awaited first!");
10324                 }
10325                 const nativeResponseValue = wasm.Init_clone(orig);
10326                 return nativeResponseValue;
10327         }
10328         // void ErrorMessage_free(struct LDKErrorMessage this_obj);
10329         export function ErrorMessage_free(this_obj: number): void {
10330                 if(!isWasmInitialized) {
10331                         throw new Error("initializeWasm() must be awaited first!");
10332                 }
10333                 const nativeResponseValue = wasm.ErrorMessage_free(this_obj);
10334                 // debug statements here
10335         }
10336         // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
10337         export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
10338                 if(!isWasmInitialized) {
10339                         throw new Error("initializeWasm() must be awaited first!");
10340                 }
10341                 const nativeResponseValue = wasm.ErrorMessage_get_channel_id(this_ptr);
10342                 return decodeArray(nativeResponseValue);
10343         }
10344         // void ErrorMessage_set_channel_id(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10345         export function ErrorMessage_set_channel_id(this_ptr: number, val: Uint8Array): void {
10346                 if(!isWasmInitialized) {
10347                         throw new Error("initializeWasm() must be awaited first!");
10348                 }
10349                 const nativeResponseValue = wasm.ErrorMessage_set_channel_id(this_ptr, encodeArray(val));
10350                 // debug statements here
10351         }
10352         // struct LDKStr ErrorMessage_get_data(const struct LDKErrorMessage *NONNULL_PTR this_ptr);
10353         export function ErrorMessage_get_data(this_ptr: number): String {
10354                 if(!isWasmInitialized) {
10355                         throw new Error("initializeWasm() must be awaited first!");
10356                 }
10357                 const nativeResponseValue = wasm.ErrorMessage_get_data(this_ptr);
10358                 return nativeResponseValue;
10359         }
10360         // void ErrorMessage_set_data(struct LDKErrorMessage *NONNULL_PTR this_ptr, struct LDKStr val);
10361         export function ErrorMessage_set_data(this_ptr: number, val: String): void {
10362                 if(!isWasmInitialized) {
10363                         throw new Error("initializeWasm() must be awaited first!");
10364                 }
10365                 const nativeResponseValue = wasm.ErrorMessage_set_data(this_ptr, val);
10366                 // debug statements here
10367         }
10368         // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKStr data_arg);
10369         export function ErrorMessage_new(channel_id_arg: Uint8Array, data_arg: String): number {
10370                 if(!isWasmInitialized) {
10371                         throw new Error("initializeWasm() must be awaited first!");
10372                 }
10373                 const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), data_arg);
10374                 return nativeResponseValue;
10375         }
10376         // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
10377         export function ErrorMessage_clone(orig: number): number {
10378                 if(!isWasmInitialized) {
10379                         throw new Error("initializeWasm() must be awaited first!");
10380                 }
10381                 const nativeResponseValue = wasm.ErrorMessage_clone(orig);
10382                 return nativeResponseValue;
10383         }
10384         // void Ping_free(struct LDKPing this_obj);
10385         export function Ping_free(this_obj: number): void {
10386                 if(!isWasmInitialized) {
10387                         throw new Error("initializeWasm() must be awaited first!");
10388                 }
10389                 const nativeResponseValue = wasm.Ping_free(this_obj);
10390                 // debug statements here
10391         }
10392         // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
10393         export function Ping_get_ponglen(this_ptr: number): number {
10394                 if(!isWasmInitialized) {
10395                         throw new Error("initializeWasm() must be awaited first!");
10396                 }
10397                 const nativeResponseValue = wasm.Ping_get_ponglen(this_ptr);
10398                 return nativeResponseValue;
10399         }
10400         // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
10401         export function Ping_set_ponglen(this_ptr: number, val: number): void {
10402                 if(!isWasmInitialized) {
10403                         throw new Error("initializeWasm() must be awaited first!");
10404                 }
10405                 const nativeResponseValue = wasm.Ping_set_ponglen(this_ptr, val);
10406                 // debug statements here
10407         }
10408         // uint16_t Ping_get_byteslen(const struct LDKPing *NONNULL_PTR this_ptr);
10409         export function Ping_get_byteslen(this_ptr: number): number {
10410                 if(!isWasmInitialized) {
10411                         throw new Error("initializeWasm() must be awaited first!");
10412                 }
10413                 const nativeResponseValue = wasm.Ping_get_byteslen(this_ptr);
10414                 return nativeResponseValue;
10415         }
10416         // void Ping_set_byteslen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
10417         export function Ping_set_byteslen(this_ptr: number, val: number): void {
10418                 if(!isWasmInitialized) {
10419                         throw new Error("initializeWasm() must be awaited first!");
10420                 }
10421                 const nativeResponseValue = wasm.Ping_set_byteslen(this_ptr, val);
10422                 // debug statements here
10423         }
10424         // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
10425         export function Ping_new(ponglen_arg: number, byteslen_arg: number): number {
10426                 if(!isWasmInitialized) {
10427                         throw new Error("initializeWasm() must be awaited first!");
10428                 }
10429                 const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
10430                 return nativeResponseValue;
10431         }
10432         // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
10433         export function Ping_clone(orig: number): number {
10434                 if(!isWasmInitialized) {
10435                         throw new Error("initializeWasm() must be awaited first!");
10436                 }
10437                 const nativeResponseValue = wasm.Ping_clone(orig);
10438                 return nativeResponseValue;
10439         }
10440         // void Pong_free(struct LDKPong this_obj);
10441         export function Pong_free(this_obj: number): void {
10442                 if(!isWasmInitialized) {
10443                         throw new Error("initializeWasm() must be awaited first!");
10444                 }
10445                 const nativeResponseValue = wasm.Pong_free(this_obj);
10446                 // debug statements here
10447         }
10448         // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
10449         export function Pong_get_byteslen(this_ptr: number): number {
10450                 if(!isWasmInitialized) {
10451                         throw new Error("initializeWasm() must be awaited first!");
10452                 }
10453                 const nativeResponseValue = wasm.Pong_get_byteslen(this_ptr);
10454                 return nativeResponseValue;
10455         }
10456         // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
10457         export function Pong_set_byteslen(this_ptr: number, val: number): void {
10458                 if(!isWasmInitialized) {
10459                         throw new Error("initializeWasm() must be awaited first!");
10460                 }
10461                 const nativeResponseValue = wasm.Pong_set_byteslen(this_ptr, val);
10462                 // debug statements here
10463         }
10464         // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
10465         export function Pong_new(byteslen_arg: number): number {
10466                 if(!isWasmInitialized) {
10467                         throw new Error("initializeWasm() must be awaited first!");
10468                 }
10469                 const nativeResponseValue = wasm.Pong_new(byteslen_arg);
10470                 return nativeResponseValue;
10471         }
10472         // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
10473         export function Pong_clone(orig: number): number {
10474                 if(!isWasmInitialized) {
10475                         throw new Error("initializeWasm() must be awaited first!");
10476                 }
10477                 const nativeResponseValue = wasm.Pong_clone(orig);
10478                 return nativeResponseValue;
10479         }
10480         // void OpenChannel_free(struct LDKOpenChannel this_obj);
10481         export function OpenChannel_free(this_obj: number): void {
10482                 if(!isWasmInitialized) {
10483                         throw new Error("initializeWasm() must be awaited first!");
10484                 }
10485                 const nativeResponseValue = wasm.OpenChannel_free(this_obj);
10486                 // debug statements here
10487         }
10488         // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
10489         export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
10490                 if(!isWasmInitialized) {
10491                         throw new Error("initializeWasm() must be awaited first!");
10492                 }
10493                 const nativeResponseValue = wasm.OpenChannel_get_chain_hash(this_ptr);
10494                 return decodeArray(nativeResponseValue);
10495         }
10496         // void OpenChannel_set_chain_hash(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10497         export function OpenChannel_set_chain_hash(this_ptr: number, val: Uint8Array): void {
10498                 if(!isWasmInitialized) {
10499                         throw new Error("initializeWasm() must be awaited first!");
10500                 }
10501                 const nativeResponseValue = wasm.OpenChannel_set_chain_hash(this_ptr, encodeArray(val));
10502                 // debug statements here
10503         }
10504         // const uint8_t (*OpenChannel_get_temporary_channel_id(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
10505         export function OpenChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
10506                 if(!isWasmInitialized) {
10507                         throw new Error("initializeWasm() must be awaited first!");
10508                 }
10509                 const nativeResponseValue = wasm.OpenChannel_get_temporary_channel_id(this_ptr);
10510                 return decodeArray(nativeResponseValue);
10511         }
10512         // void OpenChannel_set_temporary_channel_id(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10513         export function OpenChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
10514                 if(!isWasmInitialized) {
10515                         throw new Error("initializeWasm() must be awaited first!");
10516                 }
10517                 const nativeResponseValue = wasm.OpenChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
10518                 // debug statements here
10519         }
10520         // uint64_t OpenChannel_get_funding_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10521         export function OpenChannel_get_funding_satoshis(this_ptr: number): number {
10522                 if(!isWasmInitialized) {
10523                         throw new Error("initializeWasm() must be awaited first!");
10524                 }
10525                 const nativeResponseValue = wasm.OpenChannel_get_funding_satoshis(this_ptr);
10526                 return nativeResponseValue;
10527         }
10528         // void OpenChannel_set_funding_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10529         export function OpenChannel_set_funding_satoshis(this_ptr: number, val: number): void {
10530                 if(!isWasmInitialized) {
10531                         throw new Error("initializeWasm() must be awaited first!");
10532                 }
10533                 const nativeResponseValue = wasm.OpenChannel_set_funding_satoshis(this_ptr, val);
10534                 // debug statements here
10535         }
10536         // uint64_t OpenChannel_get_push_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10537         export function OpenChannel_get_push_msat(this_ptr: number): number {
10538                 if(!isWasmInitialized) {
10539                         throw new Error("initializeWasm() must be awaited first!");
10540                 }
10541                 const nativeResponseValue = wasm.OpenChannel_get_push_msat(this_ptr);
10542                 return nativeResponseValue;
10543         }
10544         // void OpenChannel_set_push_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10545         export function OpenChannel_set_push_msat(this_ptr: number, val: number): void {
10546                 if(!isWasmInitialized) {
10547                         throw new Error("initializeWasm() must be awaited first!");
10548                 }
10549                 const nativeResponseValue = wasm.OpenChannel_set_push_msat(this_ptr, val);
10550                 // debug statements here
10551         }
10552         // uint64_t OpenChannel_get_dust_limit_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10553         export function OpenChannel_get_dust_limit_satoshis(this_ptr: number): number {
10554                 if(!isWasmInitialized) {
10555                         throw new Error("initializeWasm() must be awaited first!");
10556                 }
10557                 const nativeResponseValue = wasm.OpenChannel_get_dust_limit_satoshis(this_ptr);
10558                 return nativeResponseValue;
10559         }
10560         // void OpenChannel_set_dust_limit_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10561         export function OpenChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
10562                 if(!isWasmInitialized) {
10563                         throw new Error("initializeWasm() must be awaited first!");
10564                 }
10565                 const nativeResponseValue = wasm.OpenChannel_set_dust_limit_satoshis(this_ptr, val);
10566                 // debug statements here
10567         }
10568         // uint64_t OpenChannel_get_max_htlc_value_in_flight_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10569         export function OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
10570                 if(!isWasmInitialized) {
10571                         throw new Error("initializeWasm() must be awaited first!");
10572                 }
10573                 const nativeResponseValue = wasm.OpenChannel_get_max_htlc_value_in_flight_msat(this_ptr);
10574                 return nativeResponseValue;
10575         }
10576         // void OpenChannel_set_max_htlc_value_in_flight_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10577         export function OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
10578                 if(!isWasmInitialized) {
10579                         throw new Error("initializeWasm() must be awaited first!");
10580                 }
10581                 const nativeResponseValue = wasm.OpenChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
10582                 // debug statements here
10583         }
10584         // uint64_t OpenChannel_get_channel_reserve_satoshis(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10585         export function OpenChannel_get_channel_reserve_satoshis(this_ptr: number): number {
10586                 if(!isWasmInitialized) {
10587                         throw new Error("initializeWasm() must be awaited first!");
10588                 }
10589                 const nativeResponseValue = wasm.OpenChannel_get_channel_reserve_satoshis(this_ptr);
10590                 return nativeResponseValue;
10591         }
10592         // void OpenChannel_set_channel_reserve_satoshis(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10593         export function OpenChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
10594                 if(!isWasmInitialized) {
10595                         throw new Error("initializeWasm() must be awaited first!");
10596                 }
10597                 const nativeResponseValue = wasm.OpenChannel_set_channel_reserve_satoshis(this_ptr, val);
10598                 // debug statements here
10599         }
10600         // uint64_t OpenChannel_get_htlc_minimum_msat(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10601         export function OpenChannel_get_htlc_minimum_msat(this_ptr: number): number {
10602                 if(!isWasmInitialized) {
10603                         throw new Error("initializeWasm() must be awaited first!");
10604                 }
10605                 const nativeResponseValue = wasm.OpenChannel_get_htlc_minimum_msat(this_ptr);
10606                 return nativeResponseValue;
10607         }
10608         // void OpenChannel_set_htlc_minimum_msat(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint64_t val);
10609         export function OpenChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
10610                 if(!isWasmInitialized) {
10611                         throw new Error("initializeWasm() must be awaited first!");
10612                 }
10613                 const nativeResponseValue = wasm.OpenChannel_set_htlc_minimum_msat(this_ptr, val);
10614                 // debug statements here
10615         }
10616         // uint32_t OpenChannel_get_feerate_per_kw(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10617         export function OpenChannel_get_feerate_per_kw(this_ptr: number): number {
10618                 if(!isWasmInitialized) {
10619                         throw new Error("initializeWasm() must be awaited first!");
10620                 }
10621                 const nativeResponseValue = wasm.OpenChannel_get_feerate_per_kw(this_ptr);
10622                 return nativeResponseValue;
10623         }
10624         // void OpenChannel_set_feerate_per_kw(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint32_t val);
10625         export function OpenChannel_set_feerate_per_kw(this_ptr: number, val: number): void {
10626                 if(!isWasmInitialized) {
10627                         throw new Error("initializeWasm() must be awaited first!");
10628                 }
10629                 const nativeResponseValue = wasm.OpenChannel_set_feerate_per_kw(this_ptr, val);
10630                 // debug statements here
10631         }
10632         // uint16_t OpenChannel_get_to_self_delay(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10633         export function OpenChannel_get_to_self_delay(this_ptr: number): number {
10634                 if(!isWasmInitialized) {
10635                         throw new Error("initializeWasm() must be awaited first!");
10636                 }
10637                 const nativeResponseValue = wasm.OpenChannel_get_to_self_delay(this_ptr);
10638                 return nativeResponseValue;
10639         }
10640         // void OpenChannel_set_to_self_delay(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
10641         export function OpenChannel_set_to_self_delay(this_ptr: number, val: number): void {
10642                 if(!isWasmInitialized) {
10643                         throw new Error("initializeWasm() must be awaited first!");
10644                 }
10645                 const nativeResponseValue = wasm.OpenChannel_set_to_self_delay(this_ptr, val);
10646                 // debug statements here
10647         }
10648         // uint16_t OpenChannel_get_max_accepted_htlcs(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10649         export function OpenChannel_get_max_accepted_htlcs(this_ptr: number): number {
10650                 if(!isWasmInitialized) {
10651                         throw new Error("initializeWasm() must be awaited first!");
10652                 }
10653                 const nativeResponseValue = wasm.OpenChannel_get_max_accepted_htlcs(this_ptr);
10654                 return nativeResponseValue;
10655         }
10656         // void OpenChannel_set_max_accepted_htlcs(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint16_t val);
10657         export function OpenChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
10658                 if(!isWasmInitialized) {
10659                         throw new Error("initializeWasm() must be awaited first!");
10660                 }
10661                 const nativeResponseValue = wasm.OpenChannel_set_max_accepted_htlcs(this_ptr, val);
10662                 // debug statements here
10663         }
10664         // struct LDKPublicKey OpenChannel_get_funding_pubkey(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10665         export function OpenChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
10666                 if(!isWasmInitialized) {
10667                         throw new Error("initializeWasm() must be awaited first!");
10668                 }
10669                 const nativeResponseValue = wasm.OpenChannel_get_funding_pubkey(this_ptr);
10670                 return decodeArray(nativeResponseValue);
10671         }
10672         // void OpenChannel_set_funding_pubkey(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10673         export function OpenChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
10674                 if(!isWasmInitialized) {
10675                         throw new Error("initializeWasm() must be awaited first!");
10676                 }
10677                 const nativeResponseValue = wasm.OpenChannel_set_funding_pubkey(this_ptr, encodeArray(val));
10678                 // debug statements here
10679         }
10680         // struct LDKPublicKey OpenChannel_get_revocation_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10681         export function OpenChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
10682                 if(!isWasmInitialized) {
10683                         throw new Error("initializeWasm() must be awaited first!");
10684                 }
10685                 const nativeResponseValue = wasm.OpenChannel_get_revocation_basepoint(this_ptr);
10686                 return decodeArray(nativeResponseValue);
10687         }
10688         // void OpenChannel_set_revocation_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10689         export function OpenChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
10690                 if(!isWasmInitialized) {
10691                         throw new Error("initializeWasm() must be awaited first!");
10692                 }
10693                 const nativeResponseValue = wasm.OpenChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
10694                 // debug statements here
10695         }
10696         // struct LDKPublicKey OpenChannel_get_payment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10697         export function OpenChannel_get_payment_point(this_ptr: number): Uint8Array {
10698                 if(!isWasmInitialized) {
10699                         throw new Error("initializeWasm() must be awaited first!");
10700                 }
10701                 const nativeResponseValue = wasm.OpenChannel_get_payment_point(this_ptr);
10702                 return decodeArray(nativeResponseValue);
10703         }
10704         // void OpenChannel_set_payment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10705         export function OpenChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
10706                 if(!isWasmInitialized) {
10707                         throw new Error("initializeWasm() must be awaited first!");
10708                 }
10709                 const nativeResponseValue = wasm.OpenChannel_set_payment_point(this_ptr, encodeArray(val));
10710                 // debug statements here
10711         }
10712         // struct LDKPublicKey OpenChannel_get_delayed_payment_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10713         export function OpenChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
10714                 if(!isWasmInitialized) {
10715                         throw new Error("initializeWasm() must be awaited first!");
10716                 }
10717                 const nativeResponseValue = wasm.OpenChannel_get_delayed_payment_basepoint(this_ptr);
10718                 return decodeArray(nativeResponseValue);
10719         }
10720         // void OpenChannel_set_delayed_payment_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10721         export function OpenChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
10722                 if(!isWasmInitialized) {
10723                         throw new Error("initializeWasm() must be awaited first!");
10724                 }
10725                 const nativeResponseValue = wasm.OpenChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
10726                 // debug statements here
10727         }
10728         // struct LDKPublicKey OpenChannel_get_htlc_basepoint(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10729         export function OpenChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
10730                 if(!isWasmInitialized) {
10731                         throw new Error("initializeWasm() must be awaited first!");
10732                 }
10733                 const nativeResponseValue = wasm.OpenChannel_get_htlc_basepoint(this_ptr);
10734                 return decodeArray(nativeResponseValue);
10735         }
10736         // void OpenChannel_set_htlc_basepoint(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10737         export function OpenChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
10738                 if(!isWasmInitialized) {
10739                         throw new Error("initializeWasm() must be awaited first!");
10740                 }
10741                 const nativeResponseValue = wasm.OpenChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
10742                 // debug statements here
10743         }
10744         // struct LDKPublicKey OpenChannel_get_first_per_commitment_point(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10745         export function OpenChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
10746                 if(!isWasmInitialized) {
10747                         throw new Error("initializeWasm() must be awaited first!");
10748                 }
10749                 const nativeResponseValue = wasm.OpenChannel_get_first_per_commitment_point(this_ptr);
10750                 return decodeArray(nativeResponseValue);
10751         }
10752         // void OpenChannel_set_first_per_commitment_point(struct LDKOpenChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10753         export function OpenChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
10754                 if(!isWasmInitialized) {
10755                         throw new Error("initializeWasm() must be awaited first!");
10756                 }
10757                 const nativeResponseValue = wasm.OpenChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
10758                 // debug statements here
10759         }
10760         // uint8_t OpenChannel_get_channel_flags(const struct LDKOpenChannel *NONNULL_PTR this_ptr);
10761         export function OpenChannel_get_channel_flags(this_ptr: number): number {
10762                 if(!isWasmInitialized) {
10763                         throw new Error("initializeWasm() must be awaited first!");
10764                 }
10765                 const nativeResponseValue = wasm.OpenChannel_get_channel_flags(this_ptr);
10766                 return nativeResponseValue;
10767         }
10768         // void OpenChannel_set_channel_flags(struct LDKOpenChannel *NONNULL_PTR this_ptr, uint8_t val);
10769         export function OpenChannel_set_channel_flags(this_ptr: number, val: number): void {
10770                 if(!isWasmInitialized) {
10771                         throw new Error("initializeWasm() must be awaited first!");
10772                 }
10773                 const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
10774                 // debug statements here
10775         }
10776         // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
10777         export function OpenChannel_clone(orig: number): number {
10778                 if(!isWasmInitialized) {
10779                         throw new Error("initializeWasm() must be awaited first!");
10780                 }
10781                 const nativeResponseValue = wasm.OpenChannel_clone(orig);
10782                 return nativeResponseValue;
10783         }
10784         // void AcceptChannel_free(struct LDKAcceptChannel this_obj);
10785         export function AcceptChannel_free(this_obj: number): void {
10786                 if(!isWasmInitialized) {
10787                         throw new Error("initializeWasm() must be awaited first!");
10788                 }
10789                 const nativeResponseValue = wasm.AcceptChannel_free(this_obj);
10790                 // debug statements here
10791         }
10792         // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
10793         export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
10794                 if(!isWasmInitialized) {
10795                         throw new Error("initializeWasm() must be awaited first!");
10796                 }
10797                 const nativeResponseValue = wasm.AcceptChannel_get_temporary_channel_id(this_ptr);
10798                 return decodeArray(nativeResponseValue);
10799         }
10800         // void AcceptChannel_set_temporary_channel_id(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
10801         export function AcceptChannel_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
10802                 if(!isWasmInitialized) {
10803                         throw new Error("initializeWasm() must be awaited first!");
10804                 }
10805                 const nativeResponseValue = wasm.AcceptChannel_set_temporary_channel_id(this_ptr, encodeArray(val));
10806                 // debug statements here
10807         }
10808         // uint64_t AcceptChannel_get_dust_limit_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10809         export function AcceptChannel_get_dust_limit_satoshis(this_ptr: number): number {
10810                 if(!isWasmInitialized) {
10811                         throw new Error("initializeWasm() must be awaited first!");
10812                 }
10813                 const nativeResponseValue = wasm.AcceptChannel_get_dust_limit_satoshis(this_ptr);
10814                 return nativeResponseValue;
10815         }
10816         // void AcceptChannel_set_dust_limit_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
10817         export function AcceptChannel_set_dust_limit_satoshis(this_ptr: number, val: number): void {
10818                 if(!isWasmInitialized) {
10819                         throw new Error("initializeWasm() must be awaited first!");
10820                 }
10821                 const nativeResponseValue = wasm.AcceptChannel_set_dust_limit_satoshis(this_ptr, val);
10822                 // debug statements here
10823         }
10824         // uint64_t AcceptChannel_get_max_htlc_value_in_flight_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10825         export function AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr: number): number {
10826                 if(!isWasmInitialized) {
10827                         throw new Error("initializeWasm() must be awaited first!");
10828                 }
10829                 const nativeResponseValue = wasm.AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptr);
10830                 return nativeResponseValue;
10831         }
10832         // void AcceptChannel_set_max_htlc_value_in_flight_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
10833         export function AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr: number, val: number): void {
10834                 if(!isWasmInitialized) {
10835                         throw new Error("initializeWasm() must be awaited first!");
10836                 }
10837                 const nativeResponseValue = wasm.AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptr, val);
10838                 // debug statements here
10839         }
10840         // uint64_t AcceptChannel_get_channel_reserve_satoshis(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10841         export function AcceptChannel_get_channel_reserve_satoshis(this_ptr: number): number {
10842                 if(!isWasmInitialized) {
10843                         throw new Error("initializeWasm() must be awaited first!");
10844                 }
10845                 const nativeResponseValue = wasm.AcceptChannel_get_channel_reserve_satoshis(this_ptr);
10846                 return nativeResponseValue;
10847         }
10848         // void AcceptChannel_set_channel_reserve_satoshis(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
10849         export function AcceptChannel_set_channel_reserve_satoshis(this_ptr: number, val: number): void {
10850                 if(!isWasmInitialized) {
10851                         throw new Error("initializeWasm() must be awaited first!");
10852                 }
10853                 const nativeResponseValue = wasm.AcceptChannel_set_channel_reserve_satoshis(this_ptr, val);
10854                 // debug statements here
10855         }
10856         // uint64_t AcceptChannel_get_htlc_minimum_msat(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10857         export function AcceptChannel_get_htlc_minimum_msat(this_ptr: number): number {
10858                 if(!isWasmInitialized) {
10859                         throw new Error("initializeWasm() must be awaited first!");
10860                 }
10861                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_minimum_msat(this_ptr);
10862                 return nativeResponseValue;
10863         }
10864         // void AcceptChannel_set_htlc_minimum_msat(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint64_t val);
10865         export function AcceptChannel_set_htlc_minimum_msat(this_ptr: number, val: number): void {
10866                 if(!isWasmInitialized) {
10867                         throw new Error("initializeWasm() must be awaited first!");
10868                 }
10869                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_minimum_msat(this_ptr, val);
10870                 // debug statements here
10871         }
10872         // uint32_t AcceptChannel_get_minimum_depth(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10873         export function AcceptChannel_get_minimum_depth(this_ptr: number): number {
10874                 if(!isWasmInitialized) {
10875                         throw new Error("initializeWasm() must be awaited first!");
10876                 }
10877                 const nativeResponseValue = wasm.AcceptChannel_get_minimum_depth(this_ptr);
10878                 return nativeResponseValue;
10879         }
10880         // void AcceptChannel_set_minimum_depth(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint32_t val);
10881         export function AcceptChannel_set_minimum_depth(this_ptr: number, val: number): void {
10882                 if(!isWasmInitialized) {
10883                         throw new Error("initializeWasm() must be awaited first!");
10884                 }
10885                 const nativeResponseValue = wasm.AcceptChannel_set_minimum_depth(this_ptr, val);
10886                 // debug statements here
10887         }
10888         // uint16_t AcceptChannel_get_to_self_delay(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10889         export function AcceptChannel_get_to_self_delay(this_ptr: number): number {
10890                 if(!isWasmInitialized) {
10891                         throw new Error("initializeWasm() must be awaited first!");
10892                 }
10893                 const nativeResponseValue = wasm.AcceptChannel_get_to_self_delay(this_ptr);
10894                 return nativeResponseValue;
10895         }
10896         // void AcceptChannel_set_to_self_delay(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
10897         export function AcceptChannel_set_to_self_delay(this_ptr: number, val: number): void {
10898                 if(!isWasmInitialized) {
10899                         throw new Error("initializeWasm() must be awaited first!");
10900                 }
10901                 const nativeResponseValue = wasm.AcceptChannel_set_to_self_delay(this_ptr, val);
10902                 // debug statements here
10903         }
10904         // uint16_t AcceptChannel_get_max_accepted_htlcs(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10905         export function AcceptChannel_get_max_accepted_htlcs(this_ptr: number): number {
10906                 if(!isWasmInitialized) {
10907                         throw new Error("initializeWasm() must be awaited first!");
10908                 }
10909                 const nativeResponseValue = wasm.AcceptChannel_get_max_accepted_htlcs(this_ptr);
10910                 return nativeResponseValue;
10911         }
10912         // void AcceptChannel_set_max_accepted_htlcs(struct LDKAcceptChannel *NONNULL_PTR this_ptr, uint16_t val);
10913         export function AcceptChannel_set_max_accepted_htlcs(this_ptr: number, val: number): void {
10914                 if(!isWasmInitialized) {
10915                         throw new Error("initializeWasm() must be awaited first!");
10916                 }
10917                 const nativeResponseValue = wasm.AcceptChannel_set_max_accepted_htlcs(this_ptr, val);
10918                 // debug statements here
10919         }
10920         // struct LDKPublicKey AcceptChannel_get_funding_pubkey(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10921         export function AcceptChannel_get_funding_pubkey(this_ptr: number): Uint8Array {
10922                 if(!isWasmInitialized) {
10923                         throw new Error("initializeWasm() must be awaited first!");
10924                 }
10925                 const nativeResponseValue = wasm.AcceptChannel_get_funding_pubkey(this_ptr);
10926                 return decodeArray(nativeResponseValue);
10927         }
10928         // void AcceptChannel_set_funding_pubkey(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10929         export function AcceptChannel_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
10930                 if(!isWasmInitialized) {
10931                         throw new Error("initializeWasm() must be awaited first!");
10932                 }
10933                 const nativeResponseValue = wasm.AcceptChannel_set_funding_pubkey(this_ptr, encodeArray(val));
10934                 // debug statements here
10935         }
10936         // struct LDKPublicKey AcceptChannel_get_revocation_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10937         export function AcceptChannel_get_revocation_basepoint(this_ptr: number): Uint8Array {
10938                 if(!isWasmInitialized) {
10939                         throw new Error("initializeWasm() must be awaited first!");
10940                 }
10941                 const nativeResponseValue = wasm.AcceptChannel_get_revocation_basepoint(this_ptr);
10942                 return decodeArray(nativeResponseValue);
10943         }
10944         // void AcceptChannel_set_revocation_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10945         export function AcceptChannel_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
10946                 if(!isWasmInitialized) {
10947                         throw new Error("initializeWasm() must be awaited first!");
10948                 }
10949                 const nativeResponseValue = wasm.AcceptChannel_set_revocation_basepoint(this_ptr, encodeArray(val));
10950                 // debug statements here
10951         }
10952         // struct LDKPublicKey AcceptChannel_get_payment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10953         export function AcceptChannel_get_payment_point(this_ptr: number): Uint8Array {
10954                 if(!isWasmInitialized) {
10955                         throw new Error("initializeWasm() must be awaited first!");
10956                 }
10957                 const nativeResponseValue = wasm.AcceptChannel_get_payment_point(this_ptr);
10958                 return decodeArray(nativeResponseValue);
10959         }
10960         // void AcceptChannel_set_payment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10961         export function AcceptChannel_set_payment_point(this_ptr: number, val: Uint8Array): void {
10962                 if(!isWasmInitialized) {
10963                         throw new Error("initializeWasm() must be awaited first!");
10964                 }
10965                 const nativeResponseValue = wasm.AcceptChannel_set_payment_point(this_ptr, encodeArray(val));
10966                 // debug statements here
10967         }
10968         // struct LDKPublicKey AcceptChannel_get_delayed_payment_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10969         export function AcceptChannel_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
10970                 if(!isWasmInitialized) {
10971                         throw new Error("initializeWasm() must be awaited first!");
10972                 }
10973                 const nativeResponseValue = wasm.AcceptChannel_get_delayed_payment_basepoint(this_ptr);
10974                 return decodeArray(nativeResponseValue);
10975         }
10976         // void AcceptChannel_set_delayed_payment_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10977         export function AcceptChannel_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
10978                 if(!isWasmInitialized) {
10979                         throw new Error("initializeWasm() must be awaited first!");
10980                 }
10981                 const nativeResponseValue = wasm.AcceptChannel_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
10982                 // debug statements here
10983         }
10984         // struct LDKPublicKey AcceptChannel_get_htlc_basepoint(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
10985         export function AcceptChannel_get_htlc_basepoint(this_ptr: number): Uint8Array {
10986                 if(!isWasmInitialized) {
10987                         throw new Error("initializeWasm() must be awaited first!");
10988                 }
10989                 const nativeResponseValue = wasm.AcceptChannel_get_htlc_basepoint(this_ptr);
10990                 return decodeArray(nativeResponseValue);
10991         }
10992         // void AcceptChannel_set_htlc_basepoint(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
10993         export function AcceptChannel_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
10994                 if(!isWasmInitialized) {
10995                         throw new Error("initializeWasm() must be awaited first!");
10996                 }
10997                 const nativeResponseValue = wasm.AcceptChannel_set_htlc_basepoint(this_ptr, encodeArray(val));
10998                 // debug statements here
10999         }
11000         // struct LDKPublicKey AcceptChannel_get_first_per_commitment_point(const struct LDKAcceptChannel *NONNULL_PTR this_ptr);
11001         export function AcceptChannel_get_first_per_commitment_point(this_ptr: number): Uint8Array {
11002                 if(!isWasmInitialized) {
11003                         throw new Error("initializeWasm() must be awaited first!");
11004                 }
11005                 const nativeResponseValue = wasm.AcceptChannel_get_first_per_commitment_point(this_ptr);
11006                 return decodeArray(nativeResponseValue);
11007         }
11008         // void AcceptChannel_set_first_per_commitment_point(struct LDKAcceptChannel *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11009         export function AcceptChannel_set_first_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11010                 if(!isWasmInitialized) {
11011                         throw new Error("initializeWasm() must be awaited first!");
11012                 }
11013                 const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
11014                 // debug statements here
11015         }
11016         // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
11017         export function AcceptChannel_clone(orig: number): number {
11018                 if(!isWasmInitialized) {
11019                         throw new Error("initializeWasm() must be awaited first!");
11020                 }
11021                 const nativeResponseValue = wasm.AcceptChannel_clone(orig);
11022                 return nativeResponseValue;
11023         }
11024         // void FundingCreated_free(struct LDKFundingCreated this_obj);
11025         export function FundingCreated_free(this_obj: number): void {
11026                 if(!isWasmInitialized) {
11027                         throw new Error("initializeWasm() must be awaited first!");
11028                 }
11029                 const nativeResponseValue = wasm.FundingCreated_free(this_obj);
11030                 // debug statements here
11031         }
11032         // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
11033         export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
11034                 if(!isWasmInitialized) {
11035                         throw new Error("initializeWasm() must be awaited first!");
11036                 }
11037                 const nativeResponseValue = wasm.FundingCreated_get_temporary_channel_id(this_ptr);
11038                 return decodeArray(nativeResponseValue);
11039         }
11040         // void FundingCreated_set_temporary_channel_id(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11041         export function FundingCreated_set_temporary_channel_id(this_ptr: number, val: Uint8Array): void {
11042                 if(!isWasmInitialized) {
11043                         throw new Error("initializeWasm() must be awaited first!");
11044                 }
11045                 const nativeResponseValue = wasm.FundingCreated_set_temporary_channel_id(this_ptr, encodeArray(val));
11046                 // debug statements here
11047         }
11048         // const uint8_t (*FundingCreated_get_funding_txid(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
11049         export function FundingCreated_get_funding_txid(this_ptr: number): Uint8Array {
11050                 if(!isWasmInitialized) {
11051                         throw new Error("initializeWasm() must be awaited first!");
11052                 }
11053                 const nativeResponseValue = wasm.FundingCreated_get_funding_txid(this_ptr);
11054                 return decodeArray(nativeResponseValue);
11055         }
11056         // void FundingCreated_set_funding_txid(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11057         export function FundingCreated_set_funding_txid(this_ptr: number, val: Uint8Array): void {
11058                 if(!isWasmInitialized) {
11059                         throw new Error("initializeWasm() must be awaited first!");
11060                 }
11061                 const nativeResponseValue = wasm.FundingCreated_set_funding_txid(this_ptr, encodeArray(val));
11062                 // debug statements here
11063         }
11064         // uint16_t FundingCreated_get_funding_output_index(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
11065         export function FundingCreated_get_funding_output_index(this_ptr: number): number {
11066                 if(!isWasmInitialized) {
11067                         throw new Error("initializeWasm() must be awaited first!");
11068                 }
11069                 const nativeResponseValue = wasm.FundingCreated_get_funding_output_index(this_ptr);
11070                 return nativeResponseValue;
11071         }
11072         // void FundingCreated_set_funding_output_index(struct LDKFundingCreated *NONNULL_PTR this_ptr, uint16_t val);
11073         export function FundingCreated_set_funding_output_index(this_ptr: number, val: number): void {
11074                 if(!isWasmInitialized) {
11075                         throw new Error("initializeWasm() must be awaited first!");
11076                 }
11077                 const nativeResponseValue = wasm.FundingCreated_set_funding_output_index(this_ptr, val);
11078                 // debug statements here
11079         }
11080         // struct LDKSignature FundingCreated_get_signature(const struct LDKFundingCreated *NONNULL_PTR this_ptr);
11081         export function FundingCreated_get_signature(this_ptr: number): Uint8Array {
11082                 if(!isWasmInitialized) {
11083                         throw new Error("initializeWasm() must be awaited first!");
11084                 }
11085                 const nativeResponseValue = wasm.FundingCreated_get_signature(this_ptr);
11086                 return decodeArray(nativeResponseValue);
11087         }
11088         // void FundingCreated_set_signature(struct LDKFundingCreated *NONNULL_PTR this_ptr, struct LDKSignature val);
11089         export function FundingCreated_set_signature(this_ptr: number, val: Uint8Array): void {
11090                 if(!isWasmInitialized) {
11091                         throw new Error("initializeWasm() must be awaited first!");
11092                 }
11093                 const nativeResponseValue = wasm.FundingCreated_set_signature(this_ptr, encodeArray(val));
11094                 // debug statements here
11095         }
11096         // 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);
11097         export function FundingCreated_new(temporary_channel_id_arg: Uint8Array, funding_txid_arg: Uint8Array, funding_output_index_arg: number, signature_arg: Uint8Array): number {
11098                 if(!isWasmInitialized) {
11099                         throw new Error("initializeWasm() must be awaited first!");
11100                 }
11101                 const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
11102                 return nativeResponseValue;
11103         }
11104         // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
11105         export function FundingCreated_clone(orig: number): number {
11106                 if(!isWasmInitialized) {
11107                         throw new Error("initializeWasm() must be awaited first!");
11108                 }
11109                 const nativeResponseValue = wasm.FundingCreated_clone(orig);
11110                 return nativeResponseValue;
11111         }
11112         // void FundingSigned_free(struct LDKFundingSigned this_obj);
11113         export function FundingSigned_free(this_obj: number): void {
11114                 if(!isWasmInitialized) {
11115                         throw new Error("initializeWasm() must be awaited first!");
11116                 }
11117                 const nativeResponseValue = wasm.FundingSigned_free(this_obj);
11118                 // debug statements here
11119         }
11120         // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
11121         export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
11122                 if(!isWasmInitialized) {
11123                         throw new Error("initializeWasm() must be awaited first!");
11124                 }
11125                 const nativeResponseValue = wasm.FundingSigned_get_channel_id(this_ptr);
11126                 return decodeArray(nativeResponseValue);
11127         }
11128         // void FundingSigned_set_channel_id(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11129         export function FundingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
11130                 if(!isWasmInitialized) {
11131                         throw new Error("initializeWasm() must be awaited first!");
11132                 }
11133                 const nativeResponseValue = wasm.FundingSigned_set_channel_id(this_ptr, encodeArray(val));
11134                 // debug statements here
11135         }
11136         // struct LDKSignature FundingSigned_get_signature(const struct LDKFundingSigned *NONNULL_PTR this_ptr);
11137         export function FundingSigned_get_signature(this_ptr: number): Uint8Array {
11138                 if(!isWasmInitialized) {
11139                         throw new Error("initializeWasm() must be awaited first!");
11140                 }
11141                 const nativeResponseValue = wasm.FundingSigned_get_signature(this_ptr);
11142                 return decodeArray(nativeResponseValue);
11143         }
11144         // void FundingSigned_set_signature(struct LDKFundingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
11145         export function FundingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
11146                 if(!isWasmInitialized) {
11147                         throw new Error("initializeWasm() must be awaited first!");
11148                 }
11149                 const nativeResponseValue = wasm.FundingSigned_set_signature(this_ptr, encodeArray(val));
11150                 // debug statements here
11151         }
11152         // MUST_USE_RES struct LDKFundingSigned FundingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg);
11153         export function FundingSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array): number {
11154                 if(!isWasmInitialized) {
11155                         throw new Error("initializeWasm() must be awaited first!");
11156                 }
11157                 const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
11158                 return nativeResponseValue;
11159         }
11160         // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
11161         export function FundingSigned_clone(orig: number): number {
11162                 if(!isWasmInitialized) {
11163                         throw new Error("initializeWasm() must be awaited first!");
11164                 }
11165                 const nativeResponseValue = wasm.FundingSigned_clone(orig);
11166                 return nativeResponseValue;
11167         }
11168         // void FundingLocked_free(struct LDKFundingLocked this_obj);
11169         export function FundingLocked_free(this_obj: number): void {
11170                 if(!isWasmInitialized) {
11171                         throw new Error("initializeWasm() must be awaited first!");
11172                 }
11173                 const nativeResponseValue = wasm.FundingLocked_free(this_obj);
11174                 // debug statements here
11175         }
11176         // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
11177         export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
11178                 if(!isWasmInitialized) {
11179                         throw new Error("initializeWasm() must be awaited first!");
11180                 }
11181                 const nativeResponseValue = wasm.FundingLocked_get_channel_id(this_ptr);
11182                 return decodeArray(nativeResponseValue);
11183         }
11184         // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11185         export function FundingLocked_set_channel_id(this_ptr: number, val: Uint8Array): void {
11186                 if(!isWasmInitialized) {
11187                         throw new Error("initializeWasm() must be awaited first!");
11188                 }
11189                 const nativeResponseValue = wasm.FundingLocked_set_channel_id(this_ptr, encodeArray(val));
11190                 // debug statements here
11191         }
11192         // struct LDKPublicKey FundingLocked_get_next_per_commitment_point(const struct LDKFundingLocked *NONNULL_PTR this_ptr);
11193         export function FundingLocked_get_next_per_commitment_point(this_ptr: number): Uint8Array {
11194                 if(!isWasmInitialized) {
11195                         throw new Error("initializeWasm() must be awaited first!");
11196                 }
11197                 const nativeResponseValue = wasm.FundingLocked_get_next_per_commitment_point(this_ptr);
11198                 return decodeArray(nativeResponseValue);
11199         }
11200         // void FundingLocked_set_next_per_commitment_point(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11201         export function FundingLocked_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11202                 if(!isWasmInitialized) {
11203                         throw new Error("initializeWasm() must be awaited first!");
11204                 }
11205                 const nativeResponseValue = wasm.FundingLocked_set_next_per_commitment_point(this_ptr, encodeArray(val));
11206                 // debug statements here
11207         }
11208         // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
11209         export function FundingLocked_new(channel_id_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
11210                 if(!isWasmInitialized) {
11211                         throw new Error("initializeWasm() must be awaited first!");
11212                 }
11213                 const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
11214                 return nativeResponseValue;
11215         }
11216         // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
11217         export function FundingLocked_clone(orig: number): number {
11218                 if(!isWasmInitialized) {
11219                         throw new Error("initializeWasm() must be awaited first!");
11220                 }
11221                 const nativeResponseValue = wasm.FundingLocked_clone(orig);
11222                 return nativeResponseValue;
11223         }
11224         // void Shutdown_free(struct LDKShutdown this_obj);
11225         export function Shutdown_free(this_obj: number): void {
11226                 if(!isWasmInitialized) {
11227                         throw new Error("initializeWasm() must be awaited first!");
11228                 }
11229                 const nativeResponseValue = wasm.Shutdown_free(this_obj);
11230                 // debug statements here
11231         }
11232         // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
11233         export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
11234                 if(!isWasmInitialized) {
11235                         throw new Error("initializeWasm() must be awaited first!");
11236                 }
11237                 const nativeResponseValue = wasm.Shutdown_get_channel_id(this_ptr);
11238                 return decodeArray(nativeResponseValue);
11239         }
11240         // void Shutdown_set_channel_id(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11241         export function Shutdown_set_channel_id(this_ptr: number, val: Uint8Array): void {
11242                 if(!isWasmInitialized) {
11243                         throw new Error("initializeWasm() must be awaited first!");
11244                 }
11245                 const nativeResponseValue = wasm.Shutdown_set_channel_id(this_ptr, encodeArray(val));
11246                 // debug statements here
11247         }
11248         // struct LDKu8slice Shutdown_get_scriptpubkey(const struct LDKShutdown *NONNULL_PTR this_ptr);
11249         export function Shutdown_get_scriptpubkey(this_ptr: number): Uint8Array {
11250                 if(!isWasmInitialized) {
11251                         throw new Error("initializeWasm() must be awaited first!");
11252                 }
11253                 const nativeResponseValue = wasm.Shutdown_get_scriptpubkey(this_ptr);
11254                 return decodeArray(nativeResponseValue);
11255         }
11256         // void Shutdown_set_scriptpubkey(struct LDKShutdown *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
11257         export function Shutdown_set_scriptpubkey(this_ptr: number, val: Uint8Array): void {
11258                 if(!isWasmInitialized) {
11259                         throw new Error("initializeWasm() must be awaited first!");
11260                 }
11261                 const nativeResponseValue = wasm.Shutdown_set_scriptpubkey(this_ptr, encodeArray(val));
11262                 // debug statements here
11263         }
11264         // MUST_USE_RES struct LDKShutdown Shutdown_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z scriptpubkey_arg);
11265         export function Shutdown_new(channel_id_arg: Uint8Array, scriptpubkey_arg: Uint8Array): number {
11266                 if(!isWasmInitialized) {
11267                         throw new Error("initializeWasm() must be awaited first!");
11268                 }
11269                 const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
11270                 return nativeResponseValue;
11271         }
11272         // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
11273         export function Shutdown_clone(orig: number): number {
11274                 if(!isWasmInitialized) {
11275                         throw new Error("initializeWasm() must be awaited first!");
11276                 }
11277                 const nativeResponseValue = wasm.Shutdown_clone(orig);
11278                 return nativeResponseValue;
11279         }
11280         // void ClosingSignedFeeRange_free(struct LDKClosingSignedFeeRange this_obj);
11281         export function ClosingSignedFeeRange_free(this_obj: number): void {
11282                 if(!isWasmInitialized) {
11283                         throw new Error("initializeWasm() must be awaited first!");
11284                 }
11285                 const nativeResponseValue = wasm.ClosingSignedFeeRange_free(this_obj);
11286                 // debug statements here
11287         }
11288         // uint64_t ClosingSignedFeeRange_get_min_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
11289         export function ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr: number): number {
11290                 if(!isWasmInitialized) {
11291                         throw new Error("initializeWasm() must be awaited first!");
11292                 }
11293                 const nativeResponseValue = wasm.ClosingSignedFeeRange_get_min_fee_satoshis(this_ptr);
11294                 return nativeResponseValue;
11295         }
11296         // void ClosingSignedFeeRange_set_min_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
11297         export function ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr: number, val: number): void {
11298                 if(!isWasmInitialized) {
11299                         throw new Error("initializeWasm() must be awaited first!");
11300                 }
11301                 const nativeResponseValue = wasm.ClosingSignedFeeRange_set_min_fee_satoshis(this_ptr, val);
11302                 // debug statements here
11303         }
11304         // uint64_t ClosingSignedFeeRange_get_max_fee_satoshis(const struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr);
11305         export function ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr: number): number {
11306                 if(!isWasmInitialized) {
11307                         throw new Error("initializeWasm() must be awaited first!");
11308                 }
11309                 const nativeResponseValue = wasm.ClosingSignedFeeRange_get_max_fee_satoshis(this_ptr);
11310                 return nativeResponseValue;
11311         }
11312         // void ClosingSignedFeeRange_set_max_fee_satoshis(struct LDKClosingSignedFeeRange *NONNULL_PTR this_ptr, uint64_t val);
11313         export function ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr: number, val: number): void {
11314                 if(!isWasmInitialized) {
11315                         throw new Error("initializeWasm() must be awaited first!");
11316                 }
11317                 const nativeResponseValue = wasm.ClosingSignedFeeRange_set_max_fee_satoshis(this_ptr, val);
11318                 // debug statements here
11319         }
11320         // MUST_USE_RES struct LDKClosingSignedFeeRange ClosingSignedFeeRange_new(uint64_t min_fee_satoshis_arg, uint64_t max_fee_satoshis_arg);
11321         export function ClosingSignedFeeRange_new(min_fee_satoshis_arg: number, max_fee_satoshis_arg: number): number {
11322                 if(!isWasmInitialized) {
11323                         throw new Error("initializeWasm() must be awaited first!");
11324                 }
11325                 const nativeResponseValue = wasm.ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg);
11326                 return nativeResponseValue;
11327         }
11328         // struct LDKClosingSignedFeeRange ClosingSignedFeeRange_clone(const struct LDKClosingSignedFeeRange *NONNULL_PTR orig);
11329         export function ClosingSignedFeeRange_clone(orig: number): number {
11330                 if(!isWasmInitialized) {
11331                         throw new Error("initializeWasm() must be awaited first!");
11332                 }
11333                 const nativeResponseValue = wasm.ClosingSignedFeeRange_clone(orig);
11334                 return nativeResponseValue;
11335         }
11336         // void ClosingSigned_free(struct LDKClosingSigned this_obj);
11337         export function ClosingSigned_free(this_obj: number): void {
11338                 if(!isWasmInitialized) {
11339                         throw new Error("initializeWasm() must be awaited first!");
11340                 }
11341                 const nativeResponseValue = wasm.ClosingSigned_free(this_obj);
11342                 // debug statements here
11343         }
11344         // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
11345         export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
11346                 if(!isWasmInitialized) {
11347                         throw new Error("initializeWasm() must be awaited first!");
11348                 }
11349                 const nativeResponseValue = wasm.ClosingSigned_get_channel_id(this_ptr);
11350                 return decodeArray(nativeResponseValue);
11351         }
11352         // void ClosingSigned_set_channel_id(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11353         export function ClosingSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
11354                 if(!isWasmInitialized) {
11355                         throw new Error("initializeWasm() must be awaited first!");
11356                 }
11357                 const nativeResponseValue = wasm.ClosingSigned_set_channel_id(this_ptr, encodeArray(val));
11358                 // debug statements here
11359         }
11360         // uint64_t ClosingSigned_get_fee_satoshis(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
11361         export function ClosingSigned_get_fee_satoshis(this_ptr: number): number {
11362                 if(!isWasmInitialized) {
11363                         throw new Error("initializeWasm() must be awaited first!");
11364                 }
11365                 const nativeResponseValue = wasm.ClosingSigned_get_fee_satoshis(this_ptr);
11366                 return nativeResponseValue;
11367         }
11368         // void ClosingSigned_set_fee_satoshis(struct LDKClosingSigned *NONNULL_PTR this_ptr, uint64_t val);
11369         export function ClosingSigned_set_fee_satoshis(this_ptr: number, val: number): void {
11370                 if(!isWasmInitialized) {
11371                         throw new Error("initializeWasm() must be awaited first!");
11372                 }
11373                 const nativeResponseValue = wasm.ClosingSigned_set_fee_satoshis(this_ptr, val);
11374                 // debug statements here
11375         }
11376         // struct LDKSignature ClosingSigned_get_signature(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
11377         export function ClosingSigned_get_signature(this_ptr: number): Uint8Array {
11378                 if(!isWasmInitialized) {
11379                         throw new Error("initializeWasm() must be awaited first!");
11380                 }
11381                 const nativeResponseValue = wasm.ClosingSigned_get_signature(this_ptr);
11382                 return decodeArray(nativeResponseValue);
11383         }
11384         // void ClosingSigned_set_signature(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
11385         export function ClosingSigned_set_signature(this_ptr: number, val: Uint8Array): void {
11386                 if(!isWasmInitialized) {
11387                         throw new Error("initializeWasm() must be awaited first!");
11388                 }
11389                 const nativeResponseValue = wasm.ClosingSigned_set_signature(this_ptr, encodeArray(val));
11390                 // debug statements here
11391         }
11392         // struct LDKClosingSignedFeeRange ClosingSigned_get_fee_range(const struct LDKClosingSigned *NONNULL_PTR this_ptr);
11393         export function ClosingSigned_get_fee_range(this_ptr: number): number {
11394                 if(!isWasmInitialized) {
11395                         throw new Error("initializeWasm() must be awaited first!");
11396                 }
11397                 const nativeResponseValue = wasm.ClosingSigned_get_fee_range(this_ptr);
11398                 return nativeResponseValue;
11399         }
11400         // void ClosingSigned_set_fee_range(struct LDKClosingSigned *NONNULL_PTR this_ptr, struct LDKClosingSignedFeeRange val);
11401         export function ClosingSigned_set_fee_range(this_ptr: number, val: number): void {
11402                 if(!isWasmInitialized) {
11403                         throw new Error("initializeWasm() must be awaited first!");
11404                 }
11405                 const nativeResponseValue = wasm.ClosingSigned_set_fee_range(this_ptr, val);
11406                 // debug statements here
11407         }
11408         // 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);
11409         export function ClosingSigned_new(channel_id_arg: Uint8Array, fee_satoshis_arg: number, signature_arg: Uint8Array, fee_range_arg: number): number {
11410                 if(!isWasmInitialized) {
11411                         throw new Error("initializeWasm() must be awaited first!");
11412                 }
11413                 const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg), fee_range_arg);
11414                 return nativeResponseValue;
11415         }
11416         // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
11417         export function ClosingSigned_clone(orig: number): number {
11418                 if(!isWasmInitialized) {
11419                         throw new Error("initializeWasm() must be awaited first!");
11420                 }
11421                 const nativeResponseValue = wasm.ClosingSigned_clone(orig);
11422                 return nativeResponseValue;
11423         }
11424         // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_obj);
11425         export function UpdateAddHTLC_free(this_obj: number): void {
11426                 if(!isWasmInitialized) {
11427                         throw new Error("initializeWasm() must be awaited first!");
11428                 }
11429                 const nativeResponseValue = wasm.UpdateAddHTLC_free(this_obj);
11430                 // debug statements here
11431         }
11432         // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
11433         export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
11434                 if(!isWasmInitialized) {
11435                         throw new Error("initializeWasm() must be awaited first!");
11436                 }
11437                 const nativeResponseValue = wasm.UpdateAddHTLC_get_channel_id(this_ptr);
11438                 return decodeArray(nativeResponseValue);
11439         }
11440         // void UpdateAddHTLC_set_channel_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11441         export function UpdateAddHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
11442                 if(!isWasmInitialized) {
11443                         throw new Error("initializeWasm() must be awaited first!");
11444                 }
11445                 const nativeResponseValue = wasm.UpdateAddHTLC_set_channel_id(this_ptr, encodeArray(val));
11446                 // debug statements here
11447         }
11448         // uint64_t UpdateAddHTLC_get_htlc_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
11449         export function UpdateAddHTLC_get_htlc_id(this_ptr: number): number {
11450                 if(!isWasmInitialized) {
11451                         throw new Error("initializeWasm() must be awaited first!");
11452                 }
11453                 const nativeResponseValue = wasm.UpdateAddHTLC_get_htlc_id(this_ptr);
11454                 return nativeResponseValue;
11455         }
11456         // void UpdateAddHTLC_set_htlc_id(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
11457         export function UpdateAddHTLC_set_htlc_id(this_ptr: number, val: number): void {
11458                 if(!isWasmInitialized) {
11459                         throw new Error("initializeWasm() must be awaited first!");
11460                 }
11461                 const nativeResponseValue = wasm.UpdateAddHTLC_set_htlc_id(this_ptr, val);
11462                 // debug statements here
11463         }
11464         // uint64_t UpdateAddHTLC_get_amount_msat(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
11465         export function UpdateAddHTLC_get_amount_msat(this_ptr: number): number {
11466                 if(!isWasmInitialized) {
11467                         throw new Error("initializeWasm() must be awaited first!");
11468                 }
11469                 const nativeResponseValue = wasm.UpdateAddHTLC_get_amount_msat(this_ptr);
11470                 return nativeResponseValue;
11471         }
11472         // void UpdateAddHTLC_set_amount_msat(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint64_t val);
11473         export function UpdateAddHTLC_set_amount_msat(this_ptr: number, val: number): void {
11474                 if(!isWasmInitialized) {
11475                         throw new Error("initializeWasm() must be awaited first!");
11476                 }
11477                 const nativeResponseValue = wasm.UpdateAddHTLC_set_amount_msat(this_ptr, val);
11478                 // debug statements here
11479         }
11480         // const uint8_t (*UpdateAddHTLC_get_payment_hash(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
11481         export function UpdateAddHTLC_get_payment_hash(this_ptr: number): Uint8Array {
11482                 if(!isWasmInitialized) {
11483                         throw new Error("initializeWasm() must be awaited first!");
11484                 }
11485                 const nativeResponseValue = wasm.UpdateAddHTLC_get_payment_hash(this_ptr);
11486                 return decodeArray(nativeResponseValue);
11487         }
11488         // void UpdateAddHTLC_set_payment_hash(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11489         export function UpdateAddHTLC_set_payment_hash(this_ptr: number, val: Uint8Array): void {
11490                 if(!isWasmInitialized) {
11491                         throw new Error("initializeWasm() must be awaited first!");
11492                 }
11493                 const nativeResponseValue = wasm.UpdateAddHTLC_set_payment_hash(this_ptr, encodeArray(val));
11494                 // debug statements here
11495         }
11496         // uint32_t UpdateAddHTLC_get_cltv_expiry(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr);
11497         export function UpdateAddHTLC_get_cltv_expiry(this_ptr: number): number {
11498                 if(!isWasmInitialized) {
11499                         throw new Error("initializeWasm() must be awaited first!");
11500                 }
11501                 const nativeResponseValue = wasm.UpdateAddHTLC_get_cltv_expiry(this_ptr);
11502                 return nativeResponseValue;
11503         }
11504         // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
11505         export function UpdateAddHTLC_set_cltv_expiry(this_ptr: number, val: number): void {
11506                 if(!isWasmInitialized) {
11507                         throw new Error("initializeWasm() must be awaited first!");
11508                 }
11509                 const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
11510                 // debug statements here
11511         }
11512         // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
11513         export function UpdateAddHTLC_clone(orig: number): number {
11514                 if(!isWasmInitialized) {
11515                         throw new Error("initializeWasm() must be awaited first!");
11516                 }
11517                 const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
11518                 return nativeResponseValue;
11519         }
11520         // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_obj);
11521         export function UpdateFulfillHTLC_free(this_obj: number): void {
11522                 if(!isWasmInitialized) {
11523                         throw new Error("initializeWasm() must be awaited first!");
11524                 }
11525                 const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_obj);
11526                 // debug statements here
11527         }
11528         // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
11529         export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
11530                 if(!isWasmInitialized) {
11531                         throw new Error("initializeWasm() must be awaited first!");
11532                 }
11533                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_channel_id(this_ptr);
11534                 return decodeArray(nativeResponseValue);
11535         }
11536         // void UpdateFulfillHTLC_set_channel_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11537         export function UpdateFulfillHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
11538                 if(!isWasmInitialized) {
11539                         throw new Error("initializeWasm() must be awaited first!");
11540                 }
11541                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_channel_id(this_ptr, encodeArray(val));
11542                 // debug statements here
11543         }
11544         // uint64_t UpdateFulfillHTLC_get_htlc_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr);
11545         export function UpdateFulfillHTLC_get_htlc_id(this_ptr: number): number {
11546                 if(!isWasmInitialized) {
11547                         throw new Error("initializeWasm() must be awaited first!");
11548                 }
11549                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_htlc_id(this_ptr);
11550                 return nativeResponseValue;
11551         }
11552         // void UpdateFulfillHTLC_set_htlc_id(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, uint64_t val);
11553         export function UpdateFulfillHTLC_set_htlc_id(this_ptr: number, val: number): void {
11554                 if(!isWasmInitialized) {
11555                         throw new Error("initializeWasm() must be awaited first!");
11556                 }
11557                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_htlc_id(this_ptr, val);
11558                 // debug statements here
11559         }
11560         // const uint8_t (*UpdateFulfillHTLC_get_payment_preimage(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
11561         export function UpdateFulfillHTLC_get_payment_preimage(this_ptr: number): Uint8Array {
11562                 if(!isWasmInitialized) {
11563                         throw new Error("initializeWasm() must be awaited first!");
11564                 }
11565                 const nativeResponseValue = wasm.UpdateFulfillHTLC_get_payment_preimage(this_ptr);
11566                 return decodeArray(nativeResponseValue);
11567         }
11568         // void UpdateFulfillHTLC_set_payment_preimage(struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11569         export function UpdateFulfillHTLC_set_payment_preimage(this_ptr: number, val: Uint8Array): void {
11570                 if(!isWasmInitialized) {
11571                         throw new Error("initializeWasm() must be awaited first!");
11572                 }
11573                 const nativeResponseValue = wasm.UpdateFulfillHTLC_set_payment_preimage(this_ptr, encodeArray(val));
11574                 // debug statements here
11575         }
11576         // MUST_USE_RES struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t htlc_id_arg, struct LDKThirtyTwoBytes payment_preimage_arg);
11577         export function UpdateFulfillHTLC_new(channel_id_arg: Uint8Array, htlc_id_arg: number, payment_preimage_arg: Uint8Array): number {
11578                 if(!isWasmInitialized) {
11579                         throw new Error("initializeWasm() must be awaited first!");
11580                 }
11581                 const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
11582                 return nativeResponseValue;
11583         }
11584         // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
11585         export function UpdateFulfillHTLC_clone(orig: number): number {
11586                 if(!isWasmInitialized) {
11587                         throw new Error("initializeWasm() must be awaited first!");
11588                 }
11589                 const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
11590                 return nativeResponseValue;
11591         }
11592         // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_obj);
11593         export function UpdateFailHTLC_free(this_obj: number): void {
11594                 if(!isWasmInitialized) {
11595                         throw new Error("initializeWasm() must be awaited first!");
11596                 }
11597                 const nativeResponseValue = wasm.UpdateFailHTLC_free(this_obj);
11598                 // debug statements here
11599         }
11600         // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
11601         export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
11602                 if(!isWasmInitialized) {
11603                         throw new Error("initializeWasm() must be awaited first!");
11604                 }
11605                 const nativeResponseValue = wasm.UpdateFailHTLC_get_channel_id(this_ptr);
11606                 return decodeArray(nativeResponseValue);
11607         }
11608         // void UpdateFailHTLC_set_channel_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11609         export function UpdateFailHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
11610                 if(!isWasmInitialized) {
11611                         throw new Error("initializeWasm() must be awaited first!");
11612                 }
11613                 const nativeResponseValue = wasm.UpdateFailHTLC_set_channel_id(this_ptr, encodeArray(val));
11614                 // debug statements here
11615         }
11616         // uint64_t UpdateFailHTLC_get_htlc_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr);
11617         export function UpdateFailHTLC_get_htlc_id(this_ptr: number): number {
11618                 if(!isWasmInitialized) {
11619                         throw new Error("initializeWasm() must be awaited first!");
11620                 }
11621                 const nativeResponseValue = wasm.UpdateFailHTLC_get_htlc_id(this_ptr);
11622                 return nativeResponseValue;
11623         }
11624         // void UpdateFailHTLC_set_htlc_id(struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr, uint64_t val);
11625         export function UpdateFailHTLC_set_htlc_id(this_ptr: number, val: number): void {
11626                 if(!isWasmInitialized) {
11627                         throw new Error("initializeWasm() must be awaited first!");
11628                 }
11629                 const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
11630                 // debug statements here
11631         }
11632         // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
11633         export function UpdateFailHTLC_clone(orig: number): number {
11634                 if(!isWasmInitialized) {
11635                         throw new Error("initializeWasm() must be awaited first!");
11636                 }
11637                 const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
11638                 return nativeResponseValue;
11639         }
11640         // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_obj);
11641         export function UpdateFailMalformedHTLC_free(this_obj: number): void {
11642                 if(!isWasmInitialized) {
11643                         throw new Error("initializeWasm() must be awaited first!");
11644                 }
11645                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_obj);
11646                 // debug statements here
11647         }
11648         // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
11649         export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
11650                 if(!isWasmInitialized) {
11651                         throw new Error("initializeWasm() must be awaited first!");
11652                 }
11653                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_channel_id(this_ptr);
11654                 return decodeArray(nativeResponseValue);
11655         }
11656         // void UpdateFailMalformedHTLC_set_channel_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11657         export function UpdateFailMalformedHTLC_set_channel_id(this_ptr: number, val: Uint8Array): void {
11658                 if(!isWasmInitialized) {
11659                         throw new Error("initializeWasm() must be awaited first!");
11660                 }
11661                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_channel_id(this_ptr, encodeArray(val));
11662                 // debug statements here
11663         }
11664         // uint64_t UpdateFailMalformedHTLC_get_htlc_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
11665         export function UpdateFailMalformedHTLC_get_htlc_id(this_ptr: number): number {
11666                 if(!isWasmInitialized) {
11667                         throw new Error("initializeWasm() must be awaited first!");
11668                 }
11669                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_htlc_id(this_ptr);
11670                 return nativeResponseValue;
11671         }
11672         // void UpdateFailMalformedHTLC_set_htlc_id(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint64_t val);
11673         export function UpdateFailMalformedHTLC_set_htlc_id(this_ptr: number, val: number): void {
11674                 if(!isWasmInitialized) {
11675                         throw new Error("initializeWasm() must be awaited first!");
11676                 }
11677                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_htlc_id(this_ptr, val);
11678                 // debug statements here
11679         }
11680         // uint16_t UpdateFailMalformedHTLC_get_failure_code(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr);
11681         export function UpdateFailMalformedHTLC_get_failure_code(this_ptr: number): number {
11682                 if(!isWasmInitialized) {
11683                         throw new Error("initializeWasm() must be awaited first!");
11684                 }
11685                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_get_failure_code(this_ptr);
11686                 return nativeResponseValue;
11687         }
11688         // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
11689         export function UpdateFailMalformedHTLC_set_failure_code(this_ptr: number, val: number): void {
11690                 if(!isWasmInitialized) {
11691                         throw new Error("initializeWasm() must be awaited first!");
11692                 }
11693                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
11694                 // debug statements here
11695         }
11696         // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
11697         export function UpdateFailMalformedHTLC_clone(orig: number): number {
11698                 if(!isWasmInitialized) {
11699                         throw new Error("initializeWasm() must be awaited first!");
11700                 }
11701                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
11702                 return nativeResponseValue;
11703         }
11704         // void CommitmentSigned_free(struct LDKCommitmentSigned this_obj);
11705         export function CommitmentSigned_free(this_obj: number): void {
11706                 if(!isWasmInitialized) {
11707                         throw new Error("initializeWasm() must be awaited first!");
11708                 }
11709                 const nativeResponseValue = wasm.CommitmentSigned_free(this_obj);
11710                 // debug statements here
11711         }
11712         // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
11713         export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
11714                 if(!isWasmInitialized) {
11715                         throw new Error("initializeWasm() must be awaited first!");
11716                 }
11717                 const nativeResponseValue = wasm.CommitmentSigned_get_channel_id(this_ptr);
11718                 return decodeArray(nativeResponseValue);
11719         }
11720         // void CommitmentSigned_set_channel_id(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11721         export function CommitmentSigned_set_channel_id(this_ptr: number, val: Uint8Array): void {
11722                 if(!isWasmInitialized) {
11723                         throw new Error("initializeWasm() must be awaited first!");
11724                 }
11725                 const nativeResponseValue = wasm.CommitmentSigned_set_channel_id(this_ptr, encodeArray(val));
11726                 // debug statements here
11727         }
11728         // struct LDKSignature CommitmentSigned_get_signature(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr);
11729         export function CommitmentSigned_get_signature(this_ptr: number): Uint8Array {
11730                 if(!isWasmInitialized) {
11731                         throw new Error("initializeWasm() must be awaited first!");
11732                 }
11733                 const nativeResponseValue = wasm.CommitmentSigned_get_signature(this_ptr);
11734                 return decodeArray(nativeResponseValue);
11735         }
11736         // void CommitmentSigned_set_signature(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKSignature val);
11737         export function CommitmentSigned_set_signature(this_ptr: number, val: Uint8Array): void {
11738                 if(!isWasmInitialized) {
11739                         throw new Error("initializeWasm() must be awaited first!");
11740                 }
11741                 const nativeResponseValue = wasm.CommitmentSigned_set_signature(this_ptr, encodeArray(val));
11742                 // debug statements here
11743         }
11744         // void CommitmentSigned_set_htlc_signatures(struct LDKCommitmentSigned *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
11745         export function CommitmentSigned_set_htlc_signatures(this_ptr: number, val: Uint8Array[]): void {
11746                 if(!isWasmInitialized) {
11747                         throw new Error("initializeWasm() must be awaited first!");
11748                 }
11749                 const nativeResponseValue = wasm.CommitmentSigned_set_htlc_signatures(this_ptr, val);
11750                 // debug statements here
11751         }
11752         // MUST_USE_RES struct LDKCommitmentSigned CommitmentSigned_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
11753         export function CommitmentSigned_new(channel_id_arg: Uint8Array, signature_arg: Uint8Array, htlc_signatures_arg: Uint8Array[]): number {
11754                 if(!isWasmInitialized) {
11755                         throw new Error("initializeWasm() must be awaited first!");
11756                 }
11757                 const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
11758                 return nativeResponseValue;
11759         }
11760         // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
11761         export function CommitmentSigned_clone(orig: number): number {
11762                 if(!isWasmInitialized) {
11763                         throw new Error("initializeWasm() must be awaited first!");
11764                 }
11765                 const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
11766                 return nativeResponseValue;
11767         }
11768         // void RevokeAndACK_free(struct LDKRevokeAndACK this_obj);
11769         export function RevokeAndACK_free(this_obj: number): void {
11770                 if(!isWasmInitialized) {
11771                         throw new Error("initializeWasm() must be awaited first!");
11772                 }
11773                 const nativeResponseValue = wasm.RevokeAndACK_free(this_obj);
11774                 // debug statements here
11775         }
11776         // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
11777         export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
11778                 if(!isWasmInitialized) {
11779                         throw new Error("initializeWasm() must be awaited first!");
11780                 }
11781                 const nativeResponseValue = wasm.RevokeAndACK_get_channel_id(this_ptr);
11782                 return decodeArray(nativeResponseValue);
11783         }
11784         // void RevokeAndACK_set_channel_id(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11785         export function RevokeAndACK_set_channel_id(this_ptr: number, val: Uint8Array): void {
11786                 if(!isWasmInitialized) {
11787                         throw new Error("initializeWasm() must be awaited first!");
11788                 }
11789                 const nativeResponseValue = wasm.RevokeAndACK_set_channel_id(this_ptr, encodeArray(val));
11790                 // debug statements here
11791         }
11792         // const uint8_t (*RevokeAndACK_get_per_commitment_secret(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
11793         export function RevokeAndACK_get_per_commitment_secret(this_ptr: number): Uint8Array {
11794                 if(!isWasmInitialized) {
11795                         throw new Error("initializeWasm() must be awaited first!");
11796                 }
11797                 const nativeResponseValue = wasm.RevokeAndACK_get_per_commitment_secret(this_ptr);
11798                 return decodeArray(nativeResponseValue);
11799         }
11800         // void RevokeAndACK_set_per_commitment_secret(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11801         export function RevokeAndACK_set_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
11802                 if(!isWasmInitialized) {
11803                         throw new Error("initializeWasm() must be awaited first!");
11804                 }
11805                 const nativeResponseValue = wasm.RevokeAndACK_set_per_commitment_secret(this_ptr, encodeArray(val));
11806                 // debug statements here
11807         }
11808         // struct LDKPublicKey RevokeAndACK_get_next_per_commitment_point(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr);
11809         export function RevokeAndACK_get_next_per_commitment_point(this_ptr: number): Uint8Array {
11810                 if(!isWasmInitialized) {
11811                         throw new Error("initializeWasm() must be awaited first!");
11812                 }
11813                 const nativeResponseValue = wasm.RevokeAndACK_get_next_per_commitment_point(this_ptr);
11814                 return decodeArray(nativeResponseValue);
11815         }
11816         // void RevokeAndACK_set_next_per_commitment_point(struct LDKRevokeAndACK *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11817         export function RevokeAndACK_set_next_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11818                 if(!isWasmInitialized) {
11819                         throw new Error("initializeWasm() must be awaited first!");
11820                 }
11821                 const nativeResponseValue = wasm.RevokeAndACK_set_next_per_commitment_point(this_ptr, encodeArray(val));
11822                 // debug statements here
11823         }
11824         // 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);
11825         export function RevokeAndACK_new(channel_id_arg: Uint8Array, per_commitment_secret_arg: Uint8Array, next_per_commitment_point_arg: Uint8Array): number {
11826                 if(!isWasmInitialized) {
11827                         throw new Error("initializeWasm() must be awaited first!");
11828                 }
11829                 const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
11830                 return nativeResponseValue;
11831         }
11832         // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
11833         export function RevokeAndACK_clone(orig: number): number {
11834                 if(!isWasmInitialized) {
11835                         throw new Error("initializeWasm() must be awaited first!");
11836                 }
11837                 const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
11838                 return nativeResponseValue;
11839         }
11840         // void UpdateFee_free(struct LDKUpdateFee this_obj);
11841         export function UpdateFee_free(this_obj: number): void {
11842                 if(!isWasmInitialized) {
11843                         throw new Error("initializeWasm() must be awaited first!");
11844                 }
11845                 const nativeResponseValue = wasm.UpdateFee_free(this_obj);
11846                 // debug statements here
11847         }
11848         // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
11849         export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
11850                 if(!isWasmInitialized) {
11851                         throw new Error("initializeWasm() must be awaited first!");
11852                 }
11853                 const nativeResponseValue = wasm.UpdateFee_get_channel_id(this_ptr);
11854                 return decodeArray(nativeResponseValue);
11855         }
11856         // void UpdateFee_set_channel_id(struct LDKUpdateFee *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11857         export function UpdateFee_set_channel_id(this_ptr: number, val: Uint8Array): void {
11858                 if(!isWasmInitialized) {
11859                         throw new Error("initializeWasm() must be awaited first!");
11860                 }
11861                 const nativeResponseValue = wasm.UpdateFee_set_channel_id(this_ptr, encodeArray(val));
11862                 // debug statements here
11863         }
11864         // uint32_t UpdateFee_get_feerate_per_kw(const struct LDKUpdateFee *NONNULL_PTR this_ptr);
11865         export function UpdateFee_get_feerate_per_kw(this_ptr: number): number {
11866                 if(!isWasmInitialized) {
11867                         throw new Error("initializeWasm() must be awaited first!");
11868                 }
11869                 const nativeResponseValue = wasm.UpdateFee_get_feerate_per_kw(this_ptr);
11870                 return nativeResponseValue;
11871         }
11872         // void UpdateFee_set_feerate_per_kw(struct LDKUpdateFee *NONNULL_PTR this_ptr, uint32_t val);
11873         export function UpdateFee_set_feerate_per_kw(this_ptr: number, val: number): void {
11874                 if(!isWasmInitialized) {
11875                         throw new Error("initializeWasm() must be awaited first!");
11876                 }
11877                 const nativeResponseValue = wasm.UpdateFee_set_feerate_per_kw(this_ptr, val);
11878                 // debug statements here
11879         }
11880         // MUST_USE_RES struct LDKUpdateFee UpdateFee_new(struct LDKThirtyTwoBytes channel_id_arg, uint32_t feerate_per_kw_arg);
11881         export function UpdateFee_new(channel_id_arg: Uint8Array, feerate_per_kw_arg: number): number {
11882                 if(!isWasmInitialized) {
11883                         throw new Error("initializeWasm() must be awaited first!");
11884                 }
11885                 const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
11886                 return nativeResponseValue;
11887         }
11888         // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
11889         export function UpdateFee_clone(orig: number): number {
11890                 if(!isWasmInitialized) {
11891                         throw new Error("initializeWasm() must be awaited first!");
11892                 }
11893                 const nativeResponseValue = wasm.UpdateFee_clone(orig);
11894                 return nativeResponseValue;
11895         }
11896         // void DataLossProtect_free(struct LDKDataLossProtect this_obj);
11897         export function DataLossProtect_free(this_obj: number): void {
11898                 if(!isWasmInitialized) {
11899                         throw new Error("initializeWasm() must be awaited first!");
11900                 }
11901                 const nativeResponseValue = wasm.DataLossProtect_free(this_obj);
11902                 // debug statements here
11903         }
11904         // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
11905         export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
11906                 if(!isWasmInitialized) {
11907                         throw new Error("initializeWasm() must be awaited first!");
11908                 }
11909                 const nativeResponseValue = wasm.DataLossProtect_get_your_last_per_commitment_secret(this_ptr);
11910                 return decodeArray(nativeResponseValue);
11911         }
11912         // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11913         export function DataLossProtect_set_your_last_per_commitment_secret(this_ptr: number, val: Uint8Array): void {
11914                 if(!isWasmInitialized) {
11915                         throw new Error("initializeWasm() must be awaited first!");
11916                 }
11917                 const nativeResponseValue = wasm.DataLossProtect_set_your_last_per_commitment_secret(this_ptr, encodeArray(val));
11918                 // debug statements here
11919         }
11920         // struct LDKPublicKey DataLossProtect_get_my_current_per_commitment_point(const struct LDKDataLossProtect *NONNULL_PTR this_ptr);
11921         export function DataLossProtect_get_my_current_per_commitment_point(this_ptr: number): Uint8Array {
11922                 if(!isWasmInitialized) {
11923                         throw new Error("initializeWasm() must be awaited first!");
11924                 }
11925                 const nativeResponseValue = wasm.DataLossProtect_get_my_current_per_commitment_point(this_ptr);
11926                 return decodeArray(nativeResponseValue);
11927         }
11928         // void DataLossProtect_set_my_current_per_commitment_point(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKPublicKey val);
11929         export function DataLossProtect_set_my_current_per_commitment_point(this_ptr: number, val: Uint8Array): void {
11930                 if(!isWasmInitialized) {
11931                         throw new Error("initializeWasm() must be awaited first!");
11932                 }
11933                 const nativeResponseValue = wasm.DataLossProtect_set_my_current_per_commitment_point(this_ptr, encodeArray(val));
11934                 // debug statements here
11935         }
11936         // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
11937         export function DataLossProtect_new(your_last_per_commitment_secret_arg: Uint8Array, my_current_per_commitment_point_arg: Uint8Array): number {
11938                 if(!isWasmInitialized) {
11939                         throw new Error("initializeWasm() must be awaited first!");
11940                 }
11941                 const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
11942                 return nativeResponseValue;
11943         }
11944         // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
11945         export function DataLossProtect_clone(orig: number): number {
11946                 if(!isWasmInitialized) {
11947                         throw new Error("initializeWasm() must be awaited first!");
11948                 }
11949                 const nativeResponseValue = wasm.DataLossProtect_clone(orig);
11950                 return nativeResponseValue;
11951         }
11952         // void ChannelReestablish_free(struct LDKChannelReestablish this_obj);
11953         export function ChannelReestablish_free(this_obj: number): void {
11954                 if(!isWasmInitialized) {
11955                         throw new Error("initializeWasm() must be awaited first!");
11956                 }
11957                 const nativeResponseValue = wasm.ChannelReestablish_free(this_obj);
11958                 // debug statements here
11959         }
11960         // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
11961         export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
11962                 if(!isWasmInitialized) {
11963                         throw new Error("initializeWasm() must be awaited first!");
11964                 }
11965                 const nativeResponseValue = wasm.ChannelReestablish_get_channel_id(this_ptr);
11966                 return decodeArray(nativeResponseValue);
11967         }
11968         // void ChannelReestablish_set_channel_id(struct LDKChannelReestablish *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
11969         export function ChannelReestablish_set_channel_id(this_ptr: number, val: Uint8Array): void {
11970                 if(!isWasmInitialized) {
11971                         throw new Error("initializeWasm() must be awaited first!");
11972                 }
11973                 const nativeResponseValue = wasm.ChannelReestablish_set_channel_id(this_ptr, encodeArray(val));
11974                 // debug statements here
11975         }
11976         // uint64_t ChannelReestablish_get_next_local_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
11977         export function ChannelReestablish_get_next_local_commitment_number(this_ptr: number): number {
11978                 if(!isWasmInitialized) {
11979                         throw new Error("initializeWasm() must be awaited first!");
11980                 }
11981                 const nativeResponseValue = wasm.ChannelReestablish_get_next_local_commitment_number(this_ptr);
11982                 return nativeResponseValue;
11983         }
11984         // void ChannelReestablish_set_next_local_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
11985         export function ChannelReestablish_set_next_local_commitment_number(this_ptr: number, val: number): void {
11986                 if(!isWasmInitialized) {
11987                         throw new Error("initializeWasm() must be awaited first!");
11988                 }
11989                 const nativeResponseValue = wasm.ChannelReestablish_set_next_local_commitment_number(this_ptr, val);
11990                 // debug statements here
11991         }
11992         // uint64_t ChannelReestablish_get_next_remote_commitment_number(const struct LDKChannelReestablish *NONNULL_PTR this_ptr);
11993         export function ChannelReestablish_get_next_remote_commitment_number(this_ptr: number): number {
11994                 if(!isWasmInitialized) {
11995                         throw new Error("initializeWasm() must be awaited first!");
11996                 }
11997                 const nativeResponseValue = wasm.ChannelReestablish_get_next_remote_commitment_number(this_ptr);
11998                 return nativeResponseValue;
11999         }
12000         // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
12001         export function ChannelReestablish_set_next_remote_commitment_number(this_ptr: number, val: number): void {
12002                 if(!isWasmInitialized) {
12003                         throw new Error("initializeWasm() must be awaited first!");
12004                 }
12005                 const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
12006                 // debug statements here
12007         }
12008         // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
12009         export function ChannelReestablish_clone(orig: number): number {
12010                 if(!isWasmInitialized) {
12011                         throw new Error("initializeWasm() must be awaited first!");
12012                 }
12013                 const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
12014                 return nativeResponseValue;
12015         }
12016         // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_obj);
12017         export function AnnouncementSignatures_free(this_obj: number): void {
12018                 if(!isWasmInitialized) {
12019                         throw new Error("initializeWasm() must be awaited first!");
12020                 }
12021                 const nativeResponseValue = wasm.AnnouncementSignatures_free(this_obj);
12022                 // debug statements here
12023         }
12024         // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
12025         export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
12026                 if(!isWasmInitialized) {
12027                         throw new Error("initializeWasm() must be awaited first!");
12028                 }
12029                 const nativeResponseValue = wasm.AnnouncementSignatures_get_channel_id(this_ptr);
12030                 return decodeArray(nativeResponseValue);
12031         }
12032         // void AnnouncementSignatures_set_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12033         export function AnnouncementSignatures_set_channel_id(this_ptr: number, val: Uint8Array): void {
12034                 if(!isWasmInitialized) {
12035                         throw new Error("initializeWasm() must be awaited first!");
12036                 }
12037                 const nativeResponseValue = wasm.AnnouncementSignatures_set_channel_id(this_ptr, encodeArray(val));
12038                 // debug statements here
12039         }
12040         // uint64_t AnnouncementSignatures_get_short_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
12041         export function AnnouncementSignatures_get_short_channel_id(this_ptr: number): number {
12042                 if(!isWasmInitialized) {
12043                         throw new Error("initializeWasm() must be awaited first!");
12044                 }
12045                 const nativeResponseValue = wasm.AnnouncementSignatures_get_short_channel_id(this_ptr);
12046                 return nativeResponseValue;
12047         }
12048         // void AnnouncementSignatures_set_short_channel_id(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, uint64_t val);
12049         export function AnnouncementSignatures_set_short_channel_id(this_ptr: number, val: number): void {
12050                 if(!isWasmInitialized) {
12051                         throw new Error("initializeWasm() must be awaited first!");
12052                 }
12053                 const nativeResponseValue = wasm.AnnouncementSignatures_set_short_channel_id(this_ptr, val);
12054                 // debug statements here
12055         }
12056         // struct LDKSignature AnnouncementSignatures_get_node_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
12057         export function AnnouncementSignatures_get_node_signature(this_ptr: number): Uint8Array {
12058                 if(!isWasmInitialized) {
12059                         throw new Error("initializeWasm() must be awaited first!");
12060                 }
12061                 const nativeResponseValue = wasm.AnnouncementSignatures_get_node_signature(this_ptr);
12062                 return decodeArray(nativeResponseValue);
12063         }
12064         // void AnnouncementSignatures_set_node_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
12065         export function AnnouncementSignatures_set_node_signature(this_ptr: number, val: Uint8Array): void {
12066                 if(!isWasmInitialized) {
12067                         throw new Error("initializeWasm() must be awaited first!");
12068                 }
12069                 const nativeResponseValue = wasm.AnnouncementSignatures_set_node_signature(this_ptr, encodeArray(val));
12070                 // debug statements here
12071         }
12072         // struct LDKSignature AnnouncementSignatures_get_bitcoin_signature(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr);
12073         export function AnnouncementSignatures_get_bitcoin_signature(this_ptr: number): Uint8Array {
12074                 if(!isWasmInitialized) {
12075                         throw new Error("initializeWasm() must be awaited first!");
12076                 }
12077                 const nativeResponseValue = wasm.AnnouncementSignatures_get_bitcoin_signature(this_ptr);
12078                 return decodeArray(nativeResponseValue);
12079         }
12080         // void AnnouncementSignatures_set_bitcoin_signature(struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr, struct LDKSignature val);
12081         export function AnnouncementSignatures_set_bitcoin_signature(this_ptr: number, val: Uint8Array): void {
12082                 if(!isWasmInitialized) {
12083                         throw new Error("initializeWasm() must be awaited first!");
12084                 }
12085                 const nativeResponseValue = wasm.AnnouncementSignatures_set_bitcoin_signature(this_ptr, encodeArray(val));
12086                 // debug statements here
12087         }
12088         // 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);
12089         export function AnnouncementSignatures_new(channel_id_arg: Uint8Array, short_channel_id_arg: number, node_signature_arg: Uint8Array, bitcoin_signature_arg: Uint8Array): number {
12090                 if(!isWasmInitialized) {
12091                         throw new Error("initializeWasm() must be awaited first!");
12092                 }
12093                 const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
12094                 return nativeResponseValue;
12095         }
12096         // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
12097         export function AnnouncementSignatures_clone(orig: number): number {
12098                 if(!isWasmInitialized) {
12099                         throw new Error("initializeWasm() must be awaited first!");
12100                 }
12101                 const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
12102                 return nativeResponseValue;
12103         }
12104         // void NetAddress_free(struct LDKNetAddress this_ptr);
12105         export function NetAddress_free(this_ptr: number): void {
12106                 if(!isWasmInitialized) {
12107                         throw new Error("initializeWasm() must be awaited first!");
12108                 }
12109                 const nativeResponseValue = wasm.NetAddress_free(this_ptr);
12110                 // debug statements here
12111         }
12112         // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
12113         export function NetAddress_clone(orig: number): number {
12114                 if(!isWasmInitialized) {
12115                         throw new Error("initializeWasm() must be awaited first!");
12116                 }
12117                 const nativeResponseValue = wasm.NetAddress_clone(orig);
12118                 return nativeResponseValue;
12119         }
12120         // struct LDKNetAddress NetAddress_ipv4(struct LDKFourBytes addr, uint16_t port);
12121         export function NetAddress_ipv4(addr: Uint8Array, port: number): number {
12122                 if(!isWasmInitialized) {
12123                         throw new Error("initializeWasm() must be awaited first!");
12124                 }
12125                 const nativeResponseValue = wasm.NetAddress_ipv4(encodeArray(addr), port);
12126                 return nativeResponseValue;
12127         }
12128         // struct LDKNetAddress NetAddress_ipv6(struct LDKSixteenBytes addr, uint16_t port);
12129         export function NetAddress_ipv6(addr: Uint8Array, port: number): number {
12130                 if(!isWasmInitialized) {
12131                         throw new Error("initializeWasm() must be awaited first!");
12132                 }
12133                 const nativeResponseValue = wasm.NetAddress_ipv6(encodeArray(addr), port);
12134                 return nativeResponseValue;
12135         }
12136         // struct LDKNetAddress NetAddress_onion_v2(struct LDKTenBytes addr, uint16_t port);
12137         export function NetAddress_onion_v2(addr: Uint8Array, port: number): number {
12138                 if(!isWasmInitialized) {
12139                         throw new Error("initializeWasm() must be awaited first!");
12140                 }
12141                 const nativeResponseValue = wasm.NetAddress_onion_v2(encodeArray(addr), port);
12142                 return nativeResponseValue;
12143         }
12144         // struct LDKNetAddress NetAddress_onion_v3(struct LDKThirtyTwoBytes ed25519_pubkey, uint16_t checksum, uint8_t version, uint16_t port);
12145         export function NetAddress_onion_v3(ed25519_pubkey: Uint8Array, checksum: number, version: number, port: number): number {
12146                 if(!isWasmInitialized) {
12147                         throw new Error("initializeWasm() must be awaited first!");
12148                 }
12149                 const nativeResponseValue = wasm.NetAddress_onion_v3(encodeArray(ed25519_pubkey), checksum, version, port);
12150                 return nativeResponseValue;
12151         }
12152         // struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj);
12153         export function NetAddress_write(obj: number): Uint8Array {
12154                 if(!isWasmInitialized) {
12155                         throw new Error("initializeWasm() must be awaited first!");
12156                 }
12157                 const nativeResponseValue = wasm.NetAddress_write(obj);
12158                 return decodeArray(nativeResponseValue);
12159         }
12160         // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
12161         export function Result_read(ser: Uint8Array): number {
12162                 if(!isWasmInitialized) {
12163                         throw new Error("initializeWasm() must be awaited first!");
12164                 }
12165                 const nativeResponseValue = wasm.Result_read(encodeArray(ser));
12166                 return nativeResponseValue;
12167         }
12168         // struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser);
12169         export function NetAddress_read(ser: Uint8Array): number {
12170                 if(!isWasmInitialized) {
12171                         throw new Error("initializeWasm() must be awaited first!");
12172                 }
12173                 const nativeResponseValue = wasm.NetAddress_read(encodeArray(ser));
12174                 return nativeResponseValue;
12175         }
12176         // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_obj);
12177         export function UnsignedNodeAnnouncement_free(this_obj: number): void {
12178                 if(!isWasmInitialized) {
12179                         throw new Error("initializeWasm() must be awaited first!");
12180                 }
12181                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_obj);
12182                 // debug statements here
12183         }
12184         // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
12185         export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
12186                 if(!isWasmInitialized) {
12187                         throw new Error("initializeWasm() must be awaited first!");
12188                 }
12189                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_features(this_ptr);
12190                 return nativeResponseValue;
12191         }
12192         // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
12193         export function UnsignedNodeAnnouncement_set_features(this_ptr: number, val: number): void {
12194                 if(!isWasmInitialized) {
12195                         throw new Error("initializeWasm() must be awaited first!");
12196                 }
12197                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_features(this_ptr, val);
12198                 // debug statements here
12199         }
12200         // uint32_t UnsignedNodeAnnouncement_get_timestamp(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
12201         export function UnsignedNodeAnnouncement_get_timestamp(this_ptr: number): number {
12202                 if(!isWasmInitialized) {
12203                         throw new Error("initializeWasm() must be awaited first!");
12204                 }
12205                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_timestamp(this_ptr);
12206                 return nativeResponseValue;
12207         }
12208         // void UnsignedNodeAnnouncement_set_timestamp(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, uint32_t val);
12209         export function UnsignedNodeAnnouncement_set_timestamp(this_ptr: number, val: number): void {
12210                 if(!isWasmInitialized) {
12211                         throw new Error("initializeWasm() must be awaited first!");
12212                 }
12213                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_timestamp(this_ptr, val);
12214                 // debug statements here
12215         }
12216         // struct LDKPublicKey UnsignedNodeAnnouncement_get_node_id(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
12217         export function UnsignedNodeAnnouncement_get_node_id(this_ptr: number): Uint8Array {
12218                 if(!isWasmInitialized) {
12219                         throw new Error("initializeWasm() must be awaited first!");
12220                 }
12221                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_node_id(this_ptr);
12222                 return decodeArray(nativeResponseValue);
12223         }
12224         // void UnsignedNodeAnnouncement_set_node_id(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12225         export function UnsignedNodeAnnouncement_set_node_id(this_ptr: number, val: Uint8Array): void {
12226                 if(!isWasmInitialized) {
12227                         throw new Error("initializeWasm() must be awaited first!");
12228                 }
12229                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_node_id(this_ptr, encodeArray(val));
12230                 // debug statements here
12231         }
12232         // const uint8_t (*UnsignedNodeAnnouncement_get_rgb(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[3];
12233         export function UnsignedNodeAnnouncement_get_rgb(this_ptr: number): Uint8Array {
12234                 if(!isWasmInitialized) {
12235                         throw new Error("initializeWasm() must be awaited first!");
12236                 }
12237                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_rgb(this_ptr);
12238                 return decodeArray(nativeResponseValue);
12239         }
12240         // void UnsignedNodeAnnouncement_set_rgb(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
12241         export function UnsignedNodeAnnouncement_set_rgb(this_ptr: number, val: Uint8Array): void {
12242                 if(!isWasmInitialized) {
12243                         throw new Error("initializeWasm() must be awaited first!");
12244                 }
12245                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_rgb(this_ptr, encodeArray(val));
12246                 // debug statements here
12247         }
12248         // const uint8_t (*UnsignedNodeAnnouncement_get_alias(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr))[32];
12249         export function UnsignedNodeAnnouncement_get_alias(this_ptr: number): Uint8Array {
12250                 if(!isWasmInitialized) {
12251                         throw new Error("initializeWasm() must be awaited first!");
12252                 }
12253                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_get_alias(this_ptr);
12254                 return decodeArray(nativeResponseValue);
12255         }
12256         // void UnsignedNodeAnnouncement_set_alias(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12257         export function UnsignedNodeAnnouncement_set_alias(this_ptr: number, val: Uint8Array): void {
12258                 if(!isWasmInitialized) {
12259                         throw new Error("initializeWasm() must be awaited first!");
12260                 }
12261                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_alias(this_ptr, encodeArray(val));
12262                 // debug statements here
12263         }
12264         // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
12265         export function UnsignedNodeAnnouncement_set_addresses(this_ptr: number, val: number[]): void {
12266                 if(!isWasmInitialized) {
12267                         throw new Error("initializeWasm() must be awaited first!");
12268                 }
12269                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
12270                 // debug statements here
12271         }
12272         // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
12273         export function UnsignedNodeAnnouncement_clone(orig: number): number {
12274                 if(!isWasmInitialized) {
12275                         throw new Error("initializeWasm() must be awaited first!");
12276                 }
12277                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
12278                 return nativeResponseValue;
12279         }
12280         // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_obj);
12281         export function NodeAnnouncement_free(this_obj: number): void {
12282                 if(!isWasmInitialized) {
12283                         throw new Error("initializeWasm() must be awaited first!");
12284                 }
12285                 const nativeResponseValue = wasm.NodeAnnouncement_free(this_obj);
12286                 // debug statements here
12287         }
12288         // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
12289         export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
12290                 if(!isWasmInitialized) {
12291                         throw new Error("initializeWasm() must be awaited first!");
12292                 }
12293                 const nativeResponseValue = wasm.NodeAnnouncement_get_signature(this_ptr);
12294                 return decodeArray(nativeResponseValue);
12295         }
12296         // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12297         export function NodeAnnouncement_set_signature(this_ptr: number, val: Uint8Array): void {
12298                 if(!isWasmInitialized) {
12299                         throw new Error("initializeWasm() must be awaited first!");
12300                 }
12301                 const nativeResponseValue = wasm.NodeAnnouncement_set_signature(this_ptr, encodeArray(val));
12302                 // debug statements here
12303         }
12304         // struct LDKUnsignedNodeAnnouncement NodeAnnouncement_get_contents(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
12305         export function NodeAnnouncement_get_contents(this_ptr: number): number {
12306                 if(!isWasmInitialized) {
12307                         throw new Error("initializeWasm() must be awaited first!");
12308                 }
12309                 const nativeResponseValue = wasm.NodeAnnouncement_get_contents(this_ptr);
12310                 return nativeResponseValue;
12311         }
12312         // void NodeAnnouncement_set_contents(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedNodeAnnouncement val);
12313         export function NodeAnnouncement_set_contents(this_ptr: number, val: number): void {
12314                 if(!isWasmInitialized) {
12315                         throw new Error("initializeWasm() must be awaited first!");
12316                 }
12317                 const nativeResponseValue = wasm.NodeAnnouncement_set_contents(this_ptr, val);
12318                 // debug statements here
12319         }
12320         // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
12321         export function NodeAnnouncement_new(signature_arg: Uint8Array, contents_arg: number): number {
12322                 if(!isWasmInitialized) {
12323                         throw new Error("initializeWasm() must be awaited first!");
12324                 }
12325                 const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
12326                 return nativeResponseValue;
12327         }
12328         // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
12329         export function NodeAnnouncement_clone(orig: number): number {
12330                 if(!isWasmInitialized) {
12331                         throw new Error("initializeWasm() must be awaited first!");
12332                 }
12333                 const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
12334                 return nativeResponseValue;
12335         }
12336         // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_obj);
12337         export function UnsignedChannelAnnouncement_free(this_obj: number): void {
12338                 if(!isWasmInitialized) {
12339                         throw new Error("initializeWasm() must be awaited first!");
12340                 }
12341                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_obj);
12342                 // debug statements here
12343         }
12344         // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12345         export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
12346                 if(!isWasmInitialized) {
12347                         throw new Error("initializeWasm() must be awaited first!");
12348                 }
12349                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_features(this_ptr);
12350                 return nativeResponseValue;
12351         }
12352         // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
12353         export function UnsignedChannelAnnouncement_set_features(this_ptr: number, val: number): void {
12354                 if(!isWasmInitialized) {
12355                         throw new Error("initializeWasm() must be awaited first!");
12356                 }
12357                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_features(this_ptr, val);
12358                 // debug statements here
12359         }
12360         // const uint8_t (*UnsignedChannelAnnouncement_get_chain_hash(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr))[32];
12361         export function UnsignedChannelAnnouncement_get_chain_hash(this_ptr: number): Uint8Array {
12362                 if(!isWasmInitialized) {
12363                         throw new Error("initializeWasm() must be awaited first!");
12364                 }
12365                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_chain_hash(this_ptr);
12366                 return decodeArray(nativeResponseValue);
12367         }
12368         // void UnsignedChannelAnnouncement_set_chain_hash(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12369         export function UnsignedChannelAnnouncement_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12370                 if(!isWasmInitialized) {
12371                         throw new Error("initializeWasm() must be awaited first!");
12372                 }
12373                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_chain_hash(this_ptr, encodeArray(val));
12374                 // debug statements here
12375         }
12376         // uint64_t UnsignedChannelAnnouncement_get_short_channel_id(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12377         export function UnsignedChannelAnnouncement_get_short_channel_id(this_ptr: number): number {
12378                 if(!isWasmInitialized) {
12379                         throw new Error("initializeWasm() must be awaited first!");
12380                 }
12381                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_short_channel_id(this_ptr);
12382                 return nativeResponseValue;
12383         }
12384         // void UnsignedChannelAnnouncement_set_short_channel_id(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, uint64_t val);
12385         export function UnsignedChannelAnnouncement_set_short_channel_id(this_ptr: number, val: number): void {
12386                 if(!isWasmInitialized) {
12387                         throw new Error("initializeWasm() must be awaited first!");
12388                 }
12389                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_short_channel_id(this_ptr, val);
12390                 // debug statements here
12391         }
12392         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12393         export function UnsignedChannelAnnouncement_get_node_id_1(this_ptr: number): Uint8Array {
12394                 if(!isWasmInitialized) {
12395                         throw new Error("initializeWasm() must be awaited first!");
12396                 }
12397                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_1(this_ptr);
12398                 return decodeArray(nativeResponseValue);
12399         }
12400         // void UnsignedChannelAnnouncement_set_node_id_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12401         export function UnsignedChannelAnnouncement_set_node_id_1(this_ptr: number, val: Uint8Array): void {
12402                 if(!isWasmInitialized) {
12403                         throw new Error("initializeWasm() must be awaited first!");
12404                 }
12405                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_1(this_ptr, encodeArray(val));
12406                 // debug statements here
12407         }
12408         // struct LDKPublicKey UnsignedChannelAnnouncement_get_node_id_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12409         export function UnsignedChannelAnnouncement_get_node_id_2(this_ptr: number): Uint8Array {
12410                 if(!isWasmInitialized) {
12411                         throw new Error("initializeWasm() must be awaited first!");
12412                 }
12413                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_node_id_2(this_ptr);
12414                 return decodeArray(nativeResponseValue);
12415         }
12416         // void UnsignedChannelAnnouncement_set_node_id_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12417         export function UnsignedChannelAnnouncement_set_node_id_2(this_ptr: number, val: Uint8Array): void {
12418                 if(!isWasmInitialized) {
12419                         throw new Error("initializeWasm() must be awaited first!");
12420                 }
12421                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_node_id_2(this_ptr, encodeArray(val));
12422                 // debug statements here
12423         }
12424         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_1(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12425         export function UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr: number): Uint8Array {
12426                 if(!isWasmInitialized) {
12427                         throw new Error("initializeWasm() must be awaited first!");
12428                 }
12429                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptr);
12430                 return decodeArray(nativeResponseValue);
12431         }
12432         // void UnsignedChannelAnnouncement_set_bitcoin_key_1(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12433         export function UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr: number, val: Uint8Array): void {
12434                 if(!isWasmInitialized) {
12435                         throw new Error("initializeWasm() must be awaited first!");
12436                 }
12437                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptr, encodeArray(val));
12438                 // debug statements here
12439         }
12440         // struct LDKPublicKey UnsignedChannelAnnouncement_get_bitcoin_key_2(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
12441         export function UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr: number): Uint8Array {
12442                 if(!isWasmInitialized) {
12443                         throw new Error("initializeWasm() must be awaited first!");
12444                 }
12445                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptr);
12446                 return decodeArray(nativeResponseValue);
12447         }
12448         // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
12449         export function UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr: number, val: Uint8Array): void {
12450                 if(!isWasmInitialized) {
12451                         throw new Error("initializeWasm() must be awaited first!");
12452                 }
12453                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
12454                 // debug statements here
12455         }
12456         // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
12457         export function UnsignedChannelAnnouncement_clone(orig: number): number {
12458                 if(!isWasmInitialized) {
12459                         throw new Error("initializeWasm() must be awaited first!");
12460                 }
12461                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
12462                 return nativeResponseValue;
12463         }
12464         // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_obj);
12465         export function ChannelAnnouncement_free(this_obj: number): void {
12466                 if(!isWasmInitialized) {
12467                         throw new Error("initializeWasm() must be awaited first!");
12468                 }
12469                 const nativeResponseValue = wasm.ChannelAnnouncement_free(this_obj);
12470                 // debug statements here
12471         }
12472         // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12473         export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
12474                 if(!isWasmInitialized) {
12475                         throw new Error("initializeWasm() must be awaited first!");
12476                 }
12477                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_1(this_ptr);
12478                 return decodeArray(nativeResponseValue);
12479         }
12480         // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12481         export function ChannelAnnouncement_set_node_signature_1(this_ptr: number, val: Uint8Array): void {
12482                 if(!isWasmInitialized) {
12483                         throw new Error("initializeWasm() must be awaited first!");
12484                 }
12485                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_1(this_ptr, encodeArray(val));
12486                 // debug statements here
12487         }
12488         // struct LDKSignature ChannelAnnouncement_get_node_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12489         export function ChannelAnnouncement_get_node_signature_2(this_ptr: number): Uint8Array {
12490                 if(!isWasmInitialized) {
12491                         throw new Error("initializeWasm() must be awaited first!");
12492                 }
12493                 const nativeResponseValue = wasm.ChannelAnnouncement_get_node_signature_2(this_ptr);
12494                 return decodeArray(nativeResponseValue);
12495         }
12496         // void ChannelAnnouncement_set_node_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12497         export function ChannelAnnouncement_set_node_signature_2(this_ptr: number, val: Uint8Array): void {
12498                 if(!isWasmInitialized) {
12499                         throw new Error("initializeWasm() must be awaited first!");
12500                 }
12501                 const nativeResponseValue = wasm.ChannelAnnouncement_set_node_signature_2(this_ptr, encodeArray(val));
12502                 // debug statements here
12503         }
12504         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12505         export function ChannelAnnouncement_get_bitcoin_signature_1(this_ptr: number): Uint8Array {
12506                 if(!isWasmInitialized) {
12507                         throw new Error("initializeWasm() must be awaited first!");
12508                 }
12509                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_1(this_ptr);
12510                 return decodeArray(nativeResponseValue);
12511         }
12512         // void ChannelAnnouncement_set_bitcoin_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12513         export function ChannelAnnouncement_set_bitcoin_signature_1(this_ptr: number, val: Uint8Array): void {
12514                 if(!isWasmInitialized) {
12515                         throw new Error("initializeWasm() must be awaited first!");
12516                 }
12517                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_1(this_ptr, encodeArray(val));
12518                 // debug statements here
12519         }
12520         // struct LDKSignature ChannelAnnouncement_get_bitcoin_signature_2(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12521         export function ChannelAnnouncement_get_bitcoin_signature_2(this_ptr: number): Uint8Array {
12522                 if(!isWasmInitialized) {
12523                         throw new Error("initializeWasm() must be awaited first!");
12524                 }
12525                 const nativeResponseValue = wasm.ChannelAnnouncement_get_bitcoin_signature_2(this_ptr);
12526                 return decodeArray(nativeResponseValue);
12527         }
12528         // void ChannelAnnouncement_set_bitcoin_signature_2(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
12529         export function ChannelAnnouncement_set_bitcoin_signature_2(this_ptr: number, val: Uint8Array): void {
12530                 if(!isWasmInitialized) {
12531                         throw new Error("initializeWasm() must be awaited first!");
12532                 }
12533                 const nativeResponseValue = wasm.ChannelAnnouncement_set_bitcoin_signature_2(this_ptr, encodeArray(val));
12534                 // debug statements here
12535         }
12536         // struct LDKUnsignedChannelAnnouncement ChannelAnnouncement_get_contents(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
12537         export function ChannelAnnouncement_get_contents(this_ptr: number): number {
12538                 if(!isWasmInitialized) {
12539                         throw new Error("initializeWasm() must be awaited first!");
12540                 }
12541                 const nativeResponseValue = wasm.ChannelAnnouncement_get_contents(this_ptr);
12542                 return nativeResponseValue;
12543         }
12544         // void ChannelAnnouncement_set_contents(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKUnsignedChannelAnnouncement val);
12545         export function ChannelAnnouncement_set_contents(this_ptr: number, val: number): void {
12546                 if(!isWasmInitialized) {
12547                         throw new Error("initializeWasm() must be awaited first!");
12548                 }
12549                 const nativeResponseValue = wasm.ChannelAnnouncement_set_contents(this_ptr, val);
12550                 // debug statements here
12551         }
12552         // 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);
12553         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 {
12554                 if(!isWasmInitialized) {
12555                         throw new Error("initializeWasm() must be awaited first!");
12556                 }
12557                 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);
12558                 return nativeResponseValue;
12559         }
12560         // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
12561         export function ChannelAnnouncement_clone(orig: number): number {
12562                 if(!isWasmInitialized) {
12563                         throw new Error("initializeWasm() must be awaited first!");
12564                 }
12565                 const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
12566                 return nativeResponseValue;
12567         }
12568         // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_obj);
12569         export function UnsignedChannelUpdate_free(this_obj: number): void {
12570                 if(!isWasmInitialized) {
12571                         throw new Error("initializeWasm() must be awaited first!");
12572                 }
12573                 const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_obj);
12574                 // debug statements here
12575         }
12576         // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
12577         export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
12578                 if(!isWasmInitialized) {
12579                         throw new Error("initializeWasm() must be awaited first!");
12580                 }
12581                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_chain_hash(this_ptr);
12582                 return decodeArray(nativeResponseValue);
12583         }
12584         // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12585         export function UnsignedChannelUpdate_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12586                 if(!isWasmInitialized) {
12587                         throw new Error("initializeWasm() must be awaited first!");
12588                 }
12589                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_chain_hash(this_ptr, encodeArray(val));
12590                 // debug statements here
12591         }
12592         // uint64_t UnsignedChannelUpdate_get_short_channel_id(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12593         export function UnsignedChannelUpdate_get_short_channel_id(this_ptr: number): number {
12594                 if(!isWasmInitialized) {
12595                         throw new Error("initializeWasm() must be awaited first!");
12596                 }
12597                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_short_channel_id(this_ptr);
12598                 return nativeResponseValue;
12599         }
12600         // void UnsignedChannelUpdate_set_short_channel_id(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
12601         export function UnsignedChannelUpdate_set_short_channel_id(this_ptr: number, val: number): void {
12602                 if(!isWasmInitialized) {
12603                         throw new Error("initializeWasm() must be awaited first!");
12604                 }
12605                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_short_channel_id(this_ptr, val);
12606                 // debug statements here
12607         }
12608         // uint32_t UnsignedChannelUpdate_get_timestamp(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12609         export function UnsignedChannelUpdate_get_timestamp(this_ptr: number): number {
12610                 if(!isWasmInitialized) {
12611                         throw new Error("initializeWasm() must be awaited first!");
12612                 }
12613                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_timestamp(this_ptr);
12614                 return nativeResponseValue;
12615         }
12616         // void UnsignedChannelUpdate_set_timestamp(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
12617         export function UnsignedChannelUpdate_set_timestamp(this_ptr: number, val: number): void {
12618                 if(!isWasmInitialized) {
12619                         throw new Error("initializeWasm() must be awaited first!");
12620                 }
12621                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_timestamp(this_ptr, val);
12622                 // debug statements here
12623         }
12624         // uint8_t UnsignedChannelUpdate_get_flags(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12625         export function UnsignedChannelUpdate_get_flags(this_ptr: number): number {
12626                 if(!isWasmInitialized) {
12627                         throw new Error("initializeWasm() must be awaited first!");
12628                 }
12629                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_flags(this_ptr);
12630                 return nativeResponseValue;
12631         }
12632         // void UnsignedChannelUpdate_set_flags(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint8_t val);
12633         export function UnsignedChannelUpdate_set_flags(this_ptr: number, val: number): void {
12634                 if(!isWasmInitialized) {
12635                         throw new Error("initializeWasm() must be awaited first!");
12636                 }
12637                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_flags(this_ptr, val);
12638                 // debug statements here
12639         }
12640         // uint16_t UnsignedChannelUpdate_get_cltv_expiry_delta(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12641         export function UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr: number): number {
12642                 if(!isWasmInitialized) {
12643                         throw new Error("initializeWasm() must be awaited first!");
12644                 }
12645                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_cltv_expiry_delta(this_ptr);
12646                 return nativeResponseValue;
12647         }
12648         // void UnsignedChannelUpdate_set_cltv_expiry_delta(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint16_t val);
12649         export function UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr: number, val: number): void {
12650                 if(!isWasmInitialized) {
12651                         throw new Error("initializeWasm() must be awaited first!");
12652                 }
12653                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_cltv_expiry_delta(this_ptr, val);
12654                 // debug statements here
12655         }
12656         // uint64_t UnsignedChannelUpdate_get_htlc_minimum_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12657         export function UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr: number): number {
12658                 if(!isWasmInitialized) {
12659                         throw new Error("initializeWasm() must be awaited first!");
12660                 }
12661                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_htlc_minimum_msat(this_ptr);
12662                 return nativeResponseValue;
12663         }
12664         // void UnsignedChannelUpdate_set_htlc_minimum_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint64_t val);
12665         export function UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr: number, val: number): void {
12666                 if(!isWasmInitialized) {
12667                         throw new Error("initializeWasm() must be awaited first!");
12668                 }
12669                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_htlc_minimum_msat(this_ptr, val);
12670                 // debug statements here
12671         }
12672         // uint32_t UnsignedChannelUpdate_get_fee_base_msat(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12673         export function UnsignedChannelUpdate_get_fee_base_msat(this_ptr: number): number {
12674                 if(!isWasmInitialized) {
12675                         throw new Error("initializeWasm() must be awaited first!");
12676                 }
12677                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_base_msat(this_ptr);
12678                 return nativeResponseValue;
12679         }
12680         // void UnsignedChannelUpdate_set_fee_base_msat(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
12681         export function UnsignedChannelUpdate_set_fee_base_msat(this_ptr: number, val: number): void {
12682                 if(!isWasmInitialized) {
12683                         throw new Error("initializeWasm() must be awaited first!");
12684                 }
12685                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_base_msat(this_ptr, val);
12686                 // debug statements here
12687         }
12688         // uint32_t UnsignedChannelUpdate_get_fee_proportional_millionths(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr);
12689         export function UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr: number): number {
12690                 if(!isWasmInitialized) {
12691                         throw new Error("initializeWasm() must be awaited first!");
12692                 }
12693                 const nativeResponseValue = wasm.UnsignedChannelUpdate_get_fee_proportional_millionths(this_ptr);
12694                 return nativeResponseValue;
12695         }
12696         // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
12697         export function UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr: number, val: number): void {
12698                 if(!isWasmInitialized) {
12699                         throw new Error("initializeWasm() must be awaited first!");
12700                 }
12701                 const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
12702                 // debug statements here
12703         }
12704         // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
12705         export function UnsignedChannelUpdate_clone(orig: number): number {
12706                 if(!isWasmInitialized) {
12707                         throw new Error("initializeWasm() must be awaited first!");
12708                 }
12709                 const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
12710                 return nativeResponseValue;
12711         }
12712         // void ChannelUpdate_free(struct LDKChannelUpdate this_obj);
12713         export function ChannelUpdate_free(this_obj: number): void {
12714                 if(!isWasmInitialized) {
12715                         throw new Error("initializeWasm() must be awaited first!");
12716                 }
12717                 const nativeResponseValue = wasm.ChannelUpdate_free(this_obj);
12718                 // debug statements here
12719         }
12720         // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
12721         export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
12722                 if(!isWasmInitialized) {
12723                         throw new Error("initializeWasm() must be awaited first!");
12724                 }
12725                 const nativeResponseValue = wasm.ChannelUpdate_get_signature(this_ptr);
12726                 return decodeArray(nativeResponseValue);
12727         }
12728         // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
12729         export function ChannelUpdate_set_signature(this_ptr: number, val: Uint8Array): void {
12730                 if(!isWasmInitialized) {
12731                         throw new Error("initializeWasm() must be awaited first!");
12732                 }
12733                 const nativeResponseValue = wasm.ChannelUpdate_set_signature(this_ptr, encodeArray(val));
12734                 // debug statements here
12735         }
12736         // struct LDKUnsignedChannelUpdate ChannelUpdate_get_contents(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
12737         export function ChannelUpdate_get_contents(this_ptr: number): number {
12738                 if(!isWasmInitialized) {
12739                         throw new Error("initializeWasm() must be awaited first!");
12740                 }
12741                 const nativeResponseValue = wasm.ChannelUpdate_get_contents(this_ptr);
12742                 return nativeResponseValue;
12743         }
12744         // void ChannelUpdate_set_contents(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKUnsignedChannelUpdate val);
12745         export function ChannelUpdate_set_contents(this_ptr: number, val: number): void {
12746                 if(!isWasmInitialized) {
12747                         throw new Error("initializeWasm() must be awaited first!");
12748                 }
12749                 const nativeResponseValue = wasm.ChannelUpdate_set_contents(this_ptr, val);
12750                 // debug statements here
12751         }
12752         // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
12753         export function ChannelUpdate_new(signature_arg: Uint8Array, contents_arg: number): number {
12754                 if(!isWasmInitialized) {
12755                         throw new Error("initializeWasm() must be awaited first!");
12756                 }
12757                 const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
12758                 return nativeResponseValue;
12759         }
12760         // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
12761         export function ChannelUpdate_clone(orig: number): number {
12762                 if(!isWasmInitialized) {
12763                         throw new Error("initializeWasm() must be awaited first!");
12764                 }
12765                 const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
12766                 return nativeResponseValue;
12767         }
12768         // void QueryChannelRange_free(struct LDKQueryChannelRange this_obj);
12769         export function QueryChannelRange_free(this_obj: number): void {
12770                 if(!isWasmInitialized) {
12771                         throw new Error("initializeWasm() must be awaited first!");
12772                 }
12773                 const nativeResponseValue = wasm.QueryChannelRange_free(this_obj);
12774                 // debug statements here
12775         }
12776         // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
12777         export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
12778                 if(!isWasmInitialized) {
12779                         throw new Error("initializeWasm() must be awaited first!");
12780                 }
12781                 const nativeResponseValue = wasm.QueryChannelRange_get_chain_hash(this_ptr);
12782                 return decodeArray(nativeResponseValue);
12783         }
12784         // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12785         export function QueryChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12786                 if(!isWasmInitialized) {
12787                         throw new Error("initializeWasm() must be awaited first!");
12788                 }
12789                 const nativeResponseValue = wasm.QueryChannelRange_set_chain_hash(this_ptr, encodeArray(val));
12790                 // debug statements here
12791         }
12792         // uint32_t QueryChannelRange_get_first_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
12793         export function QueryChannelRange_get_first_blocknum(this_ptr: number): number {
12794                 if(!isWasmInitialized) {
12795                         throw new Error("initializeWasm() must be awaited first!");
12796                 }
12797                 const nativeResponseValue = wasm.QueryChannelRange_get_first_blocknum(this_ptr);
12798                 return nativeResponseValue;
12799         }
12800         // void QueryChannelRange_set_first_blocknum(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
12801         export function QueryChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
12802                 if(!isWasmInitialized) {
12803                         throw new Error("initializeWasm() must be awaited first!");
12804                 }
12805                 const nativeResponseValue = wasm.QueryChannelRange_set_first_blocknum(this_ptr, val);
12806                 // debug statements here
12807         }
12808         // uint32_t QueryChannelRange_get_number_of_blocks(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr);
12809         export function QueryChannelRange_get_number_of_blocks(this_ptr: number): number {
12810                 if(!isWasmInitialized) {
12811                         throw new Error("initializeWasm() must be awaited first!");
12812                 }
12813                 const nativeResponseValue = wasm.QueryChannelRange_get_number_of_blocks(this_ptr);
12814                 return nativeResponseValue;
12815         }
12816         // void QueryChannelRange_set_number_of_blocks(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, uint32_t val);
12817         export function QueryChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
12818                 if(!isWasmInitialized) {
12819                         throw new Error("initializeWasm() must be awaited first!");
12820                 }
12821                 const nativeResponseValue = wasm.QueryChannelRange_set_number_of_blocks(this_ptr, val);
12822                 // debug statements here
12823         }
12824         // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
12825         export function QueryChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number): number {
12826                 if(!isWasmInitialized) {
12827                         throw new Error("initializeWasm() must be awaited first!");
12828                 }
12829                 const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
12830                 return nativeResponseValue;
12831         }
12832         // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
12833         export function QueryChannelRange_clone(orig: number): number {
12834                 if(!isWasmInitialized) {
12835                         throw new Error("initializeWasm() must be awaited first!");
12836                 }
12837                 const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
12838                 return nativeResponseValue;
12839         }
12840         // void ReplyChannelRange_free(struct LDKReplyChannelRange this_obj);
12841         export function ReplyChannelRange_free(this_obj: number): void {
12842                 if(!isWasmInitialized) {
12843                         throw new Error("initializeWasm() must be awaited first!");
12844                 }
12845                 const nativeResponseValue = wasm.ReplyChannelRange_free(this_obj);
12846                 // debug statements here
12847         }
12848         // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
12849         export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
12850                 if(!isWasmInitialized) {
12851                         throw new Error("initializeWasm() must be awaited first!");
12852                 }
12853                 const nativeResponseValue = wasm.ReplyChannelRange_get_chain_hash(this_ptr);
12854                 return decodeArray(nativeResponseValue);
12855         }
12856         // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12857         export function ReplyChannelRange_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12858                 if(!isWasmInitialized) {
12859                         throw new Error("initializeWasm() must be awaited first!");
12860                 }
12861                 const nativeResponseValue = wasm.ReplyChannelRange_set_chain_hash(this_ptr, encodeArray(val));
12862                 // debug statements here
12863         }
12864         // uint32_t ReplyChannelRange_get_first_blocknum(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
12865         export function ReplyChannelRange_get_first_blocknum(this_ptr: number): number {
12866                 if(!isWasmInitialized) {
12867                         throw new Error("initializeWasm() must be awaited first!");
12868                 }
12869                 const nativeResponseValue = wasm.ReplyChannelRange_get_first_blocknum(this_ptr);
12870                 return nativeResponseValue;
12871         }
12872         // void ReplyChannelRange_set_first_blocknum(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
12873         export function ReplyChannelRange_set_first_blocknum(this_ptr: number, val: number): void {
12874                 if(!isWasmInitialized) {
12875                         throw new Error("initializeWasm() must be awaited first!");
12876                 }
12877                 const nativeResponseValue = wasm.ReplyChannelRange_set_first_blocknum(this_ptr, val);
12878                 // debug statements here
12879         }
12880         // uint32_t ReplyChannelRange_get_number_of_blocks(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
12881         export function ReplyChannelRange_get_number_of_blocks(this_ptr: number): number {
12882                 if(!isWasmInitialized) {
12883                         throw new Error("initializeWasm() must be awaited first!");
12884                 }
12885                 const nativeResponseValue = wasm.ReplyChannelRange_get_number_of_blocks(this_ptr);
12886                 return nativeResponseValue;
12887         }
12888         // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
12889         export function ReplyChannelRange_set_number_of_blocks(this_ptr: number, val: number): void {
12890                 if(!isWasmInitialized) {
12891                         throw new Error("initializeWasm() must be awaited first!");
12892                 }
12893                 const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
12894                 // debug statements here
12895         }
12896         // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
12897         export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
12898                 if(!isWasmInitialized) {
12899                         throw new Error("initializeWasm() must be awaited first!");
12900                 }
12901                 const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
12902                 return nativeResponseValue;
12903         }
12904         // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
12905         export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
12906                 if(!isWasmInitialized) {
12907                         throw new Error("initializeWasm() must be awaited first!");
12908                 }
12909                 const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
12910                 // debug statements here
12911         }
12912         // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
12913         export function ReplyChannelRange_set_short_channel_ids(this_ptr: number, val: number[]): void {
12914                 if(!isWasmInitialized) {
12915                         throw new Error("initializeWasm() must be awaited first!");
12916                 }
12917                 const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
12918                 // debug statements here
12919         }
12920         // 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);
12921         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 {
12922                 if(!isWasmInitialized) {
12923                         throw new Error("initializeWasm() must be awaited first!");
12924                 }
12925                 const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
12926                 return nativeResponseValue;
12927         }
12928         // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
12929         export function ReplyChannelRange_clone(orig: number): number {
12930                 if(!isWasmInitialized) {
12931                         throw new Error("initializeWasm() must be awaited first!");
12932                 }
12933                 const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
12934                 return nativeResponseValue;
12935         }
12936         // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_obj);
12937         export function QueryShortChannelIds_free(this_obj: number): void {
12938                 if(!isWasmInitialized) {
12939                         throw new Error("initializeWasm() must be awaited first!");
12940                 }
12941                 const nativeResponseValue = wasm.QueryShortChannelIds_free(this_obj);
12942                 // debug statements here
12943         }
12944         // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
12945         export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
12946                 if(!isWasmInitialized) {
12947                         throw new Error("initializeWasm() must be awaited first!");
12948                 }
12949                 const nativeResponseValue = wasm.QueryShortChannelIds_get_chain_hash(this_ptr);
12950                 return decodeArray(nativeResponseValue);
12951         }
12952         // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
12953         export function QueryShortChannelIds_set_chain_hash(this_ptr: number, val: Uint8Array): void {
12954                 if(!isWasmInitialized) {
12955                         throw new Error("initializeWasm() must be awaited first!");
12956                 }
12957                 const nativeResponseValue = wasm.QueryShortChannelIds_set_chain_hash(this_ptr, encodeArray(val));
12958                 // debug statements here
12959         }
12960         // void QueryShortChannelIds_set_short_channel_ids(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
12961         export function QueryShortChannelIds_set_short_channel_ids(this_ptr: number, val: number[]): void {
12962                 if(!isWasmInitialized) {
12963                         throw new Error("initializeWasm() must be awaited first!");
12964                 }
12965                 const nativeResponseValue = wasm.QueryShortChannelIds_set_short_channel_ids(this_ptr, val);
12966                 // debug statements here
12967         }
12968         // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
12969         export function QueryShortChannelIds_new(chain_hash_arg: Uint8Array, short_channel_ids_arg: number[]): number {
12970                 if(!isWasmInitialized) {
12971                         throw new Error("initializeWasm() must be awaited first!");
12972                 }
12973                 const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
12974                 return nativeResponseValue;
12975         }
12976         // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
12977         export function QueryShortChannelIds_clone(orig: number): number {
12978                 if(!isWasmInitialized) {
12979                         throw new Error("initializeWasm() must be awaited first!");
12980                 }
12981                 const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
12982                 return nativeResponseValue;
12983         }
12984         // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_obj);
12985         export function ReplyShortChannelIdsEnd_free(this_obj: number): void {
12986                 if(!isWasmInitialized) {
12987                         throw new Error("initializeWasm() must be awaited first!");
12988                 }
12989                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_obj);
12990                 // debug statements here
12991         }
12992         // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
12993         export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
12994                 if(!isWasmInitialized) {
12995                         throw new Error("initializeWasm() must be awaited first!");
12996                 }
12997                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_chain_hash(this_ptr);
12998                 return decodeArray(nativeResponseValue);
12999         }
13000         // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13001         export function ReplyShortChannelIdsEnd_set_chain_hash(this_ptr: number, val: Uint8Array): void {
13002                 if(!isWasmInitialized) {
13003                         throw new Error("initializeWasm() must be awaited first!");
13004                 }
13005                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_chain_hash(this_ptr, encodeArray(val));
13006                 // debug statements here
13007         }
13008         // bool ReplyShortChannelIdsEnd_get_full_information(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr);
13009         export function ReplyShortChannelIdsEnd_get_full_information(this_ptr: number): boolean {
13010                 if(!isWasmInitialized) {
13011                         throw new Error("initializeWasm() must be awaited first!");
13012                 }
13013                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_get_full_information(this_ptr);
13014                 return nativeResponseValue;
13015         }
13016         // void ReplyShortChannelIdsEnd_set_full_information(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, bool val);
13017         export function ReplyShortChannelIdsEnd_set_full_information(this_ptr: number, val: boolean): void {
13018                 if(!isWasmInitialized) {
13019                         throw new Error("initializeWasm() must be awaited first!");
13020                 }
13021                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_set_full_information(this_ptr, val);
13022                 // debug statements here
13023         }
13024         // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
13025         export function ReplyShortChannelIdsEnd_new(chain_hash_arg: Uint8Array, full_information_arg: boolean): number {
13026                 if(!isWasmInitialized) {
13027                         throw new Error("initializeWasm() must be awaited first!");
13028                 }
13029                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
13030                 return nativeResponseValue;
13031         }
13032         // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
13033         export function ReplyShortChannelIdsEnd_clone(orig: number): number {
13034                 if(!isWasmInitialized) {
13035                         throw new Error("initializeWasm() must be awaited first!");
13036                 }
13037                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
13038                 return nativeResponseValue;
13039         }
13040         // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_obj);
13041         export function GossipTimestampFilter_free(this_obj: number): void {
13042                 if(!isWasmInitialized) {
13043                         throw new Error("initializeWasm() must be awaited first!");
13044                 }
13045                 const nativeResponseValue = wasm.GossipTimestampFilter_free(this_obj);
13046                 // debug statements here
13047         }
13048         // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
13049         export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
13050                 if(!isWasmInitialized) {
13051                         throw new Error("initializeWasm() must be awaited first!");
13052                 }
13053                 const nativeResponseValue = wasm.GossipTimestampFilter_get_chain_hash(this_ptr);
13054                 return decodeArray(nativeResponseValue);
13055         }
13056         // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
13057         export function GossipTimestampFilter_set_chain_hash(this_ptr: number, val: Uint8Array): void {
13058                 if(!isWasmInitialized) {
13059                         throw new Error("initializeWasm() must be awaited first!");
13060                 }
13061                 const nativeResponseValue = wasm.GossipTimestampFilter_set_chain_hash(this_ptr, encodeArray(val));
13062                 // debug statements here
13063         }
13064         // uint32_t GossipTimestampFilter_get_first_timestamp(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
13065         export function GossipTimestampFilter_get_first_timestamp(this_ptr: number): number {
13066                 if(!isWasmInitialized) {
13067                         throw new Error("initializeWasm() must be awaited first!");
13068                 }
13069                 const nativeResponseValue = wasm.GossipTimestampFilter_get_first_timestamp(this_ptr);
13070                 return nativeResponseValue;
13071         }
13072         // void GossipTimestampFilter_set_first_timestamp(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
13073         export function GossipTimestampFilter_set_first_timestamp(this_ptr: number, val: number): void {
13074                 if(!isWasmInitialized) {
13075                         throw new Error("initializeWasm() must be awaited first!");
13076                 }
13077                 const nativeResponseValue = wasm.GossipTimestampFilter_set_first_timestamp(this_ptr, val);
13078                 // debug statements here
13079         }
13080         // uint32_t GossipTimestampFilter_get_timestamp_range(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr);
13081         export function GossipTimestampFilter_get_timestamp_range(this_ptr: number): number {
13082                 if(!isWasmInitialized) {
13083                         throw new Error("initializeWasm() must be awaited first!");
13084                 }
13085                 const nativeResponseValue = wasm.GossipTimestampFilter_get_timestamp_range(this_ptr);
13086                 return nativeResponseValue;
13087         }
13088         // void GossipTimestampFilter_set_timestamp_range(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, uint32_t val);
13089         export function GossipTimestampFilter_set_timestamp_range(this_ptr: number, val: number): void {
13090                 if(!isWasmInitialized) {
13091                         throw new Error("initializeWasm() must be awaited first!");
13092                 }
13093                 const nativeResponseValue = wasm.GossipTimestampFilter_set_timestamp_range(this_ptr, val);
13094                 // debug statements here
13095         }
13096         // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
13097         export function GossipTimestampFilter_new(chain_hash_arg: Uint8Array, first_timestamp_arg: number, timestamp_range_arg: number): number {
13098                 if(!isWasmInitialized) {
13099                         throw new Error("initializeWasm() must be awaited first!");
13100                 }
13101                 const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
13102                 return nativeResponseValue;
13103         }
13104         // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
13105         export function GossipTimestampFilter_clone(orig: number): number {
13106                 if(!isWasmInitialized) {
13107                         throw new Error("initializeWasm() must be awaited first!");
13108                 }
13109                 const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
13110                 return nativeResponseValue;
13111         }
13112         // void ErrorAction_free(struct LDKErrorAction this_ptr);
13113         export function ErrorAction_free(this_ptr: number): void {
13114                 if(!isWasmInitialized) {
13115                         throw new Error("initializeWasm() must be awaited first!");
13116                 }
13117                 const nativeResponseValue = wasm.ErrorAction_free(this_ptr);
13118                 // debug statements here
13119         }
13120         // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
13121         export function ErrorAction_clone(orig: number): number {
13122                 if(!isWasmInitialized) {
13123                         throw new Error("initializeWasm() must be awaited first!");
13124                 }
13125                 const nativeResponseValue = wasm.ErrorAction_clone(orig);
13126                 return nativeResponseValue;
13127         }
13128         // struct LDKErrorAction ErrorAction_disconnect_peer(struct LDKErrorMessage msg);
13129         export function ErrorAction_disconnect_peer(msg: number): number {
13130                 if(!isWasmInitialized) {
13131                         throw new Error("initializeWasm() must be awaited first!");
13132                 }
13133                 const nativeResponseValue = wasm.ErrorAction_disconnect_peer(msg);
13134                 return nativeResponseValue;
13135         }
13136         // struct LDKErrorAction ErrorAction_ignore_error(void);
13137         export function ErrorAction_ignore_error(): number {
13138                 if(!isWasmInitialized) {
13139                         throw new Error("initializeWasm() must be awaited first!");
13140                 }
13141                 const nativeResponseValue = wasm.ErrorAction_ignore_error();
13142                 return nativeResponseValue;
13143         }
13144         // struct LDKErrorAction ErrorAction_ignore_and_log(enum LDKLevel a);
13145         export function ErrorAction_ignore_and_log(a: Level): number {
13146                 if(!isWasmInitialized) {
13147                         throw new Error("initializeWasm() must be awaited first!");
13148                 }
13149                 const nativeResponseValue = wasm.ErrorAction_ignore_and_log(a);
13150                 return nativeResponseValue;
13151         }
13152         // struct LDKErrorAction ErrorAction_send_error_message(struct LDKErrorMessage msg);
13153         export function ErrorAction_send_error_message(msg: number): number {
13154                 if(!isWasmInitialized) {
13155                         throw new Error("initializeWasm() must be awaited first!");
13156                 }
13157                 const nativeResponseValue = wasm.ErrorAction_send_error_message(msg);
13158                 return nativeResponseValue;
13159         }
13160         // void LightningError_free(struct LDKLightningError this_obj);
13161         export function LightningError_free(this_obj: number): void {
13162                 if(!isWasmInitialized) {
13163                         throw new Error("initializeWasm() must be awaited first!");
13164                 }
13165                 const nativeResponseValue = wasm.LightningError_free(this_obj);
13166                 // debug statements here
13167         }
13168         // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
13169         export function LightningError_get_err(this_ptr: number): String {
13170                 if(!isWasmInitialized) {
13171                         throw new Error("initializeWasm() must be awaited first!");
13172                 }
13173                 const nativeResponseValue = wasm.LightningError_get_err(this_ptr);
13174                 return nativeResponseValue;
13175         }
13176         // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKStr val);
13177         export function LightningError_set_err(this_ptr: number, val: String): void {
13178                 if(!isWasmInitialized) {
13179                         throw new Error("initializeWasm() must be awaited first!");
13180                 }
13181                 const nativeResponseValue = wasm.LightningError_set_err(this_ptr, val);
13182                 // debug statements here
13183         }
13184         // struct LDKErrorAction LightningError_get_action(const struct LDKLightningError *NONNULL_PTR this_ptr);
13185         export function LightningError_get_action(this_ptr: number): number {
13186                 if(!isWasmInitialized) {
13187                         throw new Error("initializeWasm() must be awaited first!");
13188                 }
13189                 const nativeResponseValue = wasm.LightningError_get_action(this_ptr);
13190                 return nativeResponseValue;
13191         }
13192         // void LightningError_set_action(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKErrorAction val);
13193         export function LightningError_set_action(this_ptr: number, val: number): void {
13194                 if(!isWasmInitialized) {
13195                         throw new Error("initializeWasm() must be awaited first!");
13196                 }
13197                 const nativeResponseValue = wasm.LightningError_set_action(this_ptr, val);
13198                 // debug statements here
13199         }
13200         // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKStr err_arg, struct LDKErrorAction action_arg);
13201         export function LightningError_new(err_arg: String, action_arg: number): number {
13202                 if(!isWasmInitialized) {
13203                         throw new Error("initializeWasm() must be awaited first!");
13204                 }
13205                 const nativeResponseValue = wasm.LightningError_new(err_arg, action_arg);
13206                 return nativeResponseValue;
13207         }
13208         // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
13209         export function LightningError_clone(orig: number): number {
13210                 if(!isWasmInitialized) {
13211                         throw new Error("initializeWasm() must be awaited first!");
13212                 }
13213                 const nativeResponseValue = wasm.LightningError_clone(orig);
13214                 return nativeResponseValue;
13215         }
13216         // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_obj);
13217         export function CommitmentUpdate_free(this_obj: number): void {
13218                 if(!isWasmInitialized) {
13219                         throw new Error("initializeWasm() must be awaited first!");
13220                 }
13221                 const nativeResponseValue = wasm.CommitmentUpdate_free(this_obj);
13222                 // debug statements here
13223         }
13224         // struct LDKCVec_UpdateAddHTLCZ CommitmentUpdate_get_update_add_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
13225         export function CommitmentUpdate_get_update_add_htlcs(this_ptr: number): number[] {
13226                 if(!isWasmInitialized) {
13227                         throw new Error("initializeWasm() must be awaited first!");
13228                 }
13229                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_add_htlcs(this_ptr);
13230                 return nativeResponseValue;
13231         }
13232         // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
13233         export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
13234                 if(!isWasmInitialized) {
13235                         throw new Error("initializeWasm() must be awaited first!");
13236                 }
13237                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_add_htlcs(this_ptr, val);
13238                 // debug statements here
13239         }
13240         // struct LDKCVec_UpdateFulfillHTLCZ CommitmentUpdate_get_update_fulfill_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
13241         export function CommitmentUpdate_get_update_fulfill_htlcs(this_ptr: number): number[] {
13242                 if(!isWasmInitialized) {
13243                         throw new Error("initializeWasm() must be awaited first!");
13244                 }
13245                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fulfill_htlcs(this_ptr);
13246                 return nativeResponseValue;
13247         }
13248         // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
13249         export function CommitmentUpdate_set_update_fulfill_htlcs(this_ptr: number, val: number[]): void {
13250                 if(!isWasmInitialized) {
13251                         throw new Error("initializeWasm() must be awaited first!");
13252                 }
13253                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fulfill_htlcs(this_ptr, val);
13254                 // debug statements here
13255         }
13256         // struct LDKCVec_UpdateFailHTLCZ CommitmentUpdate_get_update_fail_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
13257         export function CommitmentUpdate_get_update_fail_htlcs(this_ptr: number): number[] {
13258                 if(!isWasmInitialized) {
13259                         throw new Error("initializeWasm() must be awaited first!");
13260                 }
13261                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fail_htlcs(this_ptr);
13262                 return nativeResponseValue;
13263         }
13264         // void CommitmentUpdate_set_update_fail_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailHTLCZ val);
13265         export function CommitmentUpdate_set_update_fail_htlcs(this_ptr: number, val: number[]): void {
13266                 if(!isWasmInitialized) {
13267                         throw new Error("initializeWasm() must be awaited first!");
13268                 }
13269                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_htlcs(this_ptr, val);
13270                 // debug statements here
13271         }
13272         // struct LDKCVec_UpdateFailMalformedHTLCZ CommitmentUpdate_get_update_fail_malformed_htlcs(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
13273         export function CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr: number): number[] {
13274                 if(!isWasmInitialized) {
13275                         throw new Error("initializeWasm() must be awaited first!");
13276                 }
13277                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fail_malformed_htlcs(this_ptr);
13278                 return nativeResponseValue;
13279         }
13280         // void CommitmentUpdate_set_update_fail_malformed_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFailMalformedHTLCZ val);
13281         export function CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr: number, val: number[]): void {
13282                 if(!isWasmInitialized) {
13283                         throw new Error("initializeWasm() must be awaited first!");
13284                 }
13285                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fail_malformed_htlcs(this_ptr, val);
13286                 // debug statements here
13287         }
13288         // struct LDKUpdateFee CommitmentUpdate_get_update_fee(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
13289         export function CommitmentUpdate_get_update_fee(this_ptr: number): number {
13290                 if(!isWasmInitialized) {
13291                         throw new Error("initializeWasm() must be awaited first!");
13292                 }
13293                 const nativeResponseValue = wasm.CommitmentUpdate_get_update_fee(this_ptr);
13294                 return nativeResponseValue;
13295         }
13296         // void CommitmentUpdate_set_update_fee(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKUpdateFee val);
13297         export function CommitmentUpdate_set_update_fee(this_ptr: number, val: number): void {
13298                 if(!isWasmInitialized) {
13299                         throw new Error("initializeWasm() must be awaited first!");
13300                 }
13301                 const nativeResponseValue = wasm.CommitmentUpdate_set_update_fee(this_ptr, val);
13302                 // debug statements here
13303         }
13304         // struct LDKCommitmentSigned CommitmentUpdate_get_commitment_signed(const struct LDKCommitmentUpdate *NONNULL_PTR this_ptr);
13305         export function CommitmentUpdate_get_commitment_signed(this_ptr: number): number {
13306                 if(!isWasmInitialized) {
13307                         throw new Error("initializeWasm() must be awaited first!");
13308                 }
13309                 const nativeResponseValue = wasm.CommitmentUpdate_get_commitment_signed(this_ptr);
13310                 return nativeResponseValue;
13311         }
13312         // void CommitmentUpdate_set_commitment_signed(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCommitmentSigned val);
13313         export function CommitmentUpdate_set_commitment_signed(this_ptr: number, val: number): void {
13314                 if(!isWasmInitialized) {
13315                         throw new Error("initializeWasm() must be awaited first!");
13316                 }
13317                 const nativeResponseValue = wasm.CommitmentUpdate_set_commitment_signed(this_ptr, val);
13318                 // debug statements here
13319         }
13320         // 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);
13321         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 {
13322                 if(!isWasmInitialized) {
13323                         throw new Error("initializeWasm() must be awaited first!");
13324                 }
13325                 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);
13326                 return nativeResponseValue;
13327         }
13328         // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
13329         export function CommitmentUpdate_clone(orig: number): number {
13330                 if(!isWasmInitialized) {
13331                         throw new Error("initializeWasm() must be awaited first!");
13332                 }
13333                 const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
13334                 return nativeResponseValue;
13335         }
13336         // void ChannelMessageHandler_free(struct LDKChannelMessageHandler this_ptr);
13337         export function ChannelMessageHandler_free(this_ptr: number): void {
13338                 if(!isWasmInitialized) {
13339                         throw new Error("initializeWasm() must be awaited first!");
13340                 }
13341                 const nativeResponseValue = wasm.ChannelMessageHandler_free(this_ptr);
13342                 // debug statements here
13343         }
13344         // void RoutingMessageHandler_free(struct LDKRoutingMessageHandler this_ptr);
13345         export function RoutingMessageHandler_free(this_ptr: number): void {
13346                 if(!isWasmInitialized) {
13347                         throw new Error("initializeWasm() must be awaited first!");
13348                 }
13349                 const nativeResponseValue = wasm.RoutingMessageHandler_free(this_ptr);
13350                 // debug statements here
13351         }
13352         // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
13353         export function AcceptChannel_write(obj: number): Uint8Array {
13354                 if(!isWasmInitialized) {
13355                         throw new Error("initializeWasm() must be awaited first!");
13356                 }
13357                 const nativeResponseValue = wasm.AcceptChannel_write(obj);
13358                 return decodeArray(nativeResponseValue);
13359         }
13360         // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
13361         export function AcceptChannel_read(ser: Uint8Array): number {
13362                 if(!isWasmInitialized) {
13363                         throw new Error("initializeWasm() must be awaited first!");
13364                 }
13365                 const nativeResponseValue = wasm.AcceptChannel_read(encodeArray(ser));
13366                 return nativeResponseValue;
13367         }
13368         // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
13369         export function AnnouncementSignatures_write(obj: number): Uint8Array {
13370                 if(!isWasmInitialized) {
13371                         throw new Error("initializeWasm() must be awaited first!");
13372                 }
13373                 const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
13374                 return decodeArray(nativeResponseValue);
13375         }
13376         // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
13377         export function AnnouncementSignatures_read(ser: Uint8Array): number {
13378                 if(!isWasmInitialized) {
13379                         throw new Error("initializeWasm() must be awaited first!");
13380                 }
13381                 const nativeResponseValue = wasm.AnnouncementSignatures_read(encodeArray(ser));
13382                 return nativeResponseValue;
13383         }
13384         // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
13385         export function ChannelReestablish_write(obj: number): Uint8Array {
13386                 if(!isWasmInitialized) {
13387                         throw new Error("initializeWasm() must be awaited first!");
13388                 }
13389                 const nativeResponseValue = wasm.ChannelReestablish_write(obj);
13390                 return decodeArray(nativeResponseValue);
13391         }
13392         // struct LDKCResult_ChannelReestablishDecodeErrorZ ChannelReestablish_read(struct LDKu8slice ser);
13393         export function ChannelReestablish_read(ser: Uint8Array): number {
13394                 if(!isWasmInitialized) {
13395                         throw new Error("initializeWasm() must be awaited first!");
13396                 }
13397                 const nativeResponseValue = wasm.ChannelReestablish_read(encodeArray(ser));
13398                 return nativeResponseValue;
13399         }
13400         // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
13401         export function ClosingSigned_write(obj: number): Uint8Array {
13402                 if(!isWasmInitialized) {
13403                         throw new Error("initializeWasm() must be awaited first!");
13404                 }
13405                 const nativeResponseValue = wasm.ClosingSigned_write(obj);
13406                 return decodeArray(nativeResponseValue);
13407         }
13408         // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
13409         export function ClosingSigned_read(ser: Uint8Array): number {
13410                 if(!isWasmInitialized) {
13411                         throw new Error("initializeWasm() must be awaited first!");
13412                 }
13413                 const nativeResponseValue = wasm.ClosingSigned_read(encodeArray(ser));
13414                 return nativeResponseValue;
13415         }
13416         // struct LDKCVec_u8Z ClosingSignedFeeRange_write(const struct LDKClosingSignedFeeRange *NONNULL_PTR obj);
13417         export function ClosingSignedFeeRange_write(obj: number): Uint8Array {
13418                 if(!isWasmInitialized) {
13419                         throw new Error("initializeWasm() must be awaited first!");
13420                 }
13421                 const nativeResponseValue = wasm.ClosingSignedFeeRange_write(obj);
13422                 return decodeArray(nativeResponseValue);
13423         }
13424         // struct LDKCResult_ClosingSignedFeeRangeDecodeErrorZ ClosingSignedFeeRange_read(struct LDKu8slice ser);
13425         export function ClosingSignedFeeRange_read(ser: Uint8Array): number {
13426                 if(!isWasmInitialized) {
13427                         throw new Error("initializeWasm() must be awaited first!");
13428                 }
13429                 const nativeResponseValue = wasm.ClosingSignedFeeRange_read(encodeArray(ser));
13430                 return nativeResponseValue;
13431         }
13432         // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
13433         export function CommitmentSigned_write(obj: number): Uint8Array {
13434                 if(!isWasmInitialized) {
13435                         throw new Error("initializeWasm() must be awaited first!");
13436                 }
13437                 const nativeResponseValue = wasm.CommitmentSigned_write(obj);
13438                 return decodeArray(nativeResponseValue);
13439         }
13440         // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
13441         export function CommitmentSigned_read(ser: Uint8Array): number {
13442                 if(!isWasmInitialized) {
13443                         throw new Error("initializeWasm() must be awaited first!");
13444                 }
13445                 const nativeResponseValue = wasm.CommitmentSigned_read(encodeArray(ser));
13446                 return nativeResponseValue;
13447         }
13448         // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
13449         export function FundingCreated_write(obj: number): Uint8Array {
13450                 if(!isWasmInitialized) {
13451                         throw new Error("initializeWasm() must be awaited first!");
13452                 }
13453                 const nativeResponseValue = wasm.FundingCreated_write(obj);
13454                 return decodeArray(nativeResponseValue);
13455         }
13456         // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
13457         export function FundingCreated_read(ser: Uint8Array): number {
13458                 if(!isWasmInitialized) {
13459                         throw new Error("initializeWasm() must be awaited first!");
13460                 }
13461                 const nativeResponseValue = wasm.FundingCreated_read(encodeArray(ser));
13462                 return nativeResponseValue;
13463         }
13464         // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
13465         export function FundingSigned_write(obj: number): Uint8Array {
13466                 if(!isWasmInitialized) {
13467                         throw new Error("initializeWasm() must be awaited first!");
13468                 }
13469                 const nativeResponseValue = wasm.FundingSigned_write(obj);
13470                 return decodeArray(nativeResponseValue);
13471         }
13472         // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
13473         export function FundingSigned_read(ser: Uint8Array): number {
13474                 if(!isWasmInitialized) {
13475                         throw new Error("initializeWasm() must be awaited first!");
13476                 }
13477                 const nativeResponseValue = wasm.FundingSigned_read(encodeArray(ser));
13478                 return nativeResponseValue;
13479         }
13480         // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
13481         export function FundingLocked_write(obj: number): Uint8Array {
13482                 if(!isWasmInitialized) {
13483                         throw new Error("initializeWasm() must be awaited first!");
13484                 }
13485                 const nativeResponseValue = wasm.FundingLocked_write(obj);
13486                 return decodeArray(nativeResponseValue);
13487         }
13488         // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
13489         export function FundingLocked_read(ser: Uint8Array): number {
13490                 if(!isWasmInitialized) {
13491                         throw new Error("initializeWasm() must be awaited first!");
13492                 }
13493                 const nativeResponseValue = wasm.FundingLocked_read(encodeArray(ser));
13494                 return nativeResponseValue;
13495         }
13496         // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
13497         export function Init_write(obj: number): Uint8Array {
13498                 if(!isWasmInitialized) {
13499                         throw new Error("initializeWasm() must be awaited first!");
13500                 }
13501                 const nativeResponseValue = wasm.Init_write(obj);
13502                 return decodeArray(nativeResponseValue);
13503         }
13504         // struct LDKCResult_InitDecodeErrorZ Init_read(struct LDKu8slice ser);
13505         export function Init_read(ser: Uint8Array): number {
13506                 if(!isWasmInitialized) {
13507                         throw new Error("initializeWasm() must be awaited first!");
13508                 }
13509                 const nativeResponseValue = wasm.Init_read(encodeArray(ser));
13510                 return nativeResponseValue;
13511         }
13512         // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
13513         export function OpenChannel_write(obj: number): Uint8Array {
13514                 if(!isWasmInitialized) {
13515                         throw new Error("initializeWasm() must be awaited first!");
13516                 }
13517                 const nativeResponseValue = wasm.OpenChannel_write(obj);
13518                 return decodeArray(nativeResponseValue);
13519         }
13520         // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
13521         export function OpenChannel_read(ser: Uint8Array): number {
13522                 if(!isWasmInitialized) {
13523                         throw new Error("initializeWasm() must be awaited first!");
13524                 }
13525                 const nativeResponseValue = wasm.OpenChannel_read(encodeArray(ser));
13526                 return nativeResponseValue;
13527         }
13528         // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
13529         export function RevokeAndACK_write(obj: number): Uint8Array {
13530                 if(!isWasmInitialized) {
13531                         throw new Error("initializeWasm() must be awaited first!");
13532                 }
13533                 const nativeResponseValue = wasm.RevokeAndACK_write(obj);
13534                 return decodeArray(nativeResponseValue);
13535         }
13536         // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
13537         export function RevokeAndACK_read(ser: Uint8Array): number {
13538                 if(!isWasmInitialized) {
13539                         throw new Error("initializeWasm() must be awaited first!");
13540                 }
13541                 const nativeResponseValue = wasm.RevokeAndACK_read(encodeArray(ser));
13542                 return nativeResponseValue;
13543         }
13544         // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
13545         export function Shutdown_write(obj: number): Uint8Array {
13546                 if(!isWasmInitialized) {
13547                         throw new Error("initializeWasm() must be awaited first!");
13548                 }
13549                 const nativeResponseValue = wasm.Shutdown_write(obj);
13550                 return decodeArray(nativeResponseValue);
13551         }
13552         // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
13553         export function Shutdown_read(ser: Uint8Array): number {
13554                 if(!isWasmInitialized) {
13555                         throw new Error("initializeWasm() must be awaited first!");
13556                 }
13557                 const nativeResponseValue = wasm.Shutdown_read(encodeArray(ser));
13558                 return nativeResponseValue;
13559         }
13560         // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
13561         export function UpdateFailHTLC_write(obj: number): Uint8Array {
13562                 if(!isWasmInitialized) {
13563                         throw new Error("initializeWasm() must be awaited first!");
13564                 }
13565                 const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
13566                 return decodeArray(nativeResponseValue);
13567         }
13568         // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
13569         export function UpdateFailHTLC_read(ser: Uint8Array): number {
13570                 if(!isWasmInitialized) {
13571                         throw new Error("initializeWasm() must be awaited first!");
13572                 }
13573                 const nativeResponseValue = wasm.UpdateFailHTLC_read(encodeArray(ser));
13574                 return nativeResponseValue;
13575         }
13576         // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
13577         export function UpdateFailMalformedHTLC_write(obj: number): Uint8Array {
13578                 if(!isWasmInitialized) {
13579                         throw new Error("initializeWasm() must be awaited first!");
13580                 }
13581                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
13582                 return decodeArray(nativeResponseValue);
13583         }
13584         // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
13585         export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
13586                 if(!isWasmInitialized) {
13587                         throw new Error("initializeWasm() must be awaited first!");
13588                 }
13589                 const nativeResponseValue = wasm.UpdateFailMalformedHTLC_read(encodeArray(ser));
13590                 return nativeResponseValue;
13591         }
13592         // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
13593         export function UpdateFee_write(obj: number): Uint8Array {
13594                 if(!isWasmInitialized) {
13595                         throw new Error("initializeWasm() must be awaited first!");
13596                 }
13597                 const nativeResponseValue = wasm.UpdateFee_write(obj);
13598                 return decodeArray(nativeResponseValue);
13599         }
13600         // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
13601         export function UpdateFee_read(ser: Uint8Array): number {
13602                 if(!isWasmInitialized) {
13603                         throw new Error("initializeWasm() must be awaited first!");
13604                 }
13605                 const nativeResponseValue = wasm.UpdateFee_read(encodeArray(ser));
13606                 return nativeResponseValue;
13607         }
13608         // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
13609         export function UpdateFulfillHTLC_write(obj: number): Uint8Array {
13610                 if(!isWasmInitialized) {
13611                         throw new Error("initializeWasm() must be awaited first!");
13612                 }
13613                 const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
13614                 return decodeArray(nativeResponseValue);
13615         }
13616         // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
13617         export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
13618                 if(!isWasmInitialized) {
13619                         throw new Error("initializeWasm() must be awaited first!");
13620                 }
13621                 const nativeResponseValue = wasm.UpdateFulfillHTLC_read(encodeArray(ser));
13622                 return nativeResponseValue;
13623         }
13624         // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
13625         export function UpdateAddHTLC_write(obj: number): Uint8Array {
13626                 if(!isWasmInitialized) {
13627                         throw new Error("initializeWasm() must be awaited first!");
13628                 }
13629                 const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
13630                 return decodeArray(nativeResponseValue);
13631         }
13632         // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
13633         export function UpdateAddHTLC_read(ser: Uint8Array): number {
13634                 if(!isWasmInitialized) {
13635                         throw new Error("initializeWasm() must be awaited first!");
13636                 }
13637                 const nativeResponseValue = wasm.UpdateAddHTLC_read(encodeArray(ser));
13638                 return nativeResponseValue;
13639         }
13640         // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
13641         export function Ping_write(obj: number): Uint8Array {
13642                 if(!isWasmInitialized) {
13643                         throw new Error("initializeWasm() must be awaited first!");
13644                 }
13645                 const nativeResponseValue = wasm.Ping_write(obj);
13646                 return decodeArray(nativeResponseValue);
13647         }
13648         // struct LDKCResult_PingDecodeErrorZ Ping_read(struct LDKu8slice ser);
13649         export function Ping_read(ser: Uint8Array): number {
13650                 if(!isWasmInitialized) {
13651                         throw new Error("initializeWasm() must be awaited first!");
13652                 }
13653                 const nativeResponseValue = wasm.Ping_read(encodeArray(ser));
13654                 return nativeResponseValue;
13655         }
13656         // struct LDKCVec_u8Z Pong_write(const struct LDKPong *NONNULL_PTR obj);
13657         export function Pong_write(obj: number): Uint8Array {
13658                 if(!isWasmInitialized) {
13659                         throw new Error("initializeWasm() must be awaited first!");
13660                 }
13661                 const nativeResponseValue = wasm.Pong_write(obj);
13662                 return decodeArray(nativeResponseValue);
13663         }
13664         // struct LDKCResult_PongDecodeErrorZ Pong_read(struct LDKu8slice ser);
13665         export function Pong_read(ser: Uint8Array): number {
13666                 if(!isWasmInitialized) {
13667                         throw new Error("initializeWasm() must be awaited first!");
13668                 }
13669                 const nativeResponseValue = wasm.Pong_read(encodeArray(ser));
13670                 return nativeResponseValue;
13671         }
13672         // struct LDKCVec_u8Z UnsignedChannelAnnouncement_write(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR obj);
13673         export function UnsignedChannelAnnouncement_write(obj: number): Uint8Array {
13674                 if(!isWasmInitialized) {
13675                         throw new Error("initializeWasm() must be awaited first!");
13676                 }
13677                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_write(obj);
13678                 return decodeArray(nativeResponseValue);
13679         }
13680         // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ UnsignedChannelAnnouncement_read(struct LDKu8slice ser);
13681         export function UnsignedChannelAnnouncement_read(ser: Uint8Array): number {
13682                 if(!isWasmInitialized) {
13683                         throw new Error("initializeWasm() must be awaited first!");
13684                 }
13685                 const nativeResponseValue = wasm.UnsignedChannelAnnouncement_read(encodeArray(ser));
13686                 return nativeResponseValue;
13687         }
13688         // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
13689         export function ChannelAnnouncement_write(obj: number): Uint8Array {
13690                 if(!isWasmInitialized) {
13691                         throw new Error("initializeWasm() must be awaited first!");
13692                 }
13693                 const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
13694                 return decodeArray(nativeResponseValue);
13695         }
13696         // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
13697         export function ChannelAnnouncement_read(ser: Uint8Array): number {
13698                 if(!isWasmInitialized) {
13699                         throw new Error("initializeWasm() must be awaited first!");
13700                 }
13701                 const nativeResponseValue = wasm.ChannelAnnouncement_read(encodeArray(ser));
13702                 return nativeResponseValue;
13703         }
13704         // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
13705         export function UnsignedChannelUpdate_write(obj: number): Uint8Array {
13706                 if(!isWasmInitialized) {
13707                         throw new Error("initializeWasm() must be awaited first!");
13708                 }
13709                 const nativeResponseValue = wasm.UnsignedChannelUpdate_write(obj);
13710                 return decodeArray(nativeResponseValue);
13711         }
13712         // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ UnsignedChannelUpdate_read(struct LDKu8slice ser);
13713         export function UnsignedChannelUpdate_read(ser: Uint8Array): number {
13714                 if(!isWasmInitialized) {
13715                         throw new Error("initializeWasm() must be awaited first!");
13716                 }
13717                 const nativeResponseValue = wasm.UnsignedChannelUpdate_read(encodeArray(ser));
13718                 return nativeResponseValue;
13719         }
13720         // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
13721         export function ChannelUpdate_write(obj: number): Uint8Array {
13722                 if(!isWasmInitialized) {
13723                         throw new Error("initializeWasm() must be awaited first!");
13724                 }
13725                 const nativeResponseValue = wasm.ChannelUpdate_write(obj);
13726                 return decodeArray(nativeResponseValue);
13727         }
13728         // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
13729         export function ChannelUpdate_read(ser: Uint8Array): number {
13730                 if(!isWasmInitialized) {
13731                         throw new Error("initializeWasm() must be awaited first!");
13732                 }
13733                 const nativeResponseValue = wasm.ChannelUpdate_read(encodeArray(ser));
13734                 return nativeResponseValue;
13735         }
13736         // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
13737         export function ErrorMessage_write(obj: number): Uint8Array {
13738                 if(!isWasmInitialized) {
13739                         throw new Error("initializeWasm() must be awaited first!");
13740                 }
13741                 const nativeResponseValue = wasm.ErrorMessage_write(obj);
13742                 return decodeArray(nativeResponseValue);
13743         }
13744         // struct LDKCResult_ErrorMessageDecodeErrorZ ErrorMessage_read(struct LDKu8slice ser);
13745         export function ErrorMessage_read(ser: Uint8Array): number {
13746                 if(!isWasmInitialized) {
13747                         throw new Error("initializeWasm() must be awaited first!");
13748                 }
13749                 const nativeResponseValue = wasm.ErrorMessage_read(encodeArray(ser));
13750                 return nativeResponseValue;
13751         }
13752         // struct LDKCVec_u8Z UnsignedNodeAnnouncement_write(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR obj);
13753         export function UnsignedNodeAnnouncement_write(obj: number): Uint8Array {
13754                 if(!isWasmInitialized) {
13755                         throw new Error("initializeWasm() must be awaited first!");
13756                 }
13757                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_write(obj);
13758                 return decodeArray(nativeResponseValue);
13759         }
13760         // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ UnsignedNodeAnnouncement_read(struct LDKu8slice ser);
13761         export function UnsignedNodeAnnouncement_read(ser: Uint8Array): number {
13762                 if(!isWasmInitialized) {
13763                         throw new Error("initializeWasm() must be awaited first!");
13764                 }
13765                 const nativeResponseValue = wasm.UnsignedNodeAnnouncement_read(encodeArray(ser));
13766                 return nativeResponseValue;
13767         }
13768         // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
13769         export function NodeAnnouncement_write(obj: number): Uint8Array {
13770                 if(!isWasmInitialized) {
13771                         throw new Error("initializeWasm() must be awaited first!");
13772                 }
13773                 const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
13774                 return decodeArray(nativeResponseValue);
13775         }
13776         // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
13777         export function NodeAnnouncement_read(ser: Uint8Array): number {
13778                 if(!isWasmInitialized) {
13779                         throw new Error("initializeWasm() must be awaited first!");
13780                 }
13781                 const nativeResponseValue = wasm.NodeAnnouncement_read(encodeArray(ser));
13782                 return nativeResponseValue;
13783         }
13784         // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
13785         export function QueryShortChannelIds_read(ser: Uint8Array): number {
13786                 if(!isWasmInitialized) {
13787                         throw new Error("initializeWasm() must be awaited first!");
13788                 }
13789                 const nativeResponseValue = wasm.QueryShortChannelIds_read(encodeArray(ser));
13790                 return nativeResponseValue;
13791         }
13792         // struct LDKCVec_u8Z QueryShortChannelIds_write(const struct LDKQueryShortChannelIds *NONNULL_PTR obj);
13793         export function QueryShortChannelIds_write(obj: number): Uint8Array {
13794                 if(!isWasmInitialized) {
13795                         throw new Error("initializeWasm() must be awaited first!");
13796                 }
13797                 const nativeResponseValue = wasm.QueryShortChannelIds_write(obj);
13798                 return decodeArray(nativeResponseValue);
13799         }
13800         // struct LDKCVec_u8Z ReplyShortChannelIdsEnd_write(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR obj);
13801         export function ReplyShortChannelIdsEnd_write(obj: number): Uint8Array {
13802                 if(!isWasmInitialized) {
13803                         throw new Error("initializeWasm() must be awaited first!");
13804                 }
13805                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_write(obj);
13806                 return decodeArray(nativeResponseValue);
13807         }
13808         // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ ReplyShortChannelIdsEnd_read(struct LDKu8slice ser);
13809         export function ReplyShortChannelIdsEnd_read(ser: Uint8Array): number {
13810                 if(!isWasmInitialized) {
13811                         throw new Error("initializeWasm() must be awaited first!");
13812                 }
13813                 const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_read(encodeArray(ser));
13814                 return nativeResponseValue;
13815         }
13816         // MUST_USE_RES uint32_t QueryChannelRange_end_blocknum(const struct LDKQueryChannelRange *NONNULL_PTR this_arg);
13817         export function QueryChannelRange_end_blocknum(this_arg: number): number {
13818                 if(!isWasmInitialized) {
13819                         throw new Error("initializeWasm() must be awaited first!");
13820                 }
13821                 const nativeResponseValue = wasm.QueryChannelRange_end_blocknum(this_arg);
13822                 return nativeResponseValue;
13823         }
13824         // struct LDKCVec_u8Z QueryChannelRange_write(const struct LDKQueryChannelRange *NONNULL_PTR obj);
13825         export function QueryChannelRange_write(obj: number): Uint8Array {
13826                 if(!isWasmInitialized) {
13827                         throw new Error("initializeWasm() must be awaited first!");
13828                 }
13829                 const nativeResponseValue = wasm.QueryChannelRange_write(obj);
13830                 return decodeArray(nativeResponseValue);
13831         }
13832         // struct LDKCResult_QueryChannelRangeDecodeErrorZ QueryChannelRange_read(struct LDKu8slice ser);
13833         export function QueryChannelRange_read(ser: Uint8Array): number {
13834                 if(!isWasmInitialized) {
13835                         throw new Error("initializeWasm() must be awaited first!");
13836                 }
13837                 const nativeResponseValue = wasm.QueryChannelRange_read(encodeArray(ser));
13838                 return nativeResponseValue;
13839         }
13840         // struct LDKCResult_ReplyChannelRangeDecodeErrorZ ReplyChannelRange_read(struct LDKu8slice ser);
13841         export function ReplyChannelRange_read(ser: Uint8Array): number {
13842                 if(!isWasmInitialized) {
13843                         throw new Error("initializeWasm() must be awaited first!");
13844                 }
13845                 const nativeResponseValue = wasm.ReplyChannelRange_read(encodeArray(ser));
13846                 return nativeResponseValue;
13847         }
13848         // struct LDKCVec_u8Z ReplyChannelRange_write(const struct LDKReplyChannelRange *NONNULL_PTR obj);
13849         export function ReplyChannelRange_write(obj: number): Uint8Array {
13850                 if(!isWasmInitialized) {
13851                         throw new Error("initializeWasm() must be awaited first!");
13852                 }
13853                 const nativeResponseValue = wasm.ReplyChannelRange_write(obj);
13854                 return decodeArray(nativeResponseValue);
13855         }
13856         // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
13857         export function GossipTimestampFilter_write(obj: number): Uint8Array {
13858                 if(!isWasmInitialized) {
13859                         throw new Error("initializeWasm() must be awaited first!");
13860                 }
13861                 const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
13862                 return decodeArray(nativeResponseValue);
13863         }
13864         // struct LDKCResult_GossipTimestampFilterDecodeErrorZ GossipTimestampFilter_read(struct LDKu8slice ser);
13865         export function GossipTimestampFilter_read(ser: Uint8Array): number {
13866                 if(!isWasmInitialized) {
13867                         throw new Error("initializeWasm() must be awaited first!");
13868                 }
13869                 const nativeResponseValue = wasm.GossipTimestampFilter_read(encodeArray(ser));
13870                 return nativeResponseValue;
13871         }
13872         // void CustomMessageHandler_free(struct LDKCustomMessageHandler this_ptr);
13873         export function CustomMessageHandler_free(this_ptr: number): void {
13874                 if(!isWasmInitialized) {
13875                         throw new Error("initializeWasm() must be awaited first!");
13876                 }
13877                 const nativeResponseValue = wasm.CustomMessageHandler_free(this_ptr);
13878                 // debug statements here
13879         }
13880         // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_obj);
13881         export function IgnoringMessageHandler_free(this_obj: number): void {
13882                 if(!isWasmInitialized) {
13883                         throw new Error("initializeWasm() must be awaited first!");
13884                 }
13885                 const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_obj);
13886                 // debug statements here
13887         }
13888         // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
13889         export function IgnoringMessageHandler_new(): number {
13890                 if(!isWasmInitialized) {
13891                         throw new Error("initializeWasm() must be awaited first!");
13892                 }
13893                 const nativeResponseValue = wasm.IgnoringMessageHandler_new();
13894                 return nativeResponseValue;
13895         }
13896         // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
13897         export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
13898                 if(!isWasmInitialized) {
13899                         throw new Error("initializeWasm() must be awaited first!");
13900                 }
13901                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
13902                 return nativeResponseValue;
13903         }
13904         // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
13905         export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
13906                 if(!isWasmInitialized) {
13907                         throw new Error("initializeWasm() must be awaited first!");
13908                 }
13909                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
13910                 return nativeResponseValue;
13911         }
13912         // struct LDKCustomMessageReader IgnoringMessageHandler_as_CustomMessageReader(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
13913         export function IgnoringMessageHandler_as_CustomMessageReader(this_arg: number): number {
13914                 if(!isWasmInitialized) {
13915                         throw new Error("initializeWasm() must be awaited first!");
13916                 }
13917                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_CustomMessageReader(this_arg);
13918                 return nativeResponseValue;
13919         }
13920         // struct LDKCustomMessageHandler IgnoringMessageHandler_as_CustomMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
13921         export function IgnoringMessageHandler_as_CustomMessageHandler(this_arg: number): number {
13922                 if(!isWasmInitialized) {
13923                         throw new Error("initializeWasm() must be awaited first!");
13924                 }
13925                 const nativeResponseValue = wasm.IgnoringMessageHandler_as_CustomMessageHandler(this_arg);
13926                 return nativeResponseValue;
13927         }
13928         // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_obj);
13929         export function ErroringMessageHandler_free(this_obj: number): void {
13930                 if(!isWasmInitialized) {
13931                         throw new Error("initializeWasm() must be awaited first!");
13932                 }
13933                 const nativeResponseValue = wasm.ErroringMessageHandler_free(this_obj);
13934                 // debug statements here
13935         }
13936         // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
13937         export function ErroringMessageHandler_new(): number {
13938                 if(!isWasmInitialized) {
13939                         throw new Error("initializeWasm() must be awaited first!");
13940                 }
13941                 const nativeResponseValue = wasm.ErroringMessageHandler_new();
13942                 return nativeResponseValue;
13943         }
13944         // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
13945         export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
13946                 if(!isWasmInitialized) {
13947                         throw new Error("initializeWasm() must be awaited first!");
13948                 }
13949                 const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
13950                 return nativeResponseValue;
13951         }
13952         // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
13953         export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
13954                 if(!isWasmInitialized) {
13955                         throw new Error("initializeWasm() must be awaited first!");
13956                 }
13957                 const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
13958                 return nativeResponseValue;
13959         }
13960         // void MessageHandler_free(struct LDKMessageHandler this_obj);
13961         export function MessageHandler_free(this_obj: number): void {
13962                 if(!isWasmInitialized) {
13963                         throw new Error("initializeWasm() must be awaited first!");
13964                 }
13965                 const nativeResponseValue = wasm.MessageHandler_free(this_obj);
13966                 // debug statements here
13967         }
13968         // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
13969         export function MessageHandler_get_chan_handler(this_ptr: number): number {
13970                 if(!isWasmInitialized) {
13971                         throw new Error("initializeWasm() must be awaited first!");
13972                 }
13973                 const nativeResponseValue = wasm.MessageHandler_get_chan_handler(this_ptr);
13974                 return nativeResponseValue;
13975         }
13976         // void MessageHandler_set_chan_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKChannelMessageHandler val);
13977         export function MessageHandler_set_chan_handler(this_ptr: number, val: number): void {
13978                 if(!isWasmInitialized) {
13979                         throw new Error("initializeWasm() must be awaited first!");
13980                 }
13981                 const nativeResponseValue = wasm.MessageHandler_set_chan_handler(this_ptr, val);
13982                 // debug statements here
13983         }
13984         // const struct LDKRoutingMessageHandler *MessageHandler_get_route_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
13985         export function MessageHandler_get_route_handler(this_ptr: number): number {
13986                 if(!isWasmInitialized) {
13987                         throw new Error("initializeWasm() must be awaited first!");
13988                 }
13989                 const nativeResponseValue = wasm.MessageHandler_get_route_handler(this_ptr);
13990                 return nativeResponseValue;
13991         }
13992         // void MessageHandler_set_route_handler(struct LDKMessageHandler *NONNULL_PTR this_ptr, struct LDKRoutingMessageHandler val);
13993         export function MessageHandler_set_route_handler(this_ptr: number, val: number): void {
13994                 if(!isWasmInitialized) {
13995                         throw new Error("initializeWasm() must be awaited first!");
13996                 }
13997                 const nativeResponseValue = wasm.MessageHandler_set_route_handler(this_ptr, val);
13998                 // debug statements here
13999         }
14000         // MUST_USE_RES struct LDKMessageHandler MessageHandler_new(struct LDKChannelMessageHandler chan_handler_arg, struct LDKRoutingMessageHandler route_handler_arg);
14001         export function MessageHandler_new(chan_handler_arg: number, route_handler_arg: number): number {
14002                 if(!isWasmInitialized) {
14003                         throw new Error("initializeWasm() must be awaited first!");
14004                 }
14005                 const nativeResponseValue = wasm.MessageHandler_new(chan_handler_arg, route_handler_arg);
14006                 return nativeResponseValue;
14007         }
14008         // struct LDKSocketDescriptor SocketDescriptor_clone(const struct LDKSocketDescriptor *NONNULL_PTR orig);
14009         export function SocketDescriptor_clone(orig: number): number {
14010                 if(!isWasmInitialized) {
14011                         throw new Error("initializeWasm() must be awaited first!");
14012                 }
14013                 const nativeResponseValue = wasm.SocketDescriptor_clone(orig);
14014                 return nativeResponseValue;
14015         }
14016         // void SocketDescriptor_free(struct LDKSocketDescriptor this_ptr);
14017         export function SocketDescriptor_free(this_ptr: number): void {
14018                 if(!isWasmInitialized) {
14019                         throw new Error("initializeWasm() must be awaited first!");
14020                 }
14021                 const nativeResponseValue = wasm.SocketDescriptor_free(this_ptr);
14022                 // debug statements here
14023         }
14024         // void PeerHandleError_free(struct LDKPeerHandleError this_obj);
14025         export function PeerHandleError_free(this_obj: number): void {
14026                 if(!isWasmInitialized) {
14027                         throw new Error("initializeWasm() must be awaited first!");
14028                 }
14029                 const nativeResponseValue = wasm.PeerHandleError_free(this_obj);
14030                 // debug statements here
14031         }
14032         // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
14033         export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
14034                 if(!isWasmInitialized) {
14035                         throw new Error("initializeWasm() must be awaited first!");
14036                 }
14037                 const nativeResponseValue = wasm.PeerHandleError_get_no_connection_possible(this_ptr);
14038                 return nativeResponseValue;
14039         }
14040         // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
14041         export function PeerHandleError_set_no_connection_possible(this_ptr: number, val: boolean): void {
14042                 if(!isWasmInitialized) {
14043                         throw new Error("initializeWasm() must be awaited first!");
14044                 }
14045                 const nativeResponseValue = wasm.PeerHandleError_set_no_connection_possible(this_ptr, val);
14046                 // debug statements here
14047         }
14048         // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
14049         export function PeerHandleError_new(no_connection_possible_arg: boolean): number {
14050                 if(!isWasmInitialized) {
14051                         throw new Error("initializeWasm() must be awaited first!");
14052                 }
14053                 const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
14054                 return nativeResponseValue;
14055         }
14056         // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
14057         export function PeerHandleError_clone(orig: number): number {
14058                 if(!isWasmInitialized) {
14059                         throw new Error("initializeWasm() must be awaited first!");
14060                 }
14061                 const nativeResponseValue = wasm.PeerHandleError_clone(orig);
14062                 return nativeResponseValue;
14063         }
14064         // void PeerManager_free(struct LDKPeerManager this_obj);
14065         export function PeerManager_free(this_obj: number): void {
14066                 if(!isWasmInitialized) {
14067                         throw new Error("initializeWasm() must be awaited first!");
14068                 }
14069                 const nativeResponseValue = wasm.PeerManager_free(this_obj);
14070                 // debug statements here
14071         }
14072         // 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);
14073         export function PeerManager_new(message_handler: number, our_node_secret: Uint8Array, ephemeral_random_data: Uint8Array, logger: number, custom_message_handler: number): number {
14074                 if(!isWasmInitialized) {
14075                         throw new Error("initializeWasm() must be awaited first!");
14076                 }
14077                 const nativeResponseValue = wasm.PeerManager_new(message_handler, encodeArray(our_node_secret), encodeArray(ephemeral_random_data), logger, custom_message_handler);
14078                 return nativeResponseValue;
14079         }
14080         // MUST_USE_RES struct LDKCVec_PublicKeyZ PeerManager_get_peer_node_ids(const struct LDKPeerManager *NONNULL_PTR this_arg);
14081         export function PeerManager_get_peer_node_ids(this_arg: number): Uint8Array[] {
14082                 if(!isWasmInitialized) {
14083                         throw new Error("initializeWasm() must be awaited first!");
14084                 }
14085                 const nativeResponseValue = wasm.PeerManager_get_peer_node_ids(this_arg);
14086                 return nativeResponseValue;
14087         }
14088         // 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);
14089         export function PeerManager_new_outbound_connection(this_arg: number, their_node_id: Uint8Array, descriptor: number): number {
14090                 if(!isWasmInitialized) {
14091                         throw new Error("initializeWasm() must be awaited first!");
14092                 }
14093                 const nativeResponseValue = wasm.PeerManager_new_outbound_connection(this_arg, encodeArray(their_node_id), descriptor);
14094                 return nativeResponseValue;
14095         }
14096         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_new_inbound_connection(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor descriptor);
14097         export function PeerManager_new_inbound_connection(this_arg: number, descriptor: number): number {
14098                 if(!isWasmInitialized) {
14099                         throw new Error("initializeWasm() must be awaited first!");
14100                 }
14101                 const nativeResponseValue = wasm.PeerManager_new_inbound_connection(this_arg, descriptor);
14102                 return nativeResponseValue;
14103         }
14104         // MUST_USE_RES struct LDKCResult_NonePeerHandleErrorZ PeerManager_write_buffer_space_avail(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKSocketDescriptor *NONNULL_PTR descriptor);
14105         export function PeerManager_write_buffer_space_avail(this_arg: number, descriptor: number): number {
14106                 if(!isWasmInitialized) {
14107                         throw new Error("initializeWasm() must be awaited first!");
14108                 }
14109                 const nativeResponseValue = wasm.PeerManager_write_buffer_space_avail(this_arg, descriptor);
14110                 return nativeResponseValue;
14111         }
14112         // 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);
14113         export function PeerManager_read_event(this_arg: number, peer_descriptor: number, data: Uint8Array): number {
14114                 if(!isWasmInitialized) {
14115                         throw new Error("initializeWasm() must be awaited first!");
14116                 }
14117                 const nativeResponseValue = wasm.PeerManager_read_event(this_arg, peer_descriptor, encodeArray(data));
14118                 return nativeResponseValue;
14119         }
14120         // void PeerManager_process_events(const struct LDKPeerManager *NONNULL_PTR this_arg);
14121         export function PeerManager_process_events(this_arg: number): void {
14122                 if(!isWasmInitialized) {
14123                         throw new Error("initializeWasm() must be awaited first!");
14124                 }
14125                 const nativeResponseValue = wasm.PeerManager_process_events(this_arg);
14126                 // debug statements here
14127         }
14128         // void PeerManager_socket_disconnected(const struct LDKPeerManager *NONNULL_PTR this_arg, const struct LDKSocketDescriptor *NONNULL_PTR descriptor);
14129         export function PeerManager_socket_disconnected(this_arg: number, descriptor: number): void {
14130                 if(!isWasmInitialized) {
14131                         throw new Error("initializeWasm() must be awaited first!");
14132                 }
14133                 const nativeResponseValue = wasm.PeerManager_socket_disconnected(this_arg, descriptor);
14134                 // debug statements here
14135         }
14136         // void PeerManager_disconnect_by_node_id(const struct LDKPeerManager *NONNULL_PTR this_arg, struct LDKPublicKey node_id, bool no_connection_possible);
14137         export function PeerManager_disconnect_by_node_id(this_arg: number, node_id: Uint8Array, no_connection_possible: boolean): void {
14138                 if(!isWasmInitialized) {
14139                         throw new Error("initializeWasm() must be awaited first!");
14140                 }
14141                 const nativeResponseValue = wasm.PeerManager_disconnect_by_node_id(this_arg, encodeArray(node_id), no_connection_possible);
14142                 // debug statements here
14143         }
14144         // void PeerManager_timer_tick_occurred(const struct LDKPeerManager *NONNULL_PTR this_arg);
14145         export function PeerManager_timer_tick_occurred(this_arg: number): void {
14146                 if(!isWasmInitialized) {
14147                         throw new Error("initializeWasm() must be awaited first!");
14148                 }
14149                 const nativeResponseValue = wasm.PeerManager_timer_tick_occurred(this_arg);
14150                 // debug statements here
14151         }
14152         // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
14153         export function build_commitment_secret(commitment_seed: Uint8Array, idx: number): Uint8Array {
14154                 if(!isWasmInitialized) {
14155                         throw new Error("initializeWasm() must be awaited first!");
14156                 }
14157                 const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
14158                 return decodeArray(nativeResponseValue);
14159         }
14160         // 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);
14161         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 {
14162                 if(!isWasmInitialized) {
14163                         throw new Error("initializeWasm() must be awaited first!");
14164                 }
14165                 const nativeResponseValue = wasm.build_closing_transaction(to_holder_value_sat, to_counterparty_value_sat, encodeArray(to_holder_script), encodeArray(to_counterparty_script), funding_outpoint);
14166                 return decodeArray(nativeResponseValue);
14167         }
14168         // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
14169         export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
14170                 if(!isWasmInitialized) {
14171                         throw new Error("initializeWasm() must be awaited first!");
14172                 }
14173                 const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
14174                 return nativeResponseValue;
14175         }
14176         // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
14177         export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
14178                 if(!isWasmInitialized) {
14179                         throw new Error("initializeWasm() must be awaited first!");
14180                 }
14181                 const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
14182                 return nativeResponseValue;
14183         }
14184         // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
14185         export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
14186                 if(!isWasmInitialized) {
14187                         throw new Error("initializeWasm() must be awaited first!");
14188                 }
14189                 const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
14190                 return nativeResponseValue;
14191         }
14192         // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
14193         export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
14194                 if(!isWasmInitialized) {
14195                         throw new Error("initializeWasm() must be awaited first!");
14196                 }
14197                 const nativeResponseValue = wasm.derive_public_revocation_key(encodeArray(per_commitment_point), encodeArray(countersignatory_revocation_base_point));
14198                 return nativeResponseValue;
14199         }
14200         // void TxCreationKeys_free(struct LDKTxCreationKeys this_obj);
14201         export function TxCreationKeys_free(this_obj: number): void {
14202                 if(!isWasmInitialized) {
14203                         throw new Error("initializeWasm() must be awaited first!");
14204                 }
14205                 const nativeResponseValue = wasm.TxCreationKeys_free(this_obj);
14206                 // debug statements here
14207         }
14208         // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
14209         export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
14210                 if(!isWasmInitialized) {
14211                         throw new Error("initializeWasm() must be awaited first!");
14212                 }
14213                 const nativeResponseValue = wasm.TxCreationKeys_get_per_commitment_point(this_ptr);
14214                 return decodeArray(nativeResponseValue);
14215         }
14216         // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14217         export function TxCreationKeys_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
14218                 if(!isWasmInitialized) {
14219                         throw new Error("initializeWasm() must be awaited first!");
14220                 }
14221                 const nativeResponseValue = wasm.TxCreationKeys_set_per_commitment_point(this_ptr, encodeArray(val));
14222                 // debug statements here
14223         }
14224         // struct LDKPublicKey TxCreationKeys_get_revocation_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
14225         export function TxCreationKeys_get_revocation_key(this_ptr: number): Uint8Array {
14226                 if(!isWasmInitialized) {
14227                         throw new Error("initializeWasm() must be awaited first!");
14228                 }
14229                 const nativeResponseValue = wasm.TxCreationKeys_get_revocation_key(this_ptr);
14230                 return decodeArray(nativeResponseValue);
14231         }
14232         // void TxCreationKeys_set_revocation_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14233         export function TxCreationKeys_set_revocation_key(this_ptr: number, val: Uint8Array): void {
14234                 if(!isWasmInitialized) {
14235                         throw new Error("initializeWasm() must be awaited first!");
14236                 }
14237                 const nativeResponseValue = wasm.TxCreationKeys_set_revocation_key(this_ptr, encodeArray(val));
14238                 // debug statements here
14239         }
14240         // struct LDKPublicKey TxCreationKeys_get_broadcaster_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
14241         export function TxCreationKeys_get_broadcaster_htlc_key(this_ptr: number): Uint8Array {
14242                 if(!isWasmInitialized) {
14243                         throw new Error("initializeWasm() must be awaited first!");
14244                 }
14245                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_htlc_key(this_ptr);
14246                 return decodeArray(nativeResponseValue);
14247         }
14248         // void TxCreationKeys_set_broadcaster_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14249         export function TxCreationKeys_set_broadcaster_htlc_key(this_ptr: number, val: Uint8Array): void {
14250                 if(!isWasmInitialized) {
14251                         throw new Error("initializeWasm() must be awaited first!");
14252                 }
14253                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_htlc_key(this_ptr, encodeArray(val));
14254                 // debug statements here
14255         }
14256         // struct LDKPublicKey TxCreationKeys_get_countersignatory_htlc_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
14257         export function TxCreationKeys_get_countersignatory_htlc_key(this_ptr: number): Uint8Array {
14258                 if(!isWasmInitialized) {
14259                         throw new Error("initializeWasm() must be awaited first!");
14260                 }
14261                 const nativeResponseValue = wasm.TxCreationKeys_get_countersignatory_htlc_key(this_ptr);
14262                 return decodeArray(nativeResponseValue);
14263         }
14264         // void TxCreationKeys_set_countersignatory_htlc_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14265         export function TxCreationKeys_set_countersignatory_htlc_key(this_ptr: number, val: Uint8Array): void {
14266                 if(!isWasmInitialized) {
14267                         throw new Error("initializeWasm() must be awaited first!");
14268                 }
14269                 const nativeResponseValue = wasm.TxCreationKeys_set_countersignatory_htlc_key(this_ptr, encodeArray(val));
14270                 // debug statements here
14271         }
14272         // struct LDKPublicKey TxCreationKeys_get_broadcaster_delayed_payment_key(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
14273         export function TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr: number): Uint8Array {
14274                 if(!isWasmInitialized) {
14275                         throw new Error("initializeWasm() must be awaited first!");
14276                 }
14277                 const nativeResponseValue = wasm.TxCreationKeys_get_broadcaster_delayed_payment_key(this_ptr);
14278                 return decodeArray(nativeResponseValue);
14279         }
14280         // void TxCreationKeys_set_broadcaster_delayed_payment_key(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14281         export function TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr: number, val: Uint8Array): void {
14282                 if(!isWasmInitialized) {
14283                         throw new Error("initializeWasm() must be awaited first!");
14284                 }
14285                 const nativeResponseValue = wasm.TxCreationKeys_set_broadcaster_delayed_payment_key(this_ptr, encodeArray(val));
14286                 // debug statements here
14287         }
14288         // 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);
14289         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 {
14290                 if(!isWasmInitialized) {
14291                         throw new Error("initializeWasm() must be awaited first!");
14292                 }
14293                 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));
14294                 return nativeResponseValue;
14295         }
14296         // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
14297         export function TxCreationKeys_clone(orig: number): number {
14298                 if(!isWasmInitialized) {
14299                         throw new Error("initializeWasm() must be awaited first!");
14300                 }
14301                 const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
14302                 return nativeResponseValue;
14303         }
14304         // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
14305         export function TxCreationKeys_write(obj: number): Uint8Array {
14306                 if(!isWasmInitialized) {
14307                         throw new Error("initializeWasm() must be awaited first!");
14308                 }
14309                 const nativeResponseValue = wasm.TxCreationKeys_write(obj);
14310                 return decodeArray(nativeResponseValue);
14311         }
14312         // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
14313         export function TxCreationKeys_read(ser: Uint8Array): number {
14314                 if(!isWasmInitialized) {
14315                         throw new Error("initializeWasm() must be awaited first!");
14316                 }
14317                 const nativeResponseValue = wasm.TxCreationKeys_read(encodeArray(ser));
14318                 return nativeResponseValue;
14319         }
14320         // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_obj);
14321         export function ChannelPublicKeys_free(this_obj: number): void {
14322                 if(!isWasmInitialized) {
14323                         throw new Error("initializeWasm() must be awaited first!");
14324                 }
14325                 const nativeResponseValue = wasm.ChannelPublicKeys_free(this_obj);
14326                 // debug statements here
14327         }
14328         // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
14329         export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
14330                 if(!isWasmInitialized) {
14331                         throw new Error("initializeWasm() must be awaited first!");
14332                 }
14333                 const nativeResponseValue = wasm.ChannelPublicKeys_get_funding_pubkey(this_ptr);
14334                 return decodeArray(nativeResponseValue);
14335         }
14336         // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14337         export function ChannelPublicKeys_set_funding_pubkey(this_ptr: number, val: Uint8Array): void {
14338                 if(!isWasmInitialized) {
14339                         throw new Error("initializeWasm() must be awaited first!");
14340                 }
14341                 const nativeResponseValue = wasm.ChannelPublicKeys_set_funding_pubkey(this_ptr, encodeArray(val));
14342                 // debug statements here
14343         }
14344         // struct LDKPublicKey ChannelPublicKeys_get_revocation_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
14345         export function ChannelPublicKeys_get_revocation_basepoint(this_ptr: number): Uint8Array {
14346                 if(!isWasmInitialized) {
14347                         throw new Error("initializeWasm() must be awaited first!");
14348                 }
14349                 const nativeResponseValue = wasm.ChannelPublicKeys_get_revocation_basepoint(this_ptr);
14350                 return decodeArray(nativeResponseValue);
14351         }
14352         // void ChannelPublicKeys_set_revocation_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14353         export function ChannelPublicKeys_set_revocation_basepoint(this_ptr: number, val: Uint8Array): void {
14354                 if(!isWasmInitialized) {
14355                         throw new Error("initializeWasm() must be awaited first!");
14356                 }
14357                 const nativeResponseValue = wasm.ChannelPublicKeys_set_revocation_basepoint(this_ptr, encodeArray(val));
14358                 // debug statements here
14359         }
14360         // struct LDKPublicKey ChannelPublicKeys_get_payment_point(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
14361         export function ChannelPublicKeys_get_payment_point(this_ptr: number): Uint8Array {
14362                 if(!isWasmInitialized) {
14363                         throw new Error("initializeWasm() must be awaited first!");
14364                 }
14365                 const nativeResponseValue = wasm.ChannelPublicKeys_get_payment_point(this_ptr);
14366                 return decodeArray(nativeResponseValue);
14367         }
14368         // void ChannelPublicKeys_set_payment_point(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14369         export function ChannelPublicKeys_set_payment_point(this_ptr: number, val: Uint8Array): void {
14370                 if(!isWasmInitialized) {
14371                         throw new Error("initializeWasm() must be awaited first!");
14372                 }
14373                 const nativeResponseValue = wasm.ChannelPublicKeys_set_payment_point(this_ptr, encodeArray(val));
14374                 // debug statements here
14375         }
14376         // struct LDKPublicKey ChannelPublicKeys_get_delayed_payment_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
14377         export function ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr: number): Uint8Array {
14378                 if(!isWasmInitialized) {
14379                         throw new Error("initializeWasm() must be awaited first!");
14380                 }
14381                 const nativeResponseValue = wasm.ChannelPublicKeys_get_delayed_payment_basepoint(this_ptr);
14382                 return decodeArray(nativeResponseValue);
14383         }
14384         // void ChannelPublicKeys_set_delayed_payment_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14385         export function ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr: number, val: Uint8Array): void {
14386                 if(!isWasmInitialized) {
14387                         throw new Error("initializeWasm() must be awaited first!");
14388                 }
14389                 const nativeResponseValue = wasm.ChannelPublicKeys_set_delayed_payment_basepoint(this_ptr, encodeArray(val));
14390                 // debug statements here
14391         }
14392         // struct LDKPublicKey ChannelPublicKeys_get_htlc_basepoint(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
14393         export function ChannelPublicKeys_get_htlc_basepoint(this_ptr: number): Uint8Array {
14394                 if(!isWasmInitialized) {
14395                         throw new Error("initializeWasm() must be awaited first!");
14396                 }
14397                 const nativeResponseValue = wasm.ChannelPublicKeys_get_htlc_basepoint(this_ptr);
14398                 return decodeArray(nativeResponseValue);
14399         }
14400         // void ChannelPublicKeys_set_htlc_basepoint(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
14401         export function ChannelPublicKeys_set_htlc_basepoint(this_ptr: number, val: Uint8Array): void {
14402                 if(!isWasmInitialized) {
14403                         throw new Error("initializeWasm() must be awaited first!");
14404                 }
14405                 const nativeResponseValue = wasm.ChannelPublicKeys_set_htlc_basepoint(this_ptr, encodeArray(val));
14406                 // debug statements here
14407         }
14408         // 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);
14409         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 {
14410                 if(!isWasmInitialized) {
14411                         throw new Error("initializeWasm() must be awaited first!");
14412                 }
14413                 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));
14414                 return nativeResponseValue;
14415         }
14416         // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
14417         export function ChannelPublicKeys_clone(orig: number): number {
14418                 if(!isWasmInitialized) {
14419                         throw new Error("initializeWasm() must be awaited first!");
14420                 }
14421                 const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
14422                 return nativeResponseValue;
14423         }
14424         // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
14425         export function ChannelPublicKeys_write(obj: number): Uint8Array {
14426                 if(!isWasmInitialized) {
14427                         throw new Error("initializeWasm() must be awaited first!");
14428                 }
14429                 const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
14430                 return decodeArray(nativeResponseValue);
14431         }
14432         // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
14433         export function ChannelPublicKeys_read(ser: Uint8Array): number {
14434                 if(!isWasmInitialized) {
14435                         throw new Error("initializeWasm() must be awaited first!");
14436                 }
14437                 const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
14438                 return nativeResponseValue;
14439         }
14440         // 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);
14441         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 {
14442                 if(!isWasmInitialized) {
14443                         throw new Error("initializeWasm() must be awaited first!");
14444                 }
14445                 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));
14446                 return nativeResponseValue;
14447         }
14448         // 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);
14449         export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
14450                 if(!isWasmInitialized) {
14451                         throw new Error("initializeWasm() must be awaited first!");
14452                 }
14453                 const nativeResponseValue = wasm.TxCreationKeys_from_channel_static_keys(encodeArray(per_commitment_point), broadcaster_keys, countersignatory_keys);
14454                 return nativeResponseValue;
14455         }
14456         // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
14457         export function get_revokeable_redeemscript(revocation_key: Uint8Array, contest_delay: number, broadcaster_delayed_payment_key: Uint8Array): Uint8Array {
14458                 if(!isWasmInitialized) {
14459                         throw new Error("initializeWasm() must be awaited first!");
14460                 }
14461                 const nativeResponseValue = wasm.get_revokeable_redeemscript(encodeArray(revocation_key), contest_delay, encodeArray(broadcaster_delayed_payment_key));
14462                 return decodeArray(nativeResponseValue);
14463         }
14464         // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_obj);
14465         export function HTLCOutputInCommitment_free(this_obj: number): void {
14466                 if(!isWasmInitialized) {
14467                         throw new Error("initializeWasm() must be awaited first!");
14468                 }
14469                 const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_obj);
14470                 // debug statements here
14471         }
14472         // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
14473         export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
14474                 if(!isWasmInitialized) {
14475                         throw new Error("initializeWasm() must be awaited first!");
14476                 }
14477                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_offered(this_ptr);
14478                 return nativeResponseValue;
14479         }
14480         // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
14481         export function HTLCOutputInCommitment_set_offered(this_ptr: number, val: boolean): void {
14482                 if(!isWasmInitialized) {
14483                         throw new Error("initializeWasm() must be awaited first!");
14484                 }
14485                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_offered(this_ptr, val);
14486                 // debug statements here
14487         }
14488         // uint64_t HTLCOutputInCommitment_get_amount_msat(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
14489         export function HTLCOutputInCommitment_get_amount_msat(this_ptr: number): number {
14490                 if(!isWasmInitialized) {
14491                         throw new Error("initializeWasm() must be awaited first!");
14492                 }
14493                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_amount_msat(this_ptr);
14494                 return nativeResponseValue;
14495         }
14496         // void HTLCOutputInCommitment_set_amount_msat(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint64_t val);
14497         export function HTLCOutputInCommitment_set_amount_msat(this_ptr: number, val: number): void {
14498                 if(!isWasmInitialized) {
14499                         throw new Error("initializeWasm() must be awaited first!");
14500                 }
14501                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_amount_msat(this_ptr, val);
14502                 // debug statements here
14503         }
14504         // uint32_t HTLCOutputInCommitment_get_cltv_expiry(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
14505         export function HTLCOutputInCommitment_get_cltv_expiry(this_ptr: number): number {
14506                 if(!isWasmInitialized) {
14507                         throw new Error("initializeWasm() must be awaited first!");
14508                 }
14509                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_cltv_expiry(this_ptr);
14510                 return nativeResponseValue;
14511         }
14512         // void HTLCOutputInCommitment_set_cltv_expiry(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, uint32_t val);
14513         export function HTLCOutputInCommitment_set_cltv_expiry(this_ptr: number, val: number): void {
14514                 if(!isWasmInitialized) {
14515                         throw new Error("initializeWasm() must be awaited first!");
14516                 }
14517                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_cltv_expiry(this_ptr, val);
14518                 // debug statements here
14519         }
14520         // const uint8_t (*HTLCOutputInCommitment_get_payment_hash(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr))[32];
14521         export function HTLCOutputInCommitment_get_payment_hash(this_ptr: number): Uint8Array {
14522                 if(!isWasmInitialized) {
14523                         throw new Error("initializeWasm() must be awaited first!");
14524                 }
14525                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_payment_hash(this_ptr);
14526                 return decodeArray(nativeResponseValue);
14527         }
14528         // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14529         export function HTLCOutputInCommitment_set_payment_hash(this_ptr: number, val: Uint8Array): void {
14530                 if(!isWasmInitialized) {
14531                         throw new Error("initializeWasm() must be awaited first!");
14532                 }
14533                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
14534                 // debug statements here
14535         }
14536         // struct LDKCOption_u32Z HTLCOutputInCommitment_get_transaction_output_index(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
14537         export function HTLCOutputInCommitment_get_transaction_output_index(this_ptr: number): number {
14538                 if(!isWasmInitialized) {
14539                         throw new Error("initializeWasm() must be awaited first!");
14540                 }
14541                 const nativeResponseValue = wasm.HTLCOutputInCommitment_get_transaction_output_index(this_ptr);
14542                 return nativeResponseValue;
14543         }
14544         // void HTLCOutputInCommitment_set_transaction_output_index(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKCOption_u32Z val);
14545         export function HTLCOutputInCommitment_set_transaction_output_index(this_ptr: number, val: number): void {
14546                 if(!isWasmInitialized) {
14547                         throw new Error("initializeWasm() must be awaited first!");
14548                 }
14549                 const nativeResponseValue = wasm.HTLCOutputInCommitment_set_transaction_output_index(this_ptr, val);
14550                 // debug statements here
14551         }
14552         // 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);
14553         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 {
14554                 if(!isWasmInitialized) {
14555                         throw new Error("initializeWasm() must be awaited first!");
14556                 }
14557                 const nativeResponseValue = wasm.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, encodeArray(payment_hash_arg), transaction_output_index_arg);
14558                 return nativeResponseValue;
14559         }
14560         // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
14561         export function HTLCOutputInCommitment_clone(orig: number): number {
14562                 if(!isWasmInitialized) {
14563                         throw new Error("initializeWasm() must be awaited first!");
14564                 }
14565                 const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
14566                 return nativeResponseValue;
14567         }
14568         // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
14569         export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
14570                 if(!isWasmInitialized) {
14571                         throw new Error("initializeWasm() must be awaited first!");
14572                 }
14573                 const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
14574                 return decodeArray(nativeResponseValue);
14575         }
14576         // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
14577         export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
14578                 if(!isWasmInitialized) {
14579                         throw new Error("initializeWasm() must be awaited first!");
14580                 }
14581                 const nativeResponseValue = wasm.HTLCOutputInCommitment_read(encodeArray(ser));
14582                 return nativeResponseValue;
14583         }
14584         // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
14585         export function get_htlc_redeemscript(htlc: number, keys: number): Uint8Array {
14586                 if(!isWasmInitialized) {
14587                         throw new Error("initializeWasm() must be awaited first!");
14588                 }
14589                 const nativeResponseValue = wasm.get_htlc_redeemscript(htlc, keys);
14590                 return decodeArray(nativeResponseValue);
14591         }
14592         // struct LDKCVec_u8Z make_funding_redeemscript(struct LDKPublicKey broadcaster, struct LDKPublicKey countersignatory);
14593         export function make_funding_redeemscript(broadcaster: Uint8Array, countersignatory: Uint8Array): Uint8Array {
14594                 if(!isWasmInitialized) {
14595                         throw new Error("initializeWasm() must be awaited first!");
14596                 }
14597                 const nativeResponseValue = wasm.make_funding_redeemscript(encodeArray(broadcaster), encodeArray(countersignatory));
14598                 return decodeArray(nativeResponseValue);
14599         }
14600         // 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);
14601         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 {
14602                 if(!isWasmInitialized) {
14603                         throw new Error("initializeWasm() must be awaited first!");
14604                 }
14605                 const nativeResponseValue = wasm.build_htlc_transaction(encodeArray(commitment_txid), feerate_per_kw, contest_delay, htlc, encodeArray(broadcaster_delayed_payment_key), encodeArray(revocation_key));
14606                 return decodeArray(nativeResponseValue);
14607         }
14608         // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_obj);
14609         export function ChannelTransactionParameters_free(this_obj: number): void {
14610                 if(!isWasmInitialized) {
14611                         throw new Error("initializeWasm() must be awaited first!");
14612                 }
14613                 const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_obj);
14614                 // debug statements here
14615         }
14616         // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14617         export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
14618                 if(!isWasmInitialized) {
14619                         throw new Error("initializeWasm() must be awaited first!");
14620                 }
14621                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_pubkeys(this_ptr);
14622                 return nativeResponseValue;
14623         }
14624         // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
14625         export function ChannelTransactionParameters_set_holder_pubkeys(this_ptr: number, val: number): void {
14626                 if(!isWasmInitialized) {
14627                         throw new Error("initializeWasm() must be awaited first!");
14628                 }
14629                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_pubkeys(this_ptr, val);
14630                 // debug statements here
14631         }
14632         // uint16_t ChannelTransactionParameters_get_holder_selected_contest_delay(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14633         export function ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr: number): number {
14634                 if(!isWasmInitialized) {
14635                         throw new Error("initializeWasm() must be awaited first!");
14636                 }
14637                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_holder_selected_contest_delay(this_ptr);
14638                 return nativeResponseValue;
14639         }
14640         // void ChannelTransactionParameters_set_holder_selected_contest_delay(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
14641         export function ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr: number, val: number): void {
14642                 if(!isWasmInitialized) {
14643                         throw new Error("initializeWasm() must be awaited first!");
14644                 }
14645                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_holder_selected_contest_delay(this_ptr, val);
14646                 // debug statements here
14647         }
14648         // bool ChannelTransactionParameters_get_is_outbound_from_holder(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14649         export function ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr: number): boolean {
14650                 if(!isWasmInitialized) {
14651                         throw new Error("initializeWasm() must be awaited first!");
14652                 }
14653                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_is_outbound_from_holder(this_ptr);
14654                 return nativeResponseValue;
14655         }
14656         // void ChannelTransactionParameters_set_is_outbound_from_holder(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, bool val);
14657         export function ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr: number, val: boolean): void {
14658                 if(!isWasmInitialized) {
14659                         throw new Error("initializeWasm() must be awaited first!");
14660                 }
14661                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_is_outbound_from_holder(this_ptr, val);
14662                 // debug statements here
14663         }
14664         // struct LDKCounterpartyChannelTransactionParameters ChannelTransactionParameters_get_counterparty_parameters(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14665         export function ChannelTransactionParameters_get_counterparty_parameters(this_ptr: number): number {
14666                 if(!isWasmInitialized) {
14667                         throw new Error("initializeWasm() must be awaited first!");
14668                 }
14669                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_counterparty_parameters(this_ptr);
14670                 return nativeResponseValue;
14671         }
14672         // void ChannelTransactionParameters_set_counterparty_parameters(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKCounterpartyChannelTransactionParameters val);
14673         export function ChannelTransactionParameters_set_counterparty_parameters(this_ptr: number, val: number): void {
14674                 if(!isWasmInitialized) {
14675                         throw new Error("initializeWasm() must be awaited first!");
14676                 }
14677                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_counterparty_parameters(this_ptr, val);
14678                 // debug statements here
14679         }
14680         // struct LDKOutPoint ChannelTransactionParameters_get_funding_outpoint(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
14681         export function ChannelTransactionParameters_get_funding_outpoint(this_ptr: number): number {
14682                 if(!isWasmInitialized) {
14683                         throw new Error("initializeWasm() must be awaited first!");
14684                 }
14685                 const nativeResponseValue = wasm.ChannelTransactionParameters_get_funding_outpoint(this_ptr);
14686                 return nativeResponseValue;
14687         }
14688         // void ChannelTransactionParameters_set_funding_outpoint(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKOutPoint val);
14689         export function ChannelTransactionParameters_set_funding_outpoint(this_ptr: number, val: number): void {
14690                 if(!isWasmInitialized) {
14691                         throw new Error("initializeWasm() must be awaited first!");
14692                 }
14693                 const nativeResponseValue = wasm.ChannelTransactionParameters_set_funding_outpoint(this_ptr, val);
14694                 // debug statements here
14695         }
14696         // 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);
14697         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 {
14698                 if(!isWasmInitialized) {
14699                         throw new Error("initializeWasm() must be awaited first!");
14700                 }
14701                 const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
14702                 return nativeResponseValue;
14703         }
14704         // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
14705         export function ChannelTransactionParameters_clone(orig: number): number {
14706                 if(!isWasmInitialized) {
14707                         throw new Error("initializeWasm() must be awaited first!");
14708                 }
14709                 const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
14710                 return nativeResponseValue;
14711         }
14712         // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_obj);
14713         export function CounterpartyChannelTransactionParameters_free(this_obj: number): void {
14714                 if(!isWasmInitialized) {
14715                         throw new Error("initializeWasm() must be awaited first!");
14716                 }
14717                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_obj);
14718                 // debug statements here
14719         }
14720         // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
14721         export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
14722                 if(!isWasmInitialized) {
14723                         throw new Error("initializeWasm() must be awaited first!");
14724                 }
14725                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr);
14726                 return nativeResponseValue;
14727         }
14728         // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
14729         export function CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr: number, val: number): void {
14730                 if(!isWasmInitialized) {
14731                         throw new Error("initializeWasm() must be awaited first!");
14732                 }
14733                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_pubkeys(this_ptr, val);
14734                 // debug statements here
14735         }
14736         // uint16_t CounterpartyChannelTransactionParameters_get_selected_contest_delay(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
14737         export function CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr: number): number {
14738                 if(!isWasmInitialized) {
14739                         throw new Error("initializeWasm() must be awaited first!");
14740                 }
14741                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this_ptr);
14742                 return nativeResponseValue;
14743         }
14744         // void CounterpartyChannelTransactionParameters_set_selected_contest_delay(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, uint16_t val);
14745         export function CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr: number, val: number): void {
14746                 if(!isWasmInitialized) {
14747                         throw new Error("initializeWasm() must be awaited first!");
14748                 }
14749                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this_ptr, val);
14750                 // debug statements here
14751         }
14752         // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
14753         export function CounterpartyChannelTransactionParameters_new(pubkeys_arg: number, selected_contest_delay_arg: number): number {
14754                 if(!isWasmInitialized) {
14755                         throw new Error("initializeWasm() must be awaited first!");
14756                 }
14757                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
14758                 return nativeResponseValue;
14759         }
14760         // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
14761         export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
14762                 if(!isWasmInitialized) {
14763                         throw new Error("initializeWasm() must be awaited first!");
14764                 }
14765                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
14766                 return nativeResponseValue;
14767         }
14768         // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
14769         export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
14770                 if(!isWasmInitialized) {
14771                         throw new Error("initializeWasm() must be awaited first!");
14772                 }
14773                 const nativeResponseValue = wasm.ChannelTransactionParameters_is_populated(this_arg);
14774                 return nativeResponseValue;
14775         }
14776         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
14777         export function ChannelTransactionParameters_as_holder_broadcastable(this_arg: number): number {
14778                 if(!isWasmInitialized) {
14779                         throw new Error("initializeWasm() must be awaited first!");
14780                 }
14781                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_holder_broadcastable(this_arg);
14782                 return nativeResponseValue;
14783         }
14784         // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_counterparty_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
14785         export function ChannelTransactionParameters_as_counterparty_broadcastable(this_arg: number): number {
14786                 if(!isWasmInitialized) {
14787                         throw new Error("initializeWasm() must be awaited first!");
14788                 }
14789                 const nativeResponseValue = wasm.ChannelTransactionParameters_as_counterparty_broadcastable(this_arg);
14790                 return nativeResponseValue;
14791         }
14792         // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
14793         export function CounterpartyChannelTransactionParameters_write(obj: number): Uint8Array {
14794                 if(!isWasmInitialized) {
14795                         throw new Error("initializeWasm() must be awaited first!");
14796                 }
14797                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
14798                 return decodeArray(nativeResponseValue);
14799         }
14800         // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
14801         export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
14802                 if(!isWasmInitialized) {
14803                         throw new Error("initializeWasm() must be awaited first!");
14804                 }
14805                 const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_read(encodeArray(ser));
14806                 return nativeResponseValue;
14807         }
14808         // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
14809         export function ChannelTransactionParameters_write(obj: number): Uint8Array {
14810                 if(!isWasmInitialized) {
14811                         throw new Error("initializeWasm() must be awaited first!");
14812                 }
14813                 const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
14814                 return decodeArray(nativeResponseValue);
14815         }
14816         // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
14817         export function ChannelTransactionParameters_read(ser: Uint8Array): number {
14818                 if(!isWasmInitialized) {
14819                         throw new Error("initializeWasm() must be awaited first!");
14820                 }
14821                 const nativeResponseValue = wasm.ChannelTransactionParameters_read(encodeArray(ser));
14822                 return nativeResponseValue;
14823         }
14824         // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_obj);
14825         export function DirectedChannelTransactionParameters_free(this_obj: number): void {
14826                 if(!isWasmInitialized) {
14827                         throw new Error("initializeWasm() must be awaited first!");
14828                 }
14829                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_free(this_obj);
14830                 // debug statements here
14831         }
14832         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_broadcaster_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14833         export function DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg: number): number {
14834                 if(!isWasmInitialized) {
14835                         throw new Error("initializeWasm() must be awaited first!");
14836                 }
14837                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_broadcaster_pubkeys(this_arg);
14838                 return nativeResponseValue;
14839         }
14840         // MUST_USE_RES struct LDKChannelPublicKeys DirectedChannelTransactionParameters_countersignatory_pubkeys(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14841         export function DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg: number): number {
14842                 if(!isWasmInitialized) {
14843                         throw new Error("initializeWasm() must be awaited first!");
14844                 }
14845                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_countersignatory_pubkeys(this_arg);
14846                 return nativeResponseValue;
14847         }
14848         // MUST_USE_RES uint16_t DirectedChannelTransactionParameters_contest_delay(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14849         export function DirectedChannelTransactionParameters_contest_delay(this_arg: number): number {
14850                 if(!isWasmInitialized) {
14851                         throw new Error("initializeWasm() must be awaited first!");
14852                 }
14853                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_contest_delay(this_arg);
14854                 return nativeResponseValue;
14855         }
14856         // MUST_USE_RES bool DirectedChannelTransactionParameters_is_outbound(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14857         export function DirectedChannelTransactionParameters_is_outbound(this_arg: number): boolean {
14858                 if(!isWasmInitialized) {
14859                         throw new Error("initializeWasm() must be awaited first!");
14860                 }
14861                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_is_outbound(this_arg);
14862                 return nativeResponseValue;
14863         }
14864         // MUST_USE_RES struct LDKOutPoint DirectedChannelTransactionParameters_funding_outpoint(const struct LDKDirectedChannelTransactionParameters *NONNULL_PTR this_arg);
14865         export function DirectedChannelTransactionParameters_funding_outpoint(this_arg: number): number {
14866                 if(!isWasmInitialized) {
14867                         throw new Error("initializeWasm() must be awaited first!");
14868                 }
14869                 const nativeResponseValue = wasm.DirectedChannelTransactionParameters_funding_outpoint(this_arg);
14870                 return nativeResponseValue;
14871         }
14872         // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_obj);
14873         export function HolderCommitmentTransaction_free(this_obj: number): void {
14874                 if(!isWasmInitialized) {
14875                         throw new Error("initializeWasm() must be awaited first!");
14876                 }
14877                 const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_obj);
14878                 // debug statements here
14879         }
14880         // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
14881         export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
14882                 if(!isWasmInitialized) {
14883                         throw new Error("initializeWasm() must be awaited first!");
14884                 }
14885                 const nativeResponseValue = wasm.HolderCommitmentTransaction_get_counterparty_sig(this_ptr);
14886                 return decodeArray(nativeResponseValue);
14887         }
14888         // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
14889         export function HolderCommitmentTransaction_set_counterparty_sig(this_ptr: number, val: Uint8Array): void {
14890                 if(!isWasmInitialized) {
14891                         throw new Error("initializeWasm() must be awaited first!");
14892                 }
14893                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_sig(this_ptr, encodeArray(val));
14894                 // debug statements here
14895         }
14896         // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
14897         export function HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr: number, val: Uint8Array[]): void {
14898                 if(!isWasmInitialized) {
14899                         throw new Error("initializeWasm() must be awaited first!");
14900                 }
14901                 const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
14902                 // debug statements here
14903         }
14904         // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
14905         export function HolderCommitmentTransaction_clone(orig: number): number {
14906                 if(!isWasmInitialized) {
14907                         throw new Error("initializeWasm() must be awaited first!");
14908                 }
14909                 const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
14910                 return nativeResponseValue;
14911         }
14912         // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
14913         export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
14914                 if(!isWasmInitialized) {
14915                         throw new Error("initializeWasm() must be awaited first!");
14916                 }
14917                 const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
14918                 return decodeArray(nativeResponseValue);
14919         }
14920         // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
14921         export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
14922                 if(!isWasmInitialized) {
14923                         throw new Error("initializeWasm() must be awaited first!");
14924                 }
14925                 const nativeResponseValue = wasm.HolderCommitmentTransaction_read(encodeArray(ser));
14926                 return nativeResponseValue;
14927         }
14928         // 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);
14929         export function HolderCommitmentTransaction_new(commitment_tx: number, counterparty_sig: Uint8Array, counterparty_htlc_sigs: Uint8Array[], holder_funding_key: Uint8Array, counterparty_funding_key: Uint8Array): number {
14930                 if(!isWasmInitialized) {
14931                         throw new Error("initializeWasm() must be awaited first!");
14932                 }
14933                 const nativeResponseValue = wasm.HolderCommitmentTransaction_new(commitment_tx, encodeArray(counterparty_sig), counterparty_htlc_sigs, encodeArray(holder_funding_key), encodeArray(counterparty_funding_key));
14934                 return nativeResponseValue;
14935         }
14936         // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_obj);
14937         export function BuiltCommitmentTransaction_free(this_obj: number): void {
14938                 if(!isWasmInitialized) {
14939                         throw new Error("initializeWasm() must be awaited first!");
14940                 }
14941                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_obj);
14942                 // debug statements here
14943         }
14944         // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
14945         export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
14946                 if(!isWasmInitialized) {
14947                         throw new Error("initializeWasm() must be awaited first!");
14948                 }
14949                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_transaction(this_ptr);
14950                 return decodeArray(nativeResponseValue);
14951         }
14952         // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
14953         export function BuiltCommitmentTransaction_set_transaction(this_ptr: number, val: Uint8Array): void {
14954                 if(!isWasmInitialized) {
14955                         throw new Error("initializeWasm() must be awaited first!");
14956                 }
14957                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_transaction(this_ptr, encodeArray(val));
14958                 // debug statements here
14959         }
14960         // const uint8_t (*BuiltCommitmentTransaction_get_txid(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr))[32];
14961         export function BuiltCommitmentTransaction_get_txid(this_ptr: number): Uint8Array {
14962                 if(!isWasmInitialized) {
14963                         throw new Error("initializeWasm() must be awaited first!");
14964                 }
14965                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_txid(this_ptr);
14966                 return decodeArray(nativeResponseValue);
14967         }
14968         // void BuiltCommitmentTransaction_set_txid(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
14969         export function BuiltCommitmentTransaction_set_txid(this_ptr: number, val: Uint8Array): void {
14970                 if(!isWasmInitialized) {
14971                         throw new Error("initializeWasm() must be awaited first!");
14972                 }
14973                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_set_txid(this_ptr, encodeArray(val));
14974                 // debug statements here
14975         }
14976         // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
14977         export function BuiltCommitmentTransaction_new(transaction_arg: Uint8Array, txid_arg: Uint8Array): number {
14978                 if(!isWasmInitialized) {
14979                         throw new Error("initializeWasm() must be awaited first!");
14980                 }
14981                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
14982                 return nativeResponseValue;
14983         }
14984         // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
14985         export function BuiltCommitmentTransaction_clone(orig: number): number {
14986                 if(!isWasmInitialized) {
14987                         throw new Error("initializeWasm() must be awaited first!");
14988                 }
14989                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
14990                 return nativeResponseValue;
14991         }
14992         // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
14993         export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
14994                 if(!isWasmInitialized) {
14995                         throw new Error("initializeWasm() must be awaited first!");
14996                 }
14997                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
14998                 return decodeArray(nativeResponseValue);
14999         }
15000         // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
15001         export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
15002                 if(!isWasmInitialized) {
15003                         throw new Error("initializeWasm() must be awaited first!");
15004                 }
15005                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_read(encodeArray(ser));
15006                 return nativeResponseValue;
15007         }
15008         // 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);
15009         export function BuiltCommitmentTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
15010                 if(!isWasmInitialized) {
15011                         throw new Error("initializeWasm() must be awaited first!");
15012                 }
15013                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
15014                 return decodeArray(nativeResponseValue);
15015         }
15016         // 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);
15017         export function BuiltCommitmentTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
15018                 if(!isWasmInitialized) {
15019                         throw new Error("initializeWasm() must be awaited first!");
15020                 }
15021                 const nativeResponseValue = wasm.BuiltCommitmentTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
15022                 return decodeArray(nativeResponseValue);
15023         }
15024         // void ClosingTransaction_free(struct LDKClosingTransaction this_obj);
15025         export function ClosingTransaction_free(this_obj: number): void {
15026                 if(!isWasmInitialized) {
15027                         throw new Error("initializeWasm() must be awaited first!");
15028                 }
15029                 const nativeResponseValue = wasm.ClosingTransaction_free(this_obj);
15030                 // debug statements here
15031         }
15032         // struct LDKClosingTransaction ClosingTransaction_clone(const struct LDKClosingTransaction *NONNULL_PTR orig);
15033         export function ClosingTransaction_clone(orig: number): number {
15034                 if(!isWasmInitialized) {
15035                         throw new Error("initializeWasm() must be awaited first!");
15036                 }
15037                 const nativeResponseValue = wasm.ClosingTransaction_clone(orig);
15038                 return nativeResponseValue;
15039         }
15040         // uint64_t ClosingTransaction_hash(const struct LDKClosingTransaction *NONNULL_PTR o);
15041         export function ClosingTransaction_hash(o: number): number {
15042                 if(!isWasmInitialized) {
15043                         throw new Error("initializeWasm() must be awaited first!");
15044                 }
15045                 const nativeResponseValue = wasm.ClosingTransaction_hash(o);
15046                 return nativeResponseValue;
15047         }
15048         // 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);
15049         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 {
15050                 if(!isWasmInitialized) {
15051                         throw new Error("initializeWasm() must be awaited first!");
15052                 }
15053                 const nativeResponseValue = wasm.ClosingTransaction_new(to_holder_value_sat, to_counterparty_value_sat, encodeArray(to_holder_script), encodeArray(to_counterparty_script), funding_outpoint);
15054                 return nativeResponseValue;
15055         }
15056         // MUST_USE_RES struct LDKTrustedClosingTransaction ClosingTransaction_trust(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
15057         export function ClosingTransaction_trust(this_arg: number): number {
15058                 if(!isWasmInitialized) {
15059                         throw new Error("initializeWasm() must be awaited first!");
15060                 }
15061                 const nativeResponseValue = wasm.ClosingTransaction_trust(this_arg);
15062                 return nativeResponseValue;
15063         }
15064         // MUST_USE_RES struct LDKCResult_TrustedClosingTransactionNoneZ ClosingTransaction_verify(const struct LDKClosingTransaction *NONNULL_PTR this_arg, struct LDKOutPoint funding_outpoint);
15065         export function ClosingTransaction_verify(this_arg: number, funding_outpoint: number): number {
15066                 if(!isWasmInitialized) {
15067                         throw new Error("initializeWasm() must be awaited first!");
15068                 }
15069                 const nativeResponseValue = wasm.ClosingTransaction_verify(this_arg, funding_outpoint);
15070                 return nativeResponseValue;
15071         }
15072         // MUST_USE_RES uint64_t ClosingTransaction_to_holder_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
15073         export function ClosingTransaction_to_holder_value_sat(this_arg: number): number {
15074                 if(!isWasmInitialized) {
15075                         throw new Error("initializeWasm() must be awaited first!");
15076                 }
15077                 const nativeResponseValue = wasm.ClosingTransaction_to_holder_value_sat(this_arg);
15078                 return nativeResponseValue;
15079         }
15080         // MUST_USE_RES uint64_t ClosingTransaction_to_counterparty_value_sat(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
15081         export function ClosingTransaction_to_counterparty_value_sat(this_arg: number): number {
15082                 if(!isWasmInitialized) {
15083                         throw new Error("initializeWasm() must be awaited first!");
15084                 }
15085                 const nativeResponseValue = wasm.ClosingTransaction_to_counterparty_value_sat(this_arg);
15086                 return nativeResponseValue;
15087         }
15088         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_holder_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
15089         export function ClosingTransaction_to_holder_script(this_arg: number): Uint8Array {
15090                 if(!isWasmInitialized) {
15091                         throw new Error("initializeWasm() must be awaited first!");
15092                 }
15093                 const nativeResponseValue = wasm.ClosingTransaction_to_holder_script(this_arg);
15094                 return decodeArray(nativeResponseValue);
15095         }
15096         // MUST_USE_RES struct LDKu8slice ClosingTransaction_to_counterparty_script(const struct LDKClosingTransaction *NONNULL_PTR this_arg);
15097         export function ClosingTransaction_to_counterparty_script(this_arg: number): Uint8Array {
15098                 if(!isWasmInitialized) {
15099                         throw new Error("initializeWasm() must be awaited first!");
15100                 }
15101                 const nativeResponseValue = wasm.ClosingTransaction_to_counterparty_script(this_arg);
15102                 return decodeArray(nativeResponseValue);
15103         }
15104         // void TrustedClosingTransaction_free(struct LDKTrustedClosingTransaction this_obj);
15105         export function TrustedClosingTransaction_free(this_obj: number): void {
15106                 if(!isWasmInitialized) {
15107                         throw new Error("initializeWasm() must be awaited first!");
15108                 }
15109                 const nativeResponseValue = wasm.TrustedClosingTransaction_free(this_obj);
15110                 // debug statements here
15111         }
15112         // MUST_USE_RES struct LDKTransaction TrustedClosingTransaction_built_transaction(const struct LDKTrustedClosingTransaction *NONNULL_PTR this_arg);
15113         export function TrustedClosingTransaction_built_transaction(this_arg: number): Uint8Array {
15114                 if(!isWasmInitialized) {
15115                         throw new Error("initializeWasm() must be awaited first!");
15116                 }
15117                 const nativeResponseValue = wasm.TrustedClosingTransaction_built_transaction(this_arg);
15118                 return decodeArray(nativeResponseValue);
15119         }
15120         // 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);
15121         export function TrustedClosingTransaction_get_sighash_all(this_arg: number, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
15122                 if(!isWasmInitialized) {
15123                         throw new Error("initializeWasm() must be awaited first!");
15124                 }
15125                 const nativeResponseValue = wasm.TrustedClosingTransaction_get_sighash_all(this_arg, encodeArray(funding_redeemscript), channel_value_satoshis);
15126                 return decodeArray(nativeResponseValue);
15127         }
15128         // 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);
15129         export function TrustedClosingTransaction_sign(this_arg: number, funding_key: Uint8Array, funding_redeemscript: Uint8Array, channel_value_satoshis: number): Uint8Array {
15130                 if(!isWasmInitialized) {
15131                         throw new Error("initializeWasm() must be awaited first!");
15132                 }
15133                 const nativeResponseValue = wasm.TrustedClosingTransaction_sign(this_arg, encodeArray(funding_key), encodeArray(funding_redeemscript), channel_value_satoshis);
15134                 return decodeArray(nativeResponseValue);
15135         }
15136         // void CommitmentTransaction_free(struct LDKCommitmentTransaction this_obj);
15137         export function CommitmentTransaction_free(this_obj: number): void {
15138                 if(!isWasmInitialized) {
15139                         throw new Error("initializeWasm() must be awaited first!");
15140                 }
15141                 const nativeResponseValue = wasm.CommitmentTransaction_free(this_obj);
15142                 // debug statements here
15143         }
15144         // struct LDKCommitmentTransaction CommitmentTransaction_clone(const struct LDKCommitmentTransaction *NONNULL_PTR orig);
15145         export function CommitmentTransaction_clone(orig: number): number {
15146                 if(!isWasmInitialized) {
15147                         throw new Error("initializeWasm() must be awaited first!");
15148                 }
15149                 const nativeResponseValue = wasm.CommitmentTransaction_clone(orig);
15150                 return nativeResponseValue;
15151         }
15152         // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
15153         export function CommitmentTransaction_write(obj: number): Uint8Array {
15154                 if(!isWasmInitialized) {
15155                         throw new Error("initializeWasm() must be awaited first!");
15156                 }
15157                 const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
15158                 return decodeArray(nativeResponseValue);
15159         }
15160         // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
15161         export function CommitmentTransaction_read(ser: Uint8Array): number {
15162                 if(!isWasmInitialized) {
15163                         throw new Error("initializeWasm() must be awaited first!");
15164                 }
15165                 const nativeResponseValue = wasm.CommitmentTransaction_read(encodeArray(ser));
15166                 return nativeResponseValue;
15167         }
15168         // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
15169         export function CommitmentTransaction_commitment_number(this_arg: number): number {
15170                 if(!isWasmInitialized) {
15171                         throw new Error("initializeWasm() must be awaited first!");
15172                 }
15173                 const nativeResponseValue = wasm.CommitmentTransaction_commitment_number(this_arg);
15174                 return nativeResponseValue;
15175         }
15176         // MUST_USE_RES uint64_t CommitmentTransaction_to_broadcaster_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
15177         export function CommitmentTransaction_to_broadcaster_value_sat(this_arg: number): number {
15178                 if(!isWasmInitialized) {
15179                         throw new Error("initializeWasm() must be awaited first!");
15180                 }
15181                 const nativeResponseValue = wasm.CommitmentTransaction_to_broadcaster_value_sat(this_arg);
15182                 return nativeResponseValue;
15183         }
15184         // MUST_USE_RES uint64_t CommitmentTransaction_to_countersignatory_value_sat(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
15185         export function CommitmentTransaction_to_countersignatory_value_sat(this_arg: number): number {
15186                 if(!isWasmInitialized) {
15187                         throw new Error("initializeWasm() must be awaited first!");
15188                 }
15189                 const nativeResponseValue = wasm.CommitmentTransaction_to_countersignatory_value_sat(this_arg);
15190                 return nativeResponseValue;
15191         }
15192         // MUST_USE_RES uint32_t CommitmentTransaction_feerate_per_kw(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
15193         export function CommitmentTransaction_feerate_per_kw(this_arg: number): number {
15194                 if(!isWasmInitialized) {
15195                         throw new Error("initializeWasm() must be awaited first!");
15196                 }
15197                 const nativeResponseValue = wasm.CommitmentTransaction_feerate_per_kw(this_arg);
15198                 return nativeResponseValue;
15199         }
15200         // MUST_USE_RES struct LDKTrustedCommitmentTransaction CommitmentTransaction_trust(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
15201         export function CommitmentTransaction_trust(this_arg: number): number {
15202                 if(!isWasmInitialized) {
15203                         throw new Error("initializeWasm() must be awaited first!");
15204                 }
15205                 const nativeResponseValue = wasm.CommitmentTransaction_trust(this_arg);
15206                 return nativeResponseValue;
15207         }
15208         // 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);
15209         export function CommitmentTransaction_verify(this_arg: number, channel_parameters: number, broadcaster_keys: number, countersignatory_keys: number): number {
15210                 if(!isWasmInitialized) {
15211                         throw new Error("initializeWasm() must be awaited first!");
15212                 }
15213                 const nativeResponseValue = wasm.CommitmentTransaction_verify(this_arg, channel_parameters, broadcaster_keys, countersignatory_keys);
15214                 return nativeResponseValue;
15215         }
15216         // void TrustedCommitmentTransaction_free(struct LDKTrustedCommitmentTransaction this_obj);
15217         export function TrustedCommitmentTransaction_free(this_obj: number): void {
15218                 if(!isWasmInitialized) {
15219                         throw new Error("initializeWasm() must be awaited first!");
15220                 }
15221                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_free(this_obj);
15222                 // debug statements here
15223         }
15224         // MUST_USE_RES struct LDKThirtyTwoBytes TrustedCommitmentTransaction_txid(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
15225         export function TrustedCommitmentTransaction_txid(this_arg: number): Uint8Array {
15226                 if(!isWasmInitialized) {
15227                         throw new Error("initializeWasm() must be awaited first!");
15228                 }
15229                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_txid(this_arg);
15230                 return decodeArray(nativeResponseValue);
15231         }
15232         // MUST_USE_RES struct LDKBuiltCommitmentTransaction TrustedCommitmentTransaction_built_transaction(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
15233         export function TrustedCommitmentTransaction_built_transaction(this_arg: number): number {
15234                 if(!isWasmInitialized) {
15235                         throw new Error("initializeWasm() must be awaited first!");
15236                 }
15237                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_built_transaction(this_arg);
15238                 return nativeResponseValue;
15239         }
15240         // MUST_USE_RES struct LDKTxCreationKeys TrustedCommitmentTransaction_keys(const struct LDKTrustedCommitmentTransaction *NONNULL_PTR this_arg);
15241         export function TrustedCommitmentTransaction_keys(this_arg: number): number {
15242                 if(!isWasmInitialized) {
15243                         throw new Error("initializeWasm() must be awaited first!");
15244                 }
15245                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_keys(this_arg);
15246                 return nativeResponseValue;
15247         }
15248         // 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);
15249         export function TrustedCommitmentTransaction_get_htlc_sigs(this_arg: number, htlc_base_key: Uint8Array, channel_parameters: number): number {
15250                 if(!isWasmInitialized) {
15251                         throw new Error("initializeWasm() must be awaited first!");
15252                 }
15253                 const nativeResponseValue = wasm.TrustedCommitmentTransaction_get_htlc_sigs(this_arg, encodeArray(htlc_base_key), channel_parameters);
15254                 return nativeResponseValue;
15255         }
15256         // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
15257         export function get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: Uint8Array, countersignatory_payment_basepoint: Uint8Array, outbound_from_broadcaster: boolean): number {
15258                 if(!isWasmInitialized) {
15259                         throw new Error("initializeWasm() must be awaited first!");
15260                 }
15261                 const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
15262                 return nativeResponseValue;
15263         }
15264         // bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b);
15265         export function InitFeatures_eq(a: number, b: number): boolean {
15266                 if(!isWasmInitialized) {
15267                         throw new Error("initializeWasm() must be awaited first!");
15268                 }
15269                 const nativeResponseValue = wasm.InitFeatures_eq(a, b);
15270                 return nativeResponseValue;
15271         }
15272         // bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b);
15273         export function NodeFeatures_eq(a: number, b: number): boolean {
15274                 if(!isWasmInitialized) {
15275                         throw new Error("initializeWasm() must be awaited first!");
15276                 }
15277                 const nativeResponseValue = wasm.NodeFeatures_eq(a, b);
15278                 return nativeResponseValue;
15279         }
15280         // bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b);
15281         export function ChannelFeatures_eq(a: number, b: number): boolean {
15282                 if(!isWasmInitialized) {
15283                         throw new Error("initializeWasm() must be awaited first!");
15284                 }
15285                 const nativeResponseValue = wasm.ChannelFeatures_eq(a, b);
15286                 return nativeResponseValue;
15287         }
15288         // bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b);
15289         export function InvoiceFeatures_eq(a: number, b: number): boolean {
15290                 if(!isWasmInitialized) {
15291                         throw new Error("initializeWasm() must be awaited first!");
15292                 }
15293                 const nativeResponseValue = wasm.InvoiceFeatures_eq(a, b);
15294                 return nativeResponseValue;
15295         }
15296         // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
15297         export function InitFeatures_clone(orig: number): number {
15298                 if(!isWasmInitialized) {
15299                         throw new Error("initializeWasm() must be awaited first!");
15300                 }
15301                 const nativeResponseValue = wasm.InitFeatures_clone(orig);
15302                 return nativeResponseValue;
15303         }
15304         // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
15305         export function NodeFeatures_clone(orig: number): number {
15306                 if(!isWasmInitialized) {
15307                         throw new Error("initializeWasm() must be awaited first!");
15308                 }
15309                 const nativeResponseValue = wasm.NodeFeatures_clone(orig);
15310                 return nativeResponseValue;
15311         }
15312         // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
15313         export function ChannelFeatures_clone(orig: number): number {
15314                 if(!isWasmInitialized) {
15315                         throw new Error("initializeWasm() must be awaited first!");
15316                 }
15317                 const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
15318                 return nativeResponseValue;
15319         }
15320         // struct LDKInvoiceFeatures InvoiceFeatures_clone(const struct LDKInvoiceFeatures *NONNULL_PTR orig);
15321         export function InvoiceFeatures_clone(orig: number): number {
15322                 if(!isWasmInitialized) {
15323                         throw new Error("initializeWasm() must be awaited first!");
15324                 }
15325                 const nativeResponseValue = wasm.InvoiceFeatures_clone(orig);
15326                 return nativeResponseValue;
15327         }
15328         // void InitFeatures_free(struct LDKInitFeatures this_obj);
15329         export function InitFeatures_free(this_obj: number): void {
15330                 if(!isWasmInitialized) {
15331                         throw new Error("initializeWasm() must be awaited first!");
15332                 }
15333                 const nativeResponseValue = wasm.InitFeatures_free(this_obj);
15334                 // debug statements here
15335         }
15336         // void NodeFeatures_free(struct LDKNodeFeatures this_obj);
15337         export function NodeFeatures_free(this_obj: number): void {
15338                 if(!isWasmInitialized) {
15339                         throw new Error("initializeWasm() must be awaited first!");
15340                 }
15341                 const nativeResponseValue = wasm.NodeFeatures_free(this_obj);
15342                 // debug statements here
15343         }
15344         // void ChannelFeatures_free(struct LDKChannelFeatures this_obj);
15345         export function ChannelFeatures_free(this_obj: number): void {
15346                 if(!isWasmInitialized) {
15347                         throw new Error("initializeWasm() must be awaited first!");
15348                 }
15349                 const nativeResponseValue = wasm.ChannelFeatures_free(this_obj);
15350                 // debug statements here
15351         }
15352         // void InvoiceFeatures_free(struct LDKInvoiceFeatures this_obj);
15353         export function InvoiceFeatures_free(this_obj: number): void {
15354                 if(!isWasmInitialized) {
15355                         throw new Error("initializeWasm() must be awaited first!");
15356                 }
15357                 const nativeResponseValue = wasm.InvoiceFeatures_free(this_obj);
15358                 // debug statements here
15359         }
15360         // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
15361         export function InitFeatures_empty(): number {
15362                 if(!isWasmInitialized) {
15363                         throw new Error("initializeWasm() must be awaited first!");
15364                 }
15365                 const nativeResponseValue = wasm.InitFeatures_empty();
15366                 return nativeResponseValue;
15367         }
15368         // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
15369         export function InitFeatures_known(): number {
15370                 if(!isWasmInitialized) {
15371                         throw new Error("initializeWasm() must be awaited first!");
15372                 }
15373                 const nativeResponseValue = wasm.InitFeatures_known();
15374                 return nativeResponseValue;
15375         }
15376         // MUST_USE_RES bool InitFeatures_requires_unknown_bits(const struct LDKInitFeatures *NONNULL_PTR this_arg);
15377         export function InitFeatures_requires_unknown_bits(this_arg: number): boolean {
15378                 if(!isWasmInitialized) {
15379                         throw new Error("initializeWasm() must be awaited first!");
15380                 }
15381                 const nativeResponseValue = wasm.InitFeatures_requires_unknown_bits(this_arg);
15382                 return nativeResponseValue;
15383         }
15384         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
15385         export function NodeFeatures_empty(): number {
15386                 if(!isWasmInitialized) {
15387                         throw new Error("initializeWasm() must be awaited first!");
15388                 }
15389                 const nativeResponseValue = wasm.NodeFeatures_empty();
15390                 return nativeResponseValue;
15391         }
15392         // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
15393         export function NodeFeatures_known(): number {
15394                 if(!isWasmInitialized) {
15395                         throw new Error("initializeWasm() must be awaited first!");
15396                 }
15397                 const nativeResponseValue = wasm.NodeFeatures_known();
15398                 return nativeResponseValue;
15399         }
15400         // MUST_USE_RES bool NodeFeatures_requires_unknown_bits(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
15401         export function NodeFeatures_requires_unknown_bits(this_arg: number): boolean {
15402                 if(!isWasmInitialized) {
15403                         throw new Error("initializeWasm() must be awaited first!");
15404                 }
15405                 const nativeResponseValue = wasm.NodeFeatures_requires_unknown_bits(this_arg);
15406                 return nativeResponseValue;
15407         }
15408         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
15409         export function ChannelFeatures_empty(): number {
15410                 if(!isWasmInitialized) {
15411                         throw new Error("initializeWasm() must be awaited first!");
15412                 }
15413                 const nativeResponseValue = wasm.ChannelFeatures_empty();
15414                 return nativeResponseValue;
15415         }
15416         // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
15417         export function ChannelFeatures_known(): number {
15418                 if(!isWasmInitialized) {
15419                         throw new Error("initializeWasm() must be awaited first!");
15420                 }
15421                 const nativeResponseValue = wasm.ChannelFeatures_known();
15422                 return nativeResponseValue;
15423         }
15424         // MUST_USE_RES bool ChannelFeatures_requires_unknown_bits(const struct LDKChannelFeatures *NONNULL_PTR this_arg);
15425         export function ChannelFeatures_requires_unknown_bits(this_arg: number): boolean {
15426                 if(!isWasmInitialized) {
15427                         throw new Error("initializeWasm() must be awaited first!");
15428                 }
15429                 const nativeResponseValue = wasm.ChannelFeatures_requires_unknown_bits(this_arg);
15430                 return nativeResponseValue;
15431         }
15432         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void);
15433         export function InvoiceFeatures_empty(): number {
15434                 if(!isWasmInitialized) {
15435                         throw new Error("initializeWasm() must be awaited first!");
15436                 }
15437                 const nativeResponseValue = wasm.InvoiceFeatures_empty();
15438                 return nativeResponseValue;
15439         }
15440         // MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void);
15441         export function InvoiceFeatures_known(): number {
15442                 if(!isWasmInitialized) {
15443                         throw new Error("initializeWasm() must be awaited first!");
15444                 }
15445                 const nativeResponseValue = wasm.InvoiceFeatures_known();
15446                 return nativeResponseValue;
15447         }
15448         // MUST_USE_RES bool InvoiceFeatures_requires_unknown_bits(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
15449         export function InvoiceFeatures_requires_unknown_bits(this_arg: number): boolean {
15450                 if(!isWasmInitialized) {
15451                         throw new Error("initializeWasm() must be awaited first!");
15452                 }
15453                 const nativeResponseValue = wasm.InvoiceFeatures_requires_unknown_bits(this_arg);
15454                 return nativeResponseValue;
15455         }
15456         // MUST_USE_RES bool InitFeatures_supports_payment_secret(const struct LDKInitFeatures *NONNULL_PTR this_arg);
15457         export function InitFeatures_supports_payment_secret(this_arg: number): boolean {
15458                 if(!isWasmInitialized) {
15459                         throw new Error("initializeWasm() must be awaited first!");
15460                 }
15461                 const nativeResponseValue = wasm.InitFeatures_supports_payment_secret(this_arg);
15462                 return nativeResponseValue;
15463         }
15464         // MUST_USE_RES bool NodeFeatures_supports_payment_secret(const struct LDKNodeFeatures *NONNULL_PTR this_arg);
15465         export function NodeFeatures_supports_payment_secret(this_arg: number): boolean {
15466                 if(!isWasmInitialized) {
15467                         throw new Error("initializeWasm() must be awaited first!");
15468                 }
15469                 const nativeResponseValue = wasm.NodeFeatures_supports_payment_secret(this_arg);
15470                 return nativeResponseValue;
15471         }
15472         // MUST_USE_RES bool InvoiceFeatures_supports_payment_secret(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg);
15473         export function InvoiceFeatures_supports_payment_secret(this_arg: number): boolean {
15474                 if(!isWasmInitialized) {
15475                         throw new Error("initializeWasm() must be awaited first!");
15476                 }
15477                 const nativeResponseValue = wasm.InvoiceFeatures_supports_payment_secret(this_arg);
15478                 return nativeResponseValue;
15479         }
15480         // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
15481         export function InitFeatures_write(obj: number): Uint8Array {
15482                 if(!isWasmInitialized) {
15483                         throw new Error("initializeWasm() must be awaited first!");
15484                 }
15485                 const nativeResponseValue = wasm.InitFeatures_write(obj);
15486                 return decodeArray(nativeResponseValue);
15487         }
15488         // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
15489         export function NodeFeatures_write(obj: number): Uint8Array {
15490                 if(!isWasmInitialized) {
15491                         throw new Error("initializeWasm() must be awaited first!");
15492                 }
15493                 const nativeResponseValue = wasm.NodeFeatures_write(obj);
15494                 return decodeArray(nativeResponseValue);
15495         }
15496         // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
15497         export function ChannelFeatures_write(obj: number): Uint8Array {
15498                 if(!isWasmInitialized) {
15499                         throw new Error("initializeWasm() must be awaited first!");
15500                 }
15501                 const nativeResponseValue = wasm.ChannelFeatures_write(obj);
15502                 return decodeArray(nativeResponseValue);
15503         }
15504         // struct LDKCVec_u8Z InvoiceFeatures_write(const struct LDKInvoiceFeatures *NONNULL_PTR obj);
15505         export function InvoiceFeatures_write(obj: number): Uint8Array {
15506                 if(!isWasmInitialized) {
15507                         throw new Error("initializeWasm() must be awaited first!");
15508                 }
15509                 const nativeResponseValue = wasm.InvoiceFeatures_write(obj);
15510                 return decodeArray(nativeResponseValue);
15511         }
15512         // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
15513         export function InitFeatures_read(ser: Uint8Array): number {
15514                 if(!isWasmInitialized) {
15515                         throw new Error("initializeWasm() must be awaited first!");
15516                 }
15517                 const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
15518                 return nativeResponseValue;
15519         }
15520         // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
15521         export function NodeFeatures_read(ser: Uint8Array): number {
15522                 if(!isWasmInitialized) {
15523                         throw new Error("initializeWasm() must be awaited first!");
15524                 }
15525                 const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
15526                 return nativeResponseValue;
15527         }
15528         // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
15529         export function ChannelFeatures_read(ser: Uint8Array): number {
15530                 if(!isWasmInitialized) {
15531                         throw new Error("initializeWasm() must be awaited first!");
15532                 }
15533                 const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
15534                 return nativeResponseValue;
15535         }
15536         // struct LDKCResult_InvoiceFeaturesDecodeErrorZ InvoiceFeatures_read(struct LDKu8slice ser);
15537         export function InvoiceFeatures_read(ser: Uint8Array): number {
15538                 if(!isWasmInitialized) {
15539                         throw new Error("initializeWasm() must be awaited first!");
15540                 }
15541                 const nativeResponseValue = wasm.InvoiceFeatures_read(encodeArray(ser));
15542                 return nativeResponseValue;
15543         }
15544         // void ShutdownScript_free(struct LDKShutdownScript this_obj);
15545         export function ShutdownScript_free(this_obj: number): void {
15546                 if(!isWasmInitialized) {
15547                         throw new Error("initializeWasm() must be awaited first!");
15548                 }
15549                 const nativeResponseValue = wasm.ShutdownScript_free(this_obj);
15550                 // debug statements here
15551         }
15552         // struct LDKShutdownScript ShutdownScript_clone(const struct LDKShutdownScript *NONNULL_PTR orig);
15553         export function ShutdownScript_clone(orig: number): number {
15554                 if(!isWasmInitialized) {
15555                         throw new Error("initializeWasm() must be awaited first!");
15556                 }
15557                 const nativeResponseValue = wasm.ShutdownScript_clone(orig);
15558                 return nativeResponseValue;
15559         }
15560         // void InvalidShutdownScript_free(struct LDKInvalidShutdownScript this_obj);
15561         export function InvalidShutdownScript_free(this_obj: number): void {
15562                 if(!isWasmInitialized) {
15563                         throw new Error("initializeWasm() must be awaited first!");
15564                 }
15565                 const nativeResponseValue = wasm.InvalidShutdownScript_free(this_obj);
15566                 // debug statements here
15567         }
15568         // struct LDKu8slice InvalidShutdownScript_get_script(const struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr);
15569         export function InvalidShutdownScript_get_script(this_ptr: number): Uint8Array {
15570                 if(!isWasmInitialized) {
15571                         throw new Error("initializeWasm() must be awaited first!");
15572                 }
15573                 const nativeResponseValue = wasm.InvalidShutdownScript_get_script(this_ptr);
15574                 return decodeArray(nativeResponseValue);
15575         }
15576         // void InvalidShutdownScript_set_script(struct LDKInvalidShutdownScript *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
15577         export function InvalidShutdownScript_set_script(this_ptr: number, val: Uint8Array): void {
15578                 if(!isWasmInitialized) {
15579                         throw new Error("initializeWasm() must be awaited first!");
15580                 }
15581                 const nativeResponseValue = wasm.InvalidShutdownScript_set_script(this_ptr, encodeArray(val));
15582                 // debug statements here
15583         }
15584         // MUST_USE_RES struct LDKInvalidShutdownScript InvalidShutdownScript_new(struct LDKCVec_u8Z script_arg);
15585         export function InvalidShutdownScript_new(script_arg: Uint8Array): number {
15586                 if(!isWasmInitialized) {
15587                         throw new Error("initializeWasm() must be awaited first!");
15588                 }
15589                 const nativeResponseValue = wasm.InvalidShutdownScript_new(encodeArray(script_arg));
15590                 return nativeResponseValue;
15591         }
15592         // struct LDKInvalidShutdownScript InvalidShutdownScript_clone(const struct LDKInvalidShutdownScript *NONNULL_PTR orig);
15593         export function InvalidShutdownScript_clone(orig: number): number {
15594                 if(!isWasmInitialized) {
15595                         throw new Error("initializeWasm() must be awaited first!");
15596                 }
15597                 const nativeResponseValue = wasm.InvalidShutdownScript_clone(orig);
15598                 return nativeResponseValue;
15599         }
15600         // struct LDKCVec_u8Z ShutdownScript_write(const struct LDKShutdownScript *NONNULL_PTR obj);
15601         export function ShutdownScript_write(obj: number): Uint8Array {
15602                 if(!isWasmInitialized) {
15603                         throw new Error("initializeWasm() must be awaited first!");
15604                 }
15605                 const nativeResponseValue = wasm.ShutdownScript_write(obj);
15606                 return decodeArray(nativeResponseValue);
15607         }
15608         // struct LDKCResult_ShutdownScriptDecodeErrorZ ShutdownScript_read(struct LDKu8slice ser);
15609         export function ShutdownScript_read(ser: Uint8Array): number {
15610                 if(!isWasmInitialized) {
15611                         throw new Error("initializeWasm() must be awaited first!");
15612                 }
15613                 const nativeResponseValue = wasm.ShutdownScript_read(encodeArray(ser));
15614                 return nativeResponseValue;
15615         }
15616         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wpkh(const uint8_t (*pubkey_hash)[20]);
15617         export function ShutdownScript_new_p2wpkh(pubkey_hash: Uint8Array): number {
15618                 if(!isWasmInitialized) {
15619                         throw new Error("initializeWasm() must be awaited first!");
15620                 }
15621                 const nativeResponseValue = wasm.ShutdownScript_new_p2wpkh(encodeArray(pubkey_hash));
15622                 return nativeResponseValue;
15623         }
15624         // MUST_USE_RES struct LDKShutdownScript ShutdownScript_new_p2wsh(const uint8_t (*script_hash)[32]);
15625         export function ShutdownScript_new_p2wsh(script_hash: Uint8Array): number {
15626                 if(!isWasmInitialized) {
15627                         throw new Error("initializeWasm() must be awaited first!");
15628                 }
15629                 const nativeResponseValue = wasm.ShutdownScript_new_p2wsh(encodeArray(script_hash));
15630                 return nativeResponseValue;
15631         }
15632         // MUST_USE_RES struct LDKCResult_ShutdownScriptInvalidShutdownScriptZ ShutdownScript_new_witness_program(uint8_t version, struct LDKu8slice program);
15633         export function ShutdownScript_new_witness_program(version: number, program: Uint8Array): number {
15634                 if(!isWasmInitialized) {
15635                         throw new Error("initializeWasm() must be awaited first!");
15636                 }
15637                 const nativeResponseValue = wasm.ShutdownScript_new_witness_program(version, encodeArray(program));
15638                 return nativeResponseValue;
15639         }
15640         // MUST_USE_RES struct LDKCVec_u8Z ShutdownScript_into_inner(struct LDKShutdownScript this_arg);
15641         export function ShutdownScript_into_inner(this_arg: number): Uint8Array {
15642                 if(!isWasmInitialized) {
15643                         throw new Error("initializeWasm() must be awaited first!");
15644                 }
15645                 const nativeResponseValue = wasm.ShutdownScript_into_inner(this_arg);
15646                 return decodeArray(nativeResponseValue);
15647         }
15648         // MUST_USE_RES struct LDKPublicKey ShutdownScript_as_legacy_pubkey(const struct LDKShutdownScript *NONNULL_PTR this_arg);
15649         export function ShutdownScript_as_legacy_pubkey(this_arg: number): Uint8Array {
15650                 if(!isWasmInitialized) {
15651                         throw new Error("initializeWasm() must be awaited first!");
15652                 }
15653                 const nativeResponseValue = wasm.ShutdownScript_as_legacy_pubkey(this_arg);
15654                 return decodeArray(nativeResponseValue);
15655         }
15656         // MUST_USE_RES bool ShutdownScript_is_compatible(const struct LDKShutdownScript *NONNULL_PTR this_arg, const struct LDKInitFeatures *NONNULL_PTR features);
15657         export function ShutdownScript_is_compatible(this_arg: number, features: number): boolean {
15658                 if(!isWasmInitialized) {
15659                         throw new Error("initializeWasm() must be awaited first!");
15660                 }
15661                 const nativeResponseValue = wasm.ShutdownScript_is_compatible(this_arg, features);
15662                 return nativeResponseValue;
15663         }
15664         // void CustomMessageReader_free(struct LDKCustomMessageReader this_ptr);
15665         export function CustomMessageReader_free(this_ptr: number): void {
15666                 if(!isWasmInitialized) {
15667                         throw new Error("initializeWasm() must be awaited first!");
15668                 }
15669                 const nativeResponseValue = wasm.CustomMessageReader_free(this_ptr);
15670                 // debug statements here
15671         }
15672         // struct LDKType Type_clone(const struct LDKType *NONNULL_PTR orig);
15673         export function Type_clone(orig: number): number {
15674                 if(!isWasmInitialized) {
15675                         throw new Error("initializeWasm() must be awaited first!");
15676                 }
15677                 const nativeResponseValue = wasm.Type_clone(orig);
15678                 return nativeResponseValue;
15679         }
15680         // void Type_free(struct LDKType this_ptr);
15681         export function Type_free(this_ptr: number): void {
15682                 if(!isWasmInitialized) {
15683                         throw new Error("initializeWasm() must be awaited first!");
15684                 }
15685                 const nativeResponseValue = wasm.Type_free(this_ptr);
15686                 // debug statements here
15687         }
15688         // void Score_free(struct LDKScore this_ptr);
15689         export function Score_free(this_ptr: number): void {
15690                 if(!isWasmInitialized) {
15691                         throw new Error("initializeWasm() must be awaited first!");
15692                 }
15693                 const nativeResponseValue = wasm.Score_free(this_ptr);
15694                 // debug statements here
15695         }
15696         // void NodeId_free(struct LDKNodeId this_obj);
15697         export function NodeId_free(this_obj: number): void {
15698                 if(!isWasmInitialized) {
15699                         throw new Error("initializeWasm() must be awaited first!");
15700                 }
15701                 const nativeResponseValue = wasm.NodeId_free(this_obj);
15702                 // debug statements here
15703         }
15704         // struct LDKNodeId NodeId_clone(const struct LDKNodeId *NONNULL_PTR orig);
15705         export function NodeId_clone(orig: number): number {
15706                 if(!isWasmInitialized) {
15707                         throw new Error("initializeWasm() must be awaited first!");
15708                 }
15709                 const nativeResponseValue = wasm.NodeId_clone(orig);
15710                 return nativeResponseValue;
15711         }
15712         // MUST_USE_RES struct LDKNodeId NodeId_from_pubkey(struct LDKPublicKey pubkey);
15713         export function NodeId_from_pubkey(pubkey: Uint8Array): number {
15714                 if(!isWasmInitialized) {
15715                         throw new Error("initializeWasm() must be awaited first!");
15716                 }
15717                 const nativeResponseValue = wasm.NodeId_from_pubkey(encodeArray(pubkey));
15718                 return nativeResponseValue;
15719         }
15720         // MUST_USE_RES struct LDKu8slice NodeId_as_slice(const struct LDKNodeId *NONNULL_PTR this_arg);
15721         export function NodeId_as_slice(this_arg: number): Uint8Array {
15722                 if(!isWasmInitialized) {
15723                         throw new Error("initializeWasm() must be awaited first!");
15724                 }
15725                 const nativeResponseValue = wasm.NodeId_as_slice(this_arg);
15726                 return decodeArray(nativeResponseValue);
15727         }
15728         // uint64_t NodeId_hash(const struct LDKNodeId *NONNULL_PTR o);
15729         export function NodeId_hash(o: number): number {
15730                 if(!isWasmInitialized) {
15731                         throw new Error("initializeWasm() must be awaited first!");
15732                 }
15733                 const nativeResponseValue = wasm.NodeId_hash(o);
15734                 return nativeResponseValue;
15735         }
15736         // struct LDKCVec_u8Z NodeId_write(const struct LDKNodeId *NONNULL_PTR obj);
15737         export function NodeId_write(obj: number): Uint8Array {
15738                 if(!isWasmInitialized) {
15739                         throw new Error("initializeWasm() must be awaited first!");
15740                 }
15741                 const nativeResponseValue = wasm.NodeId_write(obj);
15742                 return decodeArray(nativeResponseValue);
15743         }
15744         // struct LDKCResult_NodeIdDecodeErrorZ NodeId_read(struct LDKu8slice ser);
15745         export function NodeId_read(ser: Uint8Array): number {
15746                 if(!isWasmInitialized) {
15747                         throw new Error("initializeWasm() must be awaited first!");
15748                 }
15749                 const nativeResponseValue = wasm.NodeId_read(encodeArray(ser));
15750                 return nativeResponseValue;
15751         }
15752         // void NetworkGraph_free(struct LDKNetworkGraph this_obj);
15753         export function NetworkGraph_free(this_obj: number): void {
15754                 if(!isWasmInitialized) {
15755                         throw new Error("initializeWasm() must be awaited first!");
15756                 }
15757                 const nativeResponseValue = wasm.NetworkGraph_free(this_obj);
15758                 // debug statements here
15759         }
15760         // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
15761         export function NetworkGraph_clone(orig: number): number {
15762                 if(!isWasmInitialized) {
15763                         throw new Error("initializeWasm() must be awaited first!");
15764                 }
15765                 const nativeResponseValue = wasm.NetworkGraph_clone(orig);
15766                 return nativeResponseValue;
15767         }
15768         // void ReadOnlyNetworkGraph_free(struct LDKReadOnlyNetworkGraph this_obj);
15769         export function ReadOnlyNetworkGraph_free(this_obj: number): void {
15770                 if(!isWasmInitialized) {
15771                         throw new Error("initializeWasm() must be awaited first!");
15772                 }
15773                 const nativeResponseValue = wasm.ReadOnlyNetworkGraph_free(this_obj);
15774                 // debug statements here
15775         }
15776         // void NetworkUpdate_free(struct LDKNetworkUpdate this_ptr);
15777         export function NetworkUpdate_free(this_ptr: number): void {
15778                 if(!isWasmInitialized) {
15779                         throw new Error("initializeWasm() must be awaited first!");
15780                 }
15781                 const nativeResponseValue = wasm.NetworkUpdate_free(this_ptr);
15782                 // debug statements here
15783         }
15784         // struct LDKNetworkUpdate NetworkUpdate_clone(const struct LDKNetworkUpdate *NONNULL_PTR orig);
15785         export function NetworkUpdate_clone(orig: number): number {
15786                 if(!isWasmInitialized) {
15787                         throw new Error("initializeWasm() must be awaited first!");
15788                 }
15789                 const nativeResponseValue = wasm.NetworkUpdate_clone(orig);
15790                 return nativeResponseValue;
15791         }
15792         // struct LDKNetworkUpdate NetworkUpdate_channel_update_message(struct LDKChannelUpdate msg);
15793         export function NetworkUpdate_channel_update_message(msg: number): number {
15794                 if(!isWasmInitialized) {
15795                         throw new Error("initializeWasm() must be awaited first!");
15796                 }
15797                 const nativeResponseValue = wasm.NetworkUpdate_channel_update_message(msg);
15798                 return nativeResponseValue;
15799         }
15800         // struct LDKNetworkUpdate NetworkUpdate_channel_closed(uint64_t short_channel_id, bool is_permanent);
15801         export function NetworkUpdate_channel_closed(short_channel_id: number, is_permanent: boolean): number {
15802                 if(!isWasmInitialized) {
15803                         throw new Error("initializeWasm() must be awaited first!");
15804                 }
15805                 const nativeResponseValue = wasm.NetworkUpdate_channel_closed(short_channel_id, is_permanent);
15806                 return nativeResponseValue;
15807         }
15808         // struct LDKNetworkUpdate NetworkUpdate_node_failure(struct LDKPublicKey node_id, bool is_permanent);
15809         export function NetworkUpdate_node_failure(node_id: Uint8Array, is_permanent: boolean): number {
15810                 if(!isWasmInitialized) {
15811                         throw new Error("initializeWasm() must be awaited first!");
15812                 }
15813                 const nativeResponseValue = wasm.NetworkUpdate_node_failure(encodeArray(node_id), is_permanent);
15814                 return nativeResponseValue;
15815         }
15816         // struct LDKCVec_u8Z NetworkUpdate_write(const struct LDKNetworkUpdate *NONNULL_PTR obj);
15817         export function NetworkUpdate_write(obj: number): Uint8Array {
15818                 if(!isWasmInitialized) {
15819                         throw new Error("initializeWasm() must be awaited first!");
15820                 }
15821                 const nativeResponseValue = wasm.NetworkUpdate_write(obj);
15822                 return decodeArray(nativeResponseValue);
15823         }
15824         // struct LDKEventHandler NetGraphMsgHandler_as_EventHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
15825         export function NetGraphMsgHandler_as_EventHandler(this_arg: number): number {
15826                 if(!isWasmInitialized) {
15827                         throw new Error("initializeWasm() must be awaited first!");
15828                 }
15829                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_EventHandler(this_arg);
15830                 return nativeResponseValue;
15831         }
15832         // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_obj);
15833         export function NetGraphMsgHandler_free(this_obj: number): void {
15834                 if(!isWasmInitialized) {
15835                         throw new Error("initializeWasm() must be awaited first!");
15836                 }
15837                 const nativeResponseValue = wasm.NetGraphMsgHandler_free(this_obj);
15838                 // debug statements here
15839         }
15840         // struct LDKNetworkGraph NetGraphMsgHandler_get_network_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_ptr);
15841         export function NetGraphMsgHandler_get_network_graph(this_ptr: number): number {
15842                 if(!isWasmInitialized) {
15843                         throw new Error("initializeWasm() must be awaited first!");
15844                 }
15845                 const nativeResponseValue = wasm.NetGraphMsgHandler_get_network_graph(this_ptr);
15846                 return nativeResponseValue;
15847         }
15848         // void NetGraphMsgHandler_set_network_graph(struct LDKNetGraphMsgHandler *NONNULL_PTR this_ptr, struct LDKNetworkGraph val);
15849         export function NetGraphMsgHandler_set_network_graph(this_ptr: number, val: number): void {
15850                 if(!isWasmInitialized) {
15851                         throw new Error("initializeWasm() must be awaited first!");
15852                 }
15853                 const nativeResponseValue = wasm.NetGraphMsgHandler_set_network_graph(this_ptr, val);
15854                 // debug statements here
15855         }
15856         // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_new(struct LDKNetworkGraph network_graph, struct LDKCOption_AccessZ chain_access, struct LDKLogger logger);
15857         export function NetGraphMsgHandler_new(network_graph: number, chain_access: number, logger: number): number {
15858                 if(!isWasmInitialized) {
15859                         throw new Error("initializeWasm() must be awaited first!");
15860                 }
15861                 const nativeResponseValue = wasm.NetGraphMsgHandler_new(network_graph, chain_access, logger);
15862                 return nativeResponseValue;
15863         }
15864         // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKCOption_AccessZ chain_access);
15865         export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
15866                 if(!isWasmInitialized) {
15867                         throw new Error("initializeWasm() must be awaited first!");
15868                 }
15869                 const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
15870                 // debug statements here
15871         }
15872         // struct LDKRoutingMessageHandler NetGraphMsgHandler_as_RoutingMessageHandler(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
15873         export function NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: number): number {
15874                 if(!isWasmInitialized) {
15875                         throw new Error("initializeWasm() must be awaited first!");
15876                 }
15877                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_RoutingMessageHandler(this_arg);
15878                 return nativeResponseValue;
15879         }
15880         // struct LDKMessageSendEventsProvider NetGraphMsgHandler_as_MessageSendEventsProvider(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
15881         export function NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: number): number {
15882                 if(!isWasmInitialized) {
15883                         throw new Error("initializeWasm() must be awaited first!");
15884                 }
15885                 const nativeResponseValue = wasm.NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg);
15886                 return nativeResponseValue;
15887         }
15888         // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_obj);
15889         export function DirectionalChannelInfo_free(this_obj: number): void {
15890                 if(!isWasmInitialized) {
15891                         throw new Error("initializeWasm() must be awaited first!");
15892                 }
15893                 const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_obj);
15894                 // debug statements here
15895         }
15896         // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15897         export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
15898                 if(!isWasmInitialized) {
15899                         throw new Error("initializeWasm() must be awaited first!");
15900                 }
15901                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update(this_ptr);
15902                 return nativeResponseValue;
15903         }
15904         // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
15905         export function DirectionalChannelInfo_set_last_update(this_ptr: number, val: number): void {
15906                 if(!isWasmInitialized) {
15907                         throw new Error("initializeWasm() must be awaited first!");
15908                 }
15909                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update(this_ptr, val);
15910                 // debug statements here
15911         }
15912         // bool DirectionalChannelInfo_get_enabled(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15913         export function DirectionalChannelInfo_get_enabled(this_ptr: number): boolean {
15914                 if(!isWasmInitialized) {
15915                         throw new Error("initializeWasm() must be awaited first!");
15916                 }
15917                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_enabled(this_ptr);
15918                 return nativeResponseValue;
15919         }
15920         // void DirectionalChannelInfo_set_enabled(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, bool val);
15921         export function DirectionalChannelInfo_set_enabled(this_ptr: number, val: boolean): void {
15922                 if(!isWasmInitialized) {
15923                         throw new Error("initializeWasm() must be awaited first!");
15924                 }
15925                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_enabled(this_ptr, val);
15926                 // debug statements here
15927         }
15928         // uint16_t DirectionalChannelInfo_get_cltv_expiry_delta(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15929         export function DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr: number): number {
15930                 if(!isWasmInitialized) {
15931                         throw new Error("initializeWasm() must be awaited first!");
15932                 }
15933                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_cltv_expiry_delta(this_ptr);
15934                 return nativeResponseValue;
15935         }
15936         // void DirectionalChannelInfo_set_cltv_expiry_delta(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint16_t val);
15937         export function DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr: number, val: number): void {
15938                 if(!isWasmInitialized) {
15939                         throw new Error("initializeWasm() must be awaited first!");
15940                 }
15941                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_cltv_expiry_delta(this_ptr, val);
15942                 // debug statements here
15943         }
15944         // uint64_t DirectionalChannelInfo_get_htlc_minimum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15945         export function DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr: number): number {
15946                 if(!isWasmInitialized) {
15947                         throw new Error("initializeWasm() must be awaited first!");
15948                 }
15949                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_minimum_msat(this_ptr);
15950                 return nativeResponseValue;
15951         }
15952         // void DirectionalChannelInfo_set_htlc_minimum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint64_t val);
15953         export function DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr: number, val: number): void {
15954                 if(!isWasmInitialized) {
15955                         throw new Error("initializeWasm() must be awaited first!");
15956                 }
15957                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_minimum_msat(this_ptr, val);
15958                 // debug statements here
15959         }
15960         // struct LDKCOption_u64Z DirectionalChannelInfo_get_htlc_maximum_msat(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15961         export function DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr: number): number {
15962                 if(!isWasmInitialized) {
15963                         throw new Error("initializeWasm() must be awaited first!");
15964                 }
15965                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_htlc_maximum_msat(this_ptr);
15966                 return nativeResponseValue;
15967         }
15968         // void DirectionalChannelInfo_set_htlc_maximum_msat(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
15969         export function DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr: number, val: number): void {
15970                 if(!isWasmInitialized) {
15971                         throw new Error("initializeWasm() must be awaited first!");
15972                 }
15973                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_htlc_maximum_msat(this_ptr, val);
15974                 // debug statements here
15975         }
15976         // struct LDKRoutingFees DirectionalChannelInfo_get_fees(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15977         export function DirectionalChannelInfo_get_fees(this_ptr: number): number {
15978                 if(!isWasmInitialized) {
15979                         throw new Error("initializeWasm() must be awaited first!");
15980                 }
15981                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_fees(this_ptr);
15982                 return nativeResponseValue;
15983         }
15984         // void DirectionalChannelInfo_set_fees(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
15985         export function DirectionalChannelInfo_set_fees(this_ptr: number, val: number): void {
15986                 if(!isWasmInitialized) {
15987                         throw new Error("initializeWasm() must be awaited first!");
15988                 }
15989                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_fees(this_ptr, val);
15990                 // debug statements here
15991         }
15992         // struct LDKChannelUpdate DirectionalChannelInfo_get_last_update_message(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
15993         export function DirectionalChannelInfo_get_last_update_message(this_ptr: number): number {
15994                 if(!isWasmInitialized) {
15995                         throw new Error("initializeWasm() must be awaited first!");
15996                 }
15997                 const nativeResponseValue = wasm.DirectionalChannelInfo_get_last_update_message(this_ptr);
15998                 return nativeResponseValue;
15999         }
16000         // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
16001         export function DirectionalChannelInfo_set_last_update_message(this_ptr: number, val: number): void {
16002                 if(!isWasmInitialized) {
16003                         throw new Error("initializeWasm() must be awaited first!");
16004                 }
16005                 const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
16006                 // debug statements here
16007         }
16008         // 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);
16009         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 {
16010                 if(!isWasmInitialized) {
16011                         throw new Error("initializeWasm() must be awaited first!");
16012                 }
16013                 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);
16014                 return nativeResponseValue;
16015         }
16016         // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
16017         export function DirectionalChannelInfo_clone(orig: number): number {
16018                 if(!isWasmInitialized) {
16019                         throw new Error("initializeWasm() must be awaited first!");
16020                 }
16021                 const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
16022                 return nativeResponseValue;
16023         }
16024         // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
16025         export function DirectionalChannelInfo_write(obj: number): Uint8Array {
16026                 if(!isWasmInitialized) {
16027                         throw new Error("initializeWasm() must be awaited first!");
16028                 }
16029                 const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
16030                 return decodeArray(nativeResponseValue);
16031         }
16032         // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
16033         export function DirectionalChannelInfo_read(ser: Uint8Array): number {
16034                 if(!isWasmInitialized) {
16035                         throw new Error("initializeWasm() must be awaited first!");
16036                 }
16037                 const nativeResponseValue = wasm.DirectionalChannelInfo_read(encodeArray(ser));
16038                 return nativeResponseValue;
16039         }
16040         // void ChannelInfo_free(struct LDKChannelInfo this_obj);
16041         export function ChannelInfo_free(this_obj: number): void {
16042                 if(!isWasmInitialized) {
16043                         throw new Error("initializeWasm() must be awaited first!");
16044                 }
16045                 const nativeResponseValue = wasm.ChannelInfo_free(this_obj);
16046                 // debug statements here
16047         }
16048         // struct LDKChannelFeatures ChannelInfo_get_features(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16049         export function ChannelInfo_get_features(this_ptr: number): number {
16050                 if(!isWasmInitialized) {
16051                         throw new Error("initializeWasm() must be awaited first!");
16052                 }
16053                 const nativeResponseValue = wasm.ChannelInfo_get_features(this_ptr);
16054                 return nativeResponseValue;
16055         }
16056         // void ChannelInfo_set_features(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
16057         export function ChannelInfo_set_features(this_ptr: number, val: number): void {
16058                 if(!isWasmInitialized) {
16059                         throw new Error("initializeWasm() must be awaited first!");
16060                 }
16061                 const nativeResponseValue = wasm.ChannelInfo_set_features(this_ptr, val);
16062                 // debug statements here
16063         }
16064         // struct LDKNodeId ChannelInfo_get_node_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16065         export function ChannelInfo_get_node_one(this_ptr: number): number {
16066                 if(!isWasmInitialized) {
16067                         throw new Error("initializeWasm() must be awaited first!");
16068                 }
16069                 const nativeResponseValue = wasm.ChannelInfo_get_node_one(this_ptr);
16070                 return nativeResponseValue;
16071         }
16072         // void ChannelInfo_set_node_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
16073         export function ChannelInfo_set_node_one(this_ptr: number, val: number): void {
16074                 if(!isWasmInitialized) {
16075                         throw new Error("initializeWasm() must be awaited first!");
16076                 }
16077                 const nativeResponseValue = wasm.ChannelInfo_set_node_one(this_ptr, val);
16078                 // debug statements here
16079         }
16080         // struct LDKDirectionalChannelInfo ChannelInfo_get_one_to_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16081         export function ChannelInfo_get_one_to_two(this_ptr: number): number {
16082                 if(!isWasmInitialized) {
16083                         throw new Error("initializeWasm() must be awaited first!");
16084                 }
16085                 const nativeResponseValue = wasm.ChannelInfo_get_one_to_two(this_ptr);
16086                 return nativeResponseValue;
16087         }
16088         // void ChannelInfo_set_one_to_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
16089         export function ChannelInfo_set_one_to_two(this_ptr: number, val: number): void {
16090                 if(!isWasmInitialized) {
16091                         throw new Error("initializeWasm() must be awaited first!");
16092                 }
16093                 const nativeResponseValue = wasm.ChannelInfo_set_one_to_two(this_ptr, val);
16094                 // debug statements here
16095         }
16096         // struct LDKNodeId ChannelInfo_get_node_two(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16097         export function ChannelInfo_get_node_two(this_ptr: number): number {
16098                 if(!isWasmInitialized) {
16099                         throw new Error("initializeWasm() must be awaited first!");
16100                 }
16101                 const nativeResponseValue = wasm.ChannelInfo_get_node_two(this_ptr);
16102                 return nativeResponseValue;
16103         }
16104         // void ChannelInfo_set_node_two(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKNodeId val);
16105         export function ChannelInfo_set_node_two(this_ptr: number, val: number): void {
16106                 if(!isWasmInitialized) {
16107                         throw new Error("initializeWasm() must be awaited first!");
16108                 }
16109                 const nativeResponseValue = wasm.ChannelInfo_set_node_two(this_ptr, val);
16110                 // debug statements here
16111         }
16112         // struct LDKDirectionalChannelInfo ChannelInfo_get_two_to_one(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16113         export function ChannelInfo_get_two_to_one(this_ptr: number): number {
16114                 if(!isWasmInitialized) {
16115                         throw new Error("initializeWasm() must be awaited first!");
16116                 }
16117                 const nativeResponseValue = wasm.ChannelInfo_get_two_to_one(this_ptr);
16118                 return nativeResponseValue;
16119         }
16120         // void ChannelInfo_set_two_to_one(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKDirectionalChannelInfo val);
16121         export function ChannelInfo_set_two_to_one(this_ptr: number, val: number): void {
16122                 if(!isWasmInitialized) {
16123                         throw new Error("initializeWasm() must be awaited first!");
16124                 }
16125                 const nativeResponseValue = wasm.ChannelInfo_set_two_to_one(this_ptr, val);
16126                 // debug statements here
16127         }
16128         // struct LDKCOption_u64Z ChannelInfo_get_capacity_sats(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16129         export function ChannelInfo_get_capacity_sats(this_ptr: number): number {
16130                 if(!isWasmInitialized) {
16131                         throw new Error("initializeWasm() must be awaited first!");
16132                 }
16133                 const nativeResponseValue = wasm.ChannelInfo_get_capacity_sats(this_ptr);
16134                 return nativeResponseValue;
16135         }
16136         // void ChannelInfo_set_capacity_sats(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
16137         export function ChannelInfo_set_capacity_sats(this_ptr: number, val: number): void {
16138                 if(!isWasmInitialized) {
16139                         throw new Error("initializeWasm() must be awaited first!");
16140                 }
16141                 const nativeResponseValue = wasm.ChannelInfo_set_capacity_sats(this_ptr, val);
16142                 // debug statements here
16143         }
16144         // struct LDKChannelAnnouncement ChannelInfo_get_announcement_message(const struct LDKChannelInfo *NONNULL_PTR this_ptr);
16145         export function ChannelInfo_get_announcement_message(this_ptr: number): number {
16146                 if(!isWasmInitialized) {
16147                         throw new Error("initializeWasm() must be awaited first!");
16148                 }
16149                 const nativeResponseValue = wasm.ChannelInfo_get_announcement_message(this_ptr);
16150                 return nativeResponseValue;
16151         }
16152         // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
16153         export function ChannelInfo_set_announcement_message(this_ptr: number, val: number): void {
16154                 if(!isWasmInitialized) {
16155                         throw new Error("initializeWasm() must be awaited first!");
16156                 }
16157                 const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
16158                 // debug statements here
16159         }
16160         // 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);
16161         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 {
16162                 if(!isWasmInitialized) {
16163                         throw new Error("initializeWasm() must be awaited first!");
16164                 }
16165                 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);
16166                 return nativeResponseValue;
16167         }
16168         // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
16169         export function ChannelInfo_clone(orig: number): number {
16170                 if(!isWasmInitialized) {
16171                         throw new Error("initializeWasm() must be awaited first!");
16172                 }
16173                 const nativeResponseValue = wasm.ChannelInfo_clone(orig);
16174                 return nativeResponseValue;
16175         }
16176         // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
16177         export function ChannelInfo_write(obj: number): Uint8Array {
16178                 if(!isWasmInitialized) {
16179                         throw new Error("initializeWasm() must be awaited first!");
16180                 }
16181                 const nativeResponseValue = wasm.ChannelInfo_write(obj);
16182                 return decodeArray(nativeResponseValue);
16183         }
16184         // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
16185         export function ChannelInfo_read(ser: Uint8Array): number {
16186                 if(!isWasmInitialized) {
16187                         throw new Error("initializeWasm() must be awaited first!");
16188                 }
16189                 const nativeResponseValue = wasm.ChannelInfo_read(encodeArray(ser));
16190                 return nativeResponseValue;
16191         }
16192         // void RoutingFees_free(struct LDKRoutingFees this_obj);
16193         export function RoutingFees_free(this_obj: number): void {
16194                 if(!isWasmInitialized) {
16195                         throw new Error("initializeWasm() must be awaited first!");
16196                 }
16197                 const nativeResponseValue = wasm.RoutingFees_free(this_obj);
16198                 // debug statements here
16199         }
16200         // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
16201         export function RoutingFees_get_base_msat(this_ptr: number): number {
16202                 if(!isWasmInitialized) {
16203                         throw new Error("initializeWasm() must be awaited first!");
16204                 }
16205                 const nativeResponseValue = wasm.RoutingFees_get_base_msat(this_ptr);
16206                 return nativeResponseValue;
16207         }
16208         // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
16209         export function RoutingFees_set_base_msat(this_ptr: number, val: number): void {
16210                 if(!isWasmInitialized) {
16211                         throw new Error("initializeWasm() must be awaited first!");
16212                 }
16213                 const nativeResponseValue = wasm.RoutingFees_set_base_msat(this_ptr, val);
16214                 // debug statements here
16215         }
16216         // uint32_t RoutingFees_get_proportional_millionths(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
16217         export function RoutingFees_get_proportional_millionths(this_ptr: number): number {
16218                 if(!isWasmInitialized) {
16219                         throw new Error("initializeWasm() must be awaited first!");
16220                 }
16221                 const nativeResponseValue = wasm.RoutingFees_get_proportional_millionths(this_ptr);
16222                 return nativeResponseValue;
16223         }
16224         // void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
16225         export function RoutingFees_set_proportional_millionths(this_ptr: number, val: number): void {
16226                 if(!isWasmInitialized) {
16227                         throw new Error("initializeWasm() must be awaited first!");
16228                 }
16229                 const nativeResponseValue = wasm.RoutingFees_set_proportional_millionths(this_ptr, val);
16230                 // debug statements here
16231         }
16232         // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
16233         export function RoutingFees_new(base_msat_arg: number, proportional_millionths_arg: number): number {
16234                 if(!isWasmInitialized) {
16235                         throw new Error("initializeWasm() must be awaited first!");
16236                 }
16237                 const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
16238                 return nativeResponseValue;
16239         }
16240         // bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b);
16241         export function RoutingFees_eq(a: number, b: number): boolean {
16242                 if(!isWasmInitialized) {
16243                         throw new Error("initializeWasm() must be awaited first!");
16244                 }
16245                 const nativeResponseValue = wasm.RoutingFees_eq(a, b);
16246                 return nativeResponseValue;
16247         }
16248         // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
16249         export function RoutingFees_clone(orig: number): number {
16250                 if(!isWasmInitialized) {
16251                         throw new Error("initializeWasm() must be awaited first!");
16252                 }
16253                 const nativeResponseValue = wasm.RoutingFees_clone(orig);
16254                 return nativeResponseValue;
16255         }
16256         // uint64_t RoutingFees_hash(const struct LDKRoutingFees *NONNULL_PTR o);
16257         export function RoutingFees_hash(o: number): number {
16258                 if(!isWasmInitialized) {
16259                         throw new Error("initializeWasm() must be awaited first!");
16260                 }
16261                 const nativeResponseValue = wasm.RoutingFees_hash(o);
16262                 return nativeResponseValue;
16263         }
16264         // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
16265         export function RoutingFees_write(obj: number): Uint8Array {
16266                 if(!isWasmInitialized) {
16267                         throw new Error("initializeWasm() must be awaited first!");
16268                 }
16269                 const nativeResponseValue = wasm.RoutingFees_write(obj);
16270                 return decodeArray(nativeResponseValue);
16271         }
16272         // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
16273         export function RoutingFees_read(ser: Uint8Array): number {
16274                 if(!isWasmInitialized) {
16275                         throw new Error("initializeWasm() must be awaited first!");
16276                 }
16277                 const nativeResponseValue = wasm.RoutingFees_read(encodeArray(ser));
16278                 return nativeResponseValue;
16279         }
16280         // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_obj);
16281         export function NodeAnnouncementInfo_free(this_obj: number): void {
16282                 if(!isWasmInitialized) {
16283                         throw new Error("initializeWasm() must be awaited first!");
16284                 }
16285                 const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_obj);
16286                 // debug statements here
16287         }
16288         // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
16289         export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
16290                 if(!isWasmInitialized) {
16291                         throw new Error("initializeWasm() must be awaited first!");
16292                 }
16293                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_features(this_ptr);
16294                 return nativeResponseValue;
16295         }
16296         // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
16297         export function NodeAnnouncementInfo_set_features(this_ptr: number, val: number): void {
16298                 if(!isWasmInitialized) {
16299                         throw new Error("initializeWasm() must be awaited first!");
16300                 }
16301                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_features(this_ptr, val);
16302                 // debug statements here
16303         }
16304         // uint32_t NodeAnnouncementInfo_get_last_update(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
16305         export function NodeAnnouncementInfo_get_last_update(this_ptr: number): number {
16306                 if(!isWasmInitialized) {
16307                         throw new Error("initializeWasm() must be awaited first!");
16308                 }
16309                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_last_update(this_ptr);
16310                 return nativeResponseValue;
16311         }
16312         // void NodeAnnouncementInfo_set_last_update(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, uint32_t val);
16313         export function NodeAnnouncementInfo_set_last_update(this_ptr: number, val: number): void {
16314                 if(!isWasmInitialized) {
16315                         throw new Error("initializeWasm() must be awaited first!");
16316                 }
16317                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_last_update(this_ptr, val);
16318                 // debug statements here
16319         }
16320         // const uint8_t (*NodeAnnouncementInfo_get_rgb(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[3];
16321         export function NodeAnnouncementInfo_get_rgb(this_ptr: number): Uint8Array {
16322                 if(!isWasmInitialized) {
16323                         throw new Error("initializeWasm() must be awaited first!");
16324                 }
16325                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_rgb(this_ptr);
16326                 return decodeArray(nativeResponseValue);
16327         }
16328         // void NodeAnnouncementInfo_set_rgb(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThreeBytes val);
16329         export function NodeAnnouncementInfo_set_rgb(this_ptr: number, val: Uint8Array): void {
16330                 if(!isWasmInitialized) {
16331                         throw new Error("initializeWasm() must be awaited first!");
16332                 }
16333                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_rgb(this_ptr, encodeArray(val));
16334                 // debug statements here
16335         }
16336         // const uint8_t (*NodeAnnouncementInfo_get_alias(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr))[32];
16337         export function NodeAnnouncementInfo_get_alias(this_ptr: number): Uint8Array {
16338                 if(!isWasmInitialized) {
16339                         throw new Error("initializeWasm() must be awaited first!");
16340                 }
16341                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_alias(this_ptr);
16342                 return decodeArray(nativeResponseValue);
16343         }
16344         // void NodeAnnouncementInfo_set_alias(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
16345         export function NodeAnnouncementInfo_set_alias(this_ptr: number, val: Uint8Array): void {
16346                 if(!isWasmInitialized) {
16347                         throw new Error("initializeWasm() must be awaited first!");
16348                 }
16349                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_alias(this_ptr, encodeArray(val));
16350                 // debug statements here
16351         }
16352         // void NodeAnnouncementInfo_set_addresses(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
16353         export function NodeAnnouncementInfo_set_addresses(this_ptr: number, val: number[]): void {
16354                 if(!isWasmInitialized) {
16355                         throw new Error("initializeWasm() must be awaited first!");
16356                 }
16357                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_addresses(this_ptr, val);
16358                 // debug statements here
16359         }
16360         // struct LDKNodeAnnouncement NodeAnnouncementInfo_get_announcement_message(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
16361         export function NodeAnnouncementInfo_get_announcement_message(this_ptr: number): number {
16362                 if(!isWasmInitialized) {
16363                         throw new Error("initializeWasm() must be awaited first!");
16364                 }
16365                 const nativeResponseValue = wasm.NodeAnnouncementInfo_get_announcement_message(this_ptr);
16366                 return nativeResponseValue;
16367         }
16368         // void NodeAnnouncementInfo_set_announcement_message(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncement val);
16369         export function NodeAnnouncementInfo_set_announcement_message(this_ptr: number, val: number): void {
16370                 if(!isWasmInitialized) {
16371                         throw new Error("initializeWasm() must be awaited first!");
16372                 }
16373                 const nativeResponseValue = wasm.NodeAnnouncementInfo_set_announcement_message(this_ptr, val);
16374                 // debug statements here
16375         }
16376         // 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);
16377         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 {
16378                 if(!isWasmInitialized) {
16379                         throw new Error("initializeWasm() must be awaited first!");
16380                 }
16381                 const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
16382                 return nativeResponseValue;
16383         }
16384         // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
16385         export function NodeAnnouncementInfo_clone(orig: number): number {
16386                 if(!isWasmInitialized) {
16387                         throw new Error("initializeWasm() must be awaited first!");
16388                 }
16389                 const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
16390                 return nativeResponseValue;
16391         }
16392         // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
16393         export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
16394                 if(!isWasmInitialized) {
16395                         throw new Error("initializeWasm() must be awaited first!");
16396                 }
16397                 const nativeResponseValue = wasm.NodeAnnouncementInfo_write(obj);
16398                 return decodeArray(nativeResponseValue);
16399         }
16400         // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
16401         export function NodeAnnouncementInfo_read(ser: Uint8Array): number {
16402                 if(!isWasmInitialized) {
16403                         throw new Error("initializeWasm() must be awaited first!");
16404                 }
16405                 const nativeResponseValue = wasm.NodeAnnouncementInfo_read(encodeArray(ser));
16406                 return nativeResponseValue;
16407         }
16408         // void NodeInfo_free(struct LDKNodeInfo this_obj);
16409         export function NodeInfo_free(this_obj: number): void {
16410                 if(!isWasmInitialized) {
16411                         throw new Error("initializeWasm() must be awaited first!");
16412                 }
16413                 const nativeResponseValue = wasm.NodeInfo_free(this_obj);
16414                 // debug statements here
16415         }
16416         // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
16417         export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
16418                 if(!isWasmInitialized) {
16419                         throw new Error("initializeWasm() must be awaited first!");
16420                 }
16421                 const nativeResponseValue = wasm.NodeInfo_set_channels(this_ptr, val);
16422                 // debug statements here
16423         }
16424         // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
16425         export function NodeInfo_get_lowest_inbound_channel_fees(this_ptr: number): number {
16426                 if(!isWasmInitialized) {
16427                         throw new Error("initializeWasm() must be awaited first!");
16428                 }
16429                 const nativeResponseValue = wasm.NodeInfo_get_lowest_inbound_channel_fees(this_ptr);
16430                 return nativeResponseValue;
16431         }
16432         // void NodeInfo_set_lowest_inbound_channel_fees(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
16433         export function NodeInfo_set_lowest_inbound_channel_fees(this_ptr: number, val: number): void {
16434                 if(!isWasmInitialized) {
16435                         throw new Error("initializeWasm() must be awaited first!");
16436                 }
16437                 const nativeResponseValue = wasm.NodeInfo_set_lowest_inbound_channel_fees(this_ptr, val);
16438                 // debug statements here
16439         }
16440         // struct LDKNodeAnnouncementInfo NodeInfo_get_announcement_info(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
16441         export function NodeInfo_get_announcement_info(this_ptr: number): number {
16442                 if(!isWasmInitialized) {
16443                         throw new Error("initializeWasm() must be awaited first!");
16444                 }
16445                 const nativeResponseValue = wasm.NodeInfo_get_announcement_info(this_ptr);
16446                 return nativeResponseValue;
16447         }
16448         // void NodeInfo_set_announcement_info(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKNodeAnnouncementInfo val);
16449         export function NodeInfo_set_announcement_info(this_ptr: number, val: number): void {
16450                 if(!isWasmInitialized) {
16451                         throw new Error("initializeWasm() must be awaited first!");
16452                 }
16453                 const nativeResponseValue = wasm.NodeInfo_set_announcement_info(this_ptr, val);
16454                 // debug statements here
16455         }
16456         // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
16457         export function NodeInfo_new(channels_arg: number[], lowest_inbound_channel_fees_arg: number, announcement_info_arg: number): number {
16458                 if(!isWasmInitialized) {
16459                         throw new Error("initializeWasm() must be awaited first!");
16460                 }
16461                 const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
16462                 return nativeResponseValue;
16463         }
16464         // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
16465         export function NodeInfo_clone(orig: number): number {
16466                 if(!isWasmInitialized) {
16467                         throw new Error("initializeWasm() must be awaited first!");
16468                 }
16469                 const nativeResponseValue = wasm.NodeInfo_clone(orig);
16470                 return nativeResponseValue;
16471         }
16472         // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
16473         export function NodeInfo_write(obj: number): Uint8Array {
16474                 if(!isWasmInitialized) {
16475                         throw new Error("initializeWasm() must be awaited first!");
16476                 }
16477                 const nativeResponseValue = wasm.NodeInfo_write(obj);
16478                 return decodeArray(nativeResponseValue);
16479         }
16480         // struct LDKCResult_NodeInfoDecodeErrorZ NodeInfo_read(struct LDKu8slice ser);
16481         export function NodeInfo_read(ser: Uint8Array): number {
16482                 if(!isWasmInitialized) {
16483                         throw new Error("initializeWasm() must be awaited first!");
16484                 }
16485                 const nativeResponseValue = wasm.NodeInfo_read(encodeArray(ser));
16486                 return nativeResponseValue;
16487         }
16488         // struct LDKCVec_u8Z NetworkGraph_write(const struct LDKNetworkGraph *NONNULL_PTR obj);
16489         export function NetworkGraph_write(obj: number): Uint8Array {
16490                 if(!isWasmInitialized) {
16491                         throw new Error("initializeWasm() must be awaited first!");
16492                 }
16493                 const nativeResponseValue = wasm.NetworkGraph_write(obj);
16494                 return decodeArray(nativeResponseValue);
16495         }
16496         // struct LDKCResult_NetworkGraphDecodeErrorZ NetworkGraph_read(struct LDKu8slice ser);
16497         export function NetworkGraph_read(ser: Uint8Array): number {
16498                 if(!isWasmInitialized) {
16499                         throw new Error("initializeWasm() must be awaited first!");
16500                 }
16501                 const nativeResponseValue = wasm.NetworkGraph_read(encodeArray(ser));
16502                 return nativeResponseValue;
16503         }
16504         // MUST_USE_RES struct LDKNetworkGraph NetworkGraph_new(struct LDKThirtyTwoBytes genesis_hash);
16505         export function NetworkGraph_new(genesis_hash: Uint8Array): number {
16506                 if(!isWasmInitialized) {
16507                         throw new Error("initializeWasm() must be awaited first!");
16508                 }
16509                 const nativeResponseValue = wasm.NetworkGraph_new(encodeArray(genesis_hash));
16510                 return nativeResponseValue;
16511         }
16512         // MUST_USE_RES struct LDKReadOnlyNetworkGraph NetworkGraph_read_only(const struct LDKNetworkGraph *NONNULL_PTR this_arg);
16513         export function NetworkGraph_read_only(this_arg: number): number {
16514                 if(!isWasmInitialized) {
16515                         throw new Error("initializeWasm() must be awaited first!");
16516                 }
16517                 const nativeResponseValue = wasm.NetworkGraph_read_only(this_arg);
16518                 return nativeResponseValue;
16519         }
16520         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_node_from_announcement(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKNodeAnnouncement *NONNULL_PTR msg);
16521         export function NetworkGraph_update_node_from_announcement(this_arg: number, msg: number): number {
16522                 if(!isWasmInitialized) {
16523                         throw new Error("initializeWasm() must be awaited first!");
16524                 }
16525                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_announcement(this_arg, msg);
16526                 return nativeResponseValue;
16527         }
16528         // 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);
16529         export function NetworkGraph_update_node_from_unsigned_announcement(this_arg: number, msg: number): number {
16530                 if(!isWasmInitialized) {
16531                         throw new Error("initializeWasm() must be awaited first!");
16532                 }
16533                 const nativeResponseValue = wasm.NetworkGraph_update_node_from_unsigned_announcement(this_arg, msg);
16534                 return nativeResponseValue;
16535         }
16536         // 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);
16537         export function NetworkGraph_update_channel_from_announcement(this_arg: number, msg: number, chain_access: number): number {
16538                 if(!isWasmInitialized) {
16539                         throw new Error("initializeWasm() must be awaited first!");
16540                 }
16541                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_announcement(this_arg, msg, chain_access);
16542                 return nativeResponseValue;
16543         }
16544         // 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);
16545         export function NetworkGraph_update_channel_from_unsigned_announcement(this_arg: number, msg: number, chain_access: number): number {
16546                 if(!isWasmInitialized) {
16547                         throw new Error("initializeWasm() must be awaited first!");
16548                 }
16549                 const nativeResponseValue = wasm.NetworkGraph_update_channel_from_unsigned_announcement(this_arg, msg, chain_access);
16550                 return nativeResponseValue;
16551         }
16552         // void NetworkGraph_close_channel_from_update(const struct LDKNetworkGraph *NONNULL_PTR this_arg, uint64_t short_channel_id, bool is_permanent);
16553         export function NetworkGraph_close_channel_from_update(this_arg: number, short_channel_id: number, is_permanent: boolean): void {
16554                 if(!isWasmInitialized) {
16555                         throw new Error("initializeWasm() must be awaited first!");
16556                 }
16557                 const nativeResponseValue = wasm.NetworkGraph_close_channel_from_update(this_arg, short_channel_id, is_permanent);
16558                 // debug statements here
16559         }
16560         // void NetworkGraph_fail_node(const struct LDKNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey _node_id, bool is_permanent);
16561         export function NetworkGraph_fail_node(this_arg: number, _node_id: Uint8Array, is_permanent: boolean): void {
16562                 if(!isWasmInitialized) {
16563                         throw new Error("initializeWasm() must be awaited first!");
16564                 }
16565                 const nativeResponseValue = wasm.NetworkGraph_fail_node(this_arg, encodeArray(_node_id), is_permanent);
16566                 // debug statements here
16567         }
16568         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKChannelUpdate *NONNULL_PTR msg);
16569         export function NetworkGraph_update_channel(this_arg: number, msg: number): number {
16570                 if(!isWasmInitialized) {
16571                         throw new Error("initializeWasm() must be awaited first!");
16572                 }
16573                 const nativeResponseValue = wasm.NetworkGraph_update_channel(this_arg, msg);
16574                 return nativeResponseValue;
16575         }
16576         // MUST_USE_RES struct LDKCResult_NoneLightningErrorZ NetworkGraph_update_channel_unsigned(const struct LDKNetworkGraph *NONNULL_PTR this_arg, const struct LDKUnsignedChannelUpdate *NONNULL_PTR msg);
16577         export function NetworkGraph_update_channel_unsigned(this_arg: number, msg: number): number {
16578                 if(!isWasmInitialized) {
16579                         throw new Error("initializeWasm() must be awaited first!");
16580                 }
16581                 const nativeResponseValue = wasm.NetworkGraph_update_channel_unsigned(this_arg, msg);
16582                 return nativeResponseValue;
16583         }
16584         // MUST_USE_RES struct LDKCOption_CVec_NetAddressZZ ReadOnlyNetworkGraph_get_addresses(const struct LDKReadOnlyNetworkGraph *NONNULL_PTR this_arg, struct LDKPublicKey pubkey);
16585         export function ReadOnlyNetworkGraph_get_addresses(this_arg: number, pubkey: Uint8Array): number {
16586                 if(!isWasmInitialized) {
16587                         throw new Error("initializeWasm() must be awaited first!");
16588                 }
16589                 const nativeResponseValue = wasm.ReadOnlyNetworkGraph_get_addresses(this_arg, encodeArray(pubkey));
16590                 return nativeResponseValue;
16591         }
16592         // void RouteHop_free(struct LDKRouteHop this_obj);
16593         export function RouteHop_free(this_obj: number): void {
16594                 if(!isWasmInitialized) {
16595                         throw new Error("initializeWasm() must be awaited first!");
16596                 }
16597                 const nativeResponseValue = wasm.RouteHop_free(this_obj);
16598                 // debug statements here
16599         }
16600         // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
16601         export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
16602                 if(!isWasmInitialized) {
16603                         throw new Error("initializeWasm() must be awaited first!");
16604                 }
16605                 const nativeResponseValue = wasm.RouteHop_get_pubkey(this_ptr);
16606                 return decodeArray(nativeResponseValue);
16607         }
16608         // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16609         export function RouteHop_set_pubkey(this_ptr: number, val: Uint8Array): void {
16610                 if(!isWasmInitialized) {
16611                         throw new Error("initializeWasm() must be awaited first!");
16612                 }
16613                 const nativeResponseValue = wasm.RouteHop_set_pubkey(this_ptr, encodeArray(val));
16614                 // debug statements here
16615         }
16616         // struct LDKNodeFeatures RouteHop_get_node_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
16617         export function RouteHop_get_node_features(this_ptr: number): number {
16618                 if(!isWasmInitialized) {
16619                         throw new Error("initializeWasm() must be awaited first!");
16620                 }
16621                 const nativeResponseValue = wasm.RouteHop_get_node_features(this_ptr);
16622                 return nativeResponseValue;
16623         }
16624         // void RouteHop_set_node_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
16625         export function RouteHop_set_node_features(this_ptr: number, val: number): void {
16626                 if(!isWasmInitialized) {
16627                         throw new Error("initializeWasm() must be awaited first!");
16628                 }
16629                 const nativeResponseValue = wasm.RouteHop_set_node_features(this_ptr, val);
16630                 // debug statements here
16631         }
16632         // uint64_t RouteHop_get_short_channel_id(const struct LDKRouteHop *NONNULL_PTR this_ptr);
16633         export function RouteHop_get_short_channel_id(this_ptr: number): number {
16634                 if(!isWasmInitialized) {
16635                         throw new Error("initializeWasm() must be awaited first!");
16636                 }
16637                 const nativeResponseValue = wasm.RouteHop_get_short_channel_id(this_ptr);
16638                 return nativeResponseValue;
16639         }
16640         // void RouteHop_set_short_channel_id(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
16641         export function RouteHop_set_short_channel_id(this_ptr: number, val: number): void {
16642                 if(!isWasmInitialized) {
16643                         throw new Error("initializeWasm() must be awaited first!");
16644                 }
16645                 const nativeResponseValue = wasm.RouteHop_set_short_channel_id(this_ptr, val);
16646                 // debug statements here
16647         }
16648         // struct LDKChannelFeatures RouteHop_get_channel_features(const struct LDKRouteHop *NONNULL_PTR this_ptr);
16649         export function RouteHop_get_channel_features(this_ptr: number): number {
16650                 if(!isWasmInitialized) {
16651                         throw new Error("initializeWasm() must be awaited first!");
16652                 }
16653                 const nativeResponseValue = wasm.RouteHop_get_channel_features(this_ptr);
16654                 return nativeResponseValue;
16655         }
16656         // void RouteHop_set_channel_features(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
16657         export function RouteHop_set_channel_features(this_ptr: number, val: number): void {
16658                 if(!isWasmInitialized) {
16659                         throw new Error("initializeWasm() must be awaited first!");
16660                 }
16661                 const nativeResponseValue = wasm.RouteHop_set_channel_features(this_ptr, val);
16662                 // debug statements here
16663         }
16664         // uint64_t RouteHop_get_fee_msat(const struct LDKRouteHop *NONNULL_PTR this_ptr);
16665         export function RouteHop_get_fee_msat(this_ptr: number): number {
16666                 if(!isWasmInitialized) {
16667                         throw new Error("initializeWasm() must be awaited first!");
16668                 }
16669                 const nativeResponseValue = wasm.RouteHop_get_fee_msat(this_ptr);
16670                 return nativeResponseValue;
16671         }
16672         // void RouteHop_set_fee_msat(struct LDKRouteHop *NONNULL_PTR this_ptr, uint64_t val);
16673         export function RouteHop_set_fee_msat(this_ptr: number, val: number): void {
16674                 if(!isWasmInitialized) {
16675                         throw new Error("initializeWasm() must be awaited first!");
16676                 }
16677                 const nativeResponseValue = wasm.RouteHop_set_fee_msat(this_ptr, val);
16678                 // debug statements here
16679         }
16680         // uint32_t RouteHop_get_cltv_expiry_delta(const struct LDKRouteHop *NONNULL_PTR this_ptr);
16681         export function RouteHop_get_cltv_expiry_delta(this_ptr: number): number {
16682                 if(!isWasmInitialized) {
16683                         throw new Error("initializeWasm() must be awaited first!");
16684                 }
16685                 const nativeResponseValue = wasm.RouteHop_get_cltv_expiry_delta(this_ptr);
16686                 return nativeResponseValue;
16687         }
16688         // void RouteHop_set_cltv_expiry_delta(struct LDKRouteHop *NONNULL_PTR this_ptr, uint32_t val);
16689         export function RouteHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
16690                 if(!isWasmInitialized) {
16691                         throw new Error("initializeWasm() must be awaited first!");
16692                 }
16693                 const nativeResponseValue = wasm.RouteHop_set_cltv_expiry_delta(this_ptr, val);
16694                 // debug statements here
16695         }
16696         // 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);
16697         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 {
16698                 if(!isWasmInitialized) {
16699                         throw new Error("initializeWasm() must be awaited first!");
16700                 }
16701                 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);
16702                 return nativeResponseValue;
16703         }
16704         // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
16705         export function RouteHop_clone(orig: number): number {
16706                 if(!isWasmInitialized) {
16707                         throw new Error("initializeWasm() must be awaited first!");
16708                 }
16709                 const nativeResponseValue = wasm.RouteHop_clone(orig);
16710                 return nativeResponseValue;
16711         }
16712         // uint64_t RouteHop_hash(const struct LDKRouteHop *NONNULL_PTR o);
16713         export function RouteHop_hash(o: number): number {
16714                 if(!isWasmInitialized) {
16715                         throw new Error("initializeWasm() must be awaited first!");
16716                 }
16717                 const nativeResponseValue = wasm.RouteHop_hash(o);
16718                 return nativeResponseValue;
16719         }
16720         // bool RouteHop_eq(const struct LDKRouteHop *NONNULL_PTR a, const struct LDKRouteHop *NONNULL_PTR b);
16721         export function RouteHop_eq(a: number, b: number): boolean {
16722                 if(!isWasmInitialized) {
16723                         throw new Error("initializeWasm() must be awaited first!");
16724                 }
16725                 const nativeResponseValue = wasm.RouteHop_eq(a, b);
16726                 return nativeResponseValue;
16727         }
16728         // struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj);
16729         export function RouteHop_write(obj: number): Uint8Array {
16730                 if(!isWasmInitialized) {
16731                         throw new Error("initializeWasm() must be awaited first!");
16732                 }
16733                 const nativeResponseValue = wasm.RouteHop_write(obj);
16734                 return decodeArray(nativeResponseValue);
16735         }
16736         // struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser);
16737         export function RouteHop_read(ser: Uint8Array): number {
16738                 if(!isWasmInitialized) {
16739                         throw new Error("initializeWasm() must be awaited first!");
16740                 }
16741                 const nativeResponseValue = wasm.RouteHop_read(encodeArray(ser));
16742                 return nativeResponseValue;
16743         }
16744         // void Route_free(struct LDKRoute this_obj);
16745         export function Route_free(this_obj: number): void {
16746                 if(!isWasmInitialized) {
16747                         throw new Error("initializeWasm() must be awaited first!");
16748                 }
16749                 const nativeResponseValue = wasm.Route_free(this_obj);
16750                 // debug statements here
16751         }
16752         // struct LDKCVec_CVec_RouteHopZZ Route_get_paths(const struct LDKRoute *NONNULL_PTR this_ptr);
16753         export function Route_get_paths(this_ptr: number): number[][] {
16754                 if(!isWasmInitialized) {
16755                         throw new Error("initializeWasm() must be awaited first!");
16756                 }
16757                 const nativeResponseValue = wasm.Route_get_paths(this_ptr);
16758                 return nativeResponseValue;
16759         }
16760         // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
16761         export function Route_set_paths(this_ptr: number, val: number[][]): void {
16762                 if(!isWasmInitialized) {
16763                         throw new Error("initializeWasm() must be awaited first!");
16764                 }
16765                 const nativeResponseValue = wasm.Route_set_paths(this_ptr, val);
16766                 // debug statements here
16767         }
16768         // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
16769         export function Route_new(paths_arg: number[][]): number {
16770                 if(!isWasmInitialized) {
16771                         throw new Error("initializeWasm() must be awaited first!");
16772                 }
16773                 const nativeResponseValue = wasm.Route_new(paths_arg);
16774                 return nativeResponseValue;
16775         }
16776         // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
16777         export function Route_clone(orig: number): number {
16778                 if(!isWasmInitialized) {
16779                         throw new Error("initializeWasm() must be awaited first!");
16780                 }
16781                 const nativeResponseValue = wasm.Route_clone(orig);
16782                 return nativeResponseValue;
16783         }
16784         // uint64_t Route_hash(const struct LDKRoute *NONNULL_PTR o);
16785         export function Route_hash(o: number): number {
16786                 if(!isWasmInitialized) {
16787                         throw new Error("initializeWasm() must be awaited first!");
16788                 }
16789                 const nativeResponseValue = wasm.Route_hash(o);
16790                 return nativeResponseValue;
16791         }
16792         // bool Route_eq(const struct LDKRoute *NONNULL_PTR a, const struct LDKRoute *NONNULL_PTR b);
16793         export function Route_eq(a: number, b: number): boolean {
16794                 if(!isWasmInitialized) {
16795                         throw new Error("initializeWasm() must be awaited first!");
16796                 }
16797                 const nativeResponseValue = wasm.Route_eq(a, b);
16798                 return nativeResponseValue;
16799         }
16800         // MUST_USE_RES uint64_t Route_get_total_fees(const struct LDKRoute *NONNULL_PTR this_arg);
16801         export function Route_get_total_fees(this_arg: number): number {
16802                 if(!isWasmInitialized) {
16803                         throw new Error("initializeWasm() must be awaited first!");
16804                 }
16805                 const nativeResponseValue = wasm.Route_get_total_fees(this_arg);
16806                 return nativeResponseValue;
16807         }
16808         // MUST_USE_RES uint64_t Route_get_total_amount(const struct LDKRoute *NONNULL_PTR this_arg);
16809         export function Route_get_total_amount(this_arg: number): number {
16810                 if(!isWasmInitialized) {
16811                         throw new Error("initializeWasm() must be awaited first!");
16812                 }
16813                 const nativeResponseValue = wasm.Route_get_total_amount(this_arg);
16814                 return nativeResponseValue;
16815         }
16816         // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
16817         export function Route_write(obj: number): Uint8Array {
16818                 if(!isWasmInitialized) {
16819                         throw new Error("initializeWasm() must be awaited first!");
16820                 }
16821                 const nativeResponseValue = wasm.Route_write(obj);
16822                 return decodeArray(nativeResponseValue);
16823         }
16824         // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
16825         export function Route_read(ser: Uint8Array): number {
16826                 if(!isWasmInitialized) {
16827                         throw new Error("initializeWasm() must be awaited first!");
16828                 }
16829                 const nativeResponseValue = wasm.Route_read(encodeArray(ser));
16830                 return nativeResponseValue;
16831         }
16832         // void RouteHint_free(struct LDKRouteHint this_obj);
16833         export function RouteHint_free(this_obj: number): void {
16834                 if(!isWasmInitialized) {
16835                         throw new Error("initializeWasm() must be awaited first!");
16836                 }
16837                 const nativeResponseValue = wasm.RouteHint_free(this_obj);
16838                 // debug statements here
16839         }
16840         // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
16841         export function RouteHint_clone(orig: number): number {
16842                 if(!isWasmInitialized) {
16843                         throw new Error("initializeWasm() must be awaited first!");
16844                 }
16845                 const nativeResponseValue = wasm.RouteHint_clone(orig);
16846                 return nativeResponseValue;
16847         }
16848         // uint64_t RouteHint_hash(const struct LDKRouteHint *NONNULL_PTR o);
16849         export function RouteHint_hash(o: number): number {
16850                 if(!isWasmInitialized) {
16851                         throw new Error("initializeWasm() must be awaited first!");
16852                 }
16853                 const nativeResponseValue = wasm.RouteHint_hash(o);
16854                 return nativeResponseValue;
16855         }
16856         // bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b);
16857         export function RouteHint_eq(a: number, b: number): boolean {
16858                 if(!isWasmInitialized) {
16859                         throw new Error("initializeWasm() must be awaited first!");
16860                 }
16861                 const nativeResponseValue = wasm.RouteHint_eq(a, b);
16862                 return nativeResponseValue;
16863         }
16864         // void RouteHintHop_free(struct LDKRouteHintHop this_obj);
16865         export function RouteHintHop_free(this_obj: number): void {
16866                 if(!isWasmInitialized) {
16867                         throw new Error("initializeWasm() must be awaited first!");
16868                 }
16869                 const nativeResponseValue = wasm.RouteHintHop_free(this_obj);
16870                 // debug statements here
16871         }
16872         // struct LDKPublicKey RouteHintHop_get_src_node_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
16873         export function RouteHintHop_get_src_node_id(this_ptr: number): Uint8Array {
16874                 if(!isWasmInitialized) {
16875                         throw new Error("initializeWasm() must be awaited first!");
16876                 }
16877                 const nativeResponseValue = wasm.RouteHintHop_get_src_node_id(this_ptr);
16878                 return decodeArray(nativeResponseValue);
16879         }
16880         // void RouteHintHop_set_src_node_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
16881         export function RouteHintHop_set_src_node_id(this_ptr: number, val: Uint8Array): void {
16882                 if(!isWasmInitialized) {
16883                         throw new Error("initializeWasm() must be awaited first!");
16884                 }
16885                 const nativeResponseValue = wasm.RouteHintHop_set_src_node_id(this_ptr, encodeArray(val));
16886                 // debug statements here
16887         }
16888         // uint64_t RouteHintHop_get_short_channel_id(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
16889         export function RouteHintHop_get_short_channel_id(this_ptr: number): number {
16890                 if(!isWasmInitialized) {
16891                         throw new Error("initializeWasm() must be awaited first!");
16892                 }
16893                 const nativeResponseValue = wasm.RouteHintHop_get_short_channel_id(this_ptr);
16894                 return nativeResponseValue;
16895         }
16896         // void RouteHintHop_set_short_channel_id(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint64_t val);
16897         export function RouteHintHop_set_short_channel_id(this_ptr: number, val: number): void {
16898                 if(!isWasmInitialized) {
16899                         throw new Error("initializeWasm() must be awaited first!");
16900                 }
16901                 const nativeResponseValue = wasm.RouteHintHop_set_short_channel_id(this_ptr, val);
16902                 // debug statements here
16903         }
16904         // struct LDKRoutingFees RouteHintHop_get_fees(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
16905         export function RouteHintHop_get_fees(this_ptr: number): number {
16906                 if(!isWasmInitialized) {
16907                         throw new Error("initializeWasm() must be awaited first!");
16908                 }
16909                 const nativeResponseValue = wasm.RouteHintHop_get_fees(this_ptr);
16910                 return nativeResponseValue;
16911         }
16912         // void RouteHintHop_set_fees(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKRoutingFees val);
16913         export function RouteHintHop_set_fees(this_ptr: number, val: number): void {
16914                 if(!isWasmInitialized) {
16915                         throw new Error("initializeWasm() must be awaited first!");
16916                 }
16917                 const nativeResponseValue = wasm.RouteHintHop_set_fees(this_ptr, val);
16918                 // debug statements here
16919         }
16920         // uint16_t RouteHintHop_get_cltv_expiry_delta(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
16921         export function RouteHintHop_get_cltv_expiry_delta(this_ptr: number): number {
16922                 if(!isWasmInitialized) {
16923                         throw new Error("initializeWasm() must be awaited first!");
16924                 }
16925                 const nativeResponseValue = wasm.RouteHintHop_get_cltv_expiry_delta(this_ptr);
16926                 return nativeResponseValue;
16927         }
16928         // void RouteHintHop_set_cltv_expiry_delta(struct LDKRouteHintHop *NONNULL_PTR this_ptr, uint16_t val);
16929         export function RouteHintHop_set_cltv_expiry_delta(this_ptr: number, val: number): void {
16930                 if(!isWasmInitialized) {
16931                         throw new Error("initializeWasm() must be awaited first!");
16932                 }
16933                 const nativeResponseValue = wasm.RouteHintHop_set_cltv_expiry_delta(this_ptr, val);
16934                 // debug statements here
16935         }
16936         // struct LDKCOption_u64Z RouteHintHop_get_htlc_minimum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
16937         export function RouteHintHop_get_htlc_minimum_msat(this_ptr: number): number {
16938                 if(!isWasmInitialized) {
16939                         throw new Error("initializeWasm() must be awaited first!");
16940                 }
16941                 const nativeResponseValue = wasm.RouteHintHop_get_htlc_minimum_msat(this_ptr);
16942                 return nativeResponseValue;
16943         }
16944         // void RouteHintHop_set_htlc_minimum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
16945         export function RouteHintHop_set_htlc_minimum_msat(this_ptr: number, val: number): void {
16946                 if(!isWasmInitialized) {
16947                         throw new Error("initializeWasm() must be awaited first!");
16948                 }
16949                 const nativeResponseValue = wasm.RouteHintHop_set_htlc_minimum_msat(this_ptr, val);
16950                 // debug statements here
16951         }
16952         // struct LDKCOption_u64Z RouteHintHop_get_htlc_maximum_msat(const struct LDKRouteHintHop *NONNULL_PTR this_ptr);
16953         export function RouteHintHop_get_htlc_maximum_msat(this_ptr: number): number {
16954                 if(!isWasmInitialized) {
16955                         throw new Error("initializeWasm() must be awaited first!");
16956                 }
16957                 const nativeResponseValue = wasm.RouteHintHop_get_htlc_maximum_msat(this_ptr);
16958                 return nativeResponseValue;
16959         }
16960         // void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this_ptr, struct LDKCOption_u64Z val);
16961         export function RouteHintHop_set_htlc_maximum_msat(this_ptr: number, val: number): void {
16962                 if(!isWasmInitialized) {
16963                         throw new Error("initializeWasm() must be awaited first!");
16964                 }
16965                 const nativeResponseValue = wasm.RouteHintHop_set_htlc_maximum_msat(this_ptr, val);
16966                 // debug statements here
16967         }
16968         // 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);
16969         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 {
16970                 if(!isWasmInitialized) {
16971                         throw new Error("initializeWasm() must be awaited first!");
16972                 }
16973                 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);
16974                 return nativeResponseValue;
16975         }
16976         // struct LDKRouteHintHop RouteHintHop_clone(const struct LDKRouteHintHop *NONNULL_PTR orig);
16977         export function RouteHintHop_clone(orig: number): number {
16978                 if(!isWasmInitialized) {
16979                         throw new Error("initializeWasm() must be awaited first!");
16980                 }
16981                 const nativeResponseValue = wasm.RouteHintHop_clone(orig);
16982                 return nativeResponseValue;
16983         }
16984         // uint64_t RouteHintHop_hash(const struct LDKRouteHintHop *NONNULL_PTR o);
16985         export function RouteHintHop_hash(o: number): number {
16986                 if(!isWasmInitialized) {
16987                         throw new Error("initializeWasm() must be awaited first!");
16988                 }
16989                 const nativeResponseValue = wasm.RouteHintHop_hash(o);
16990                 return nativeResponseValue;
16991         }
16992         // bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b);
16993         export function RouteHintHop_eq(a: number, b: number): boolean {
16994                 if(!isWasmInitialized) {
16995                         throw new Error("initializeWasm() must be awaited first!");
16996                 }
16997                 const nativeResponseValue = wasm.RouteHintHop_eq(a, b);
16998                 return nativeResponseValue;
16999         }
17000         // 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);
17001         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 {
17002                 if(!isWasmInitialized) {
17003                         throw new Error("initializeWasm() must be awaited first!");
17004                 }
17005                 const nativeResponseValue = wasm.get_keysend_route(encodeArray(our_node_pubkey), network, encodeArray(payee), first_hops, last_hops, final_value_msat, final_cltv, logger, scorer);
17006                 return nativeResponseValue;
17007         }
17008         // 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);
17009         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 {
17010                 if(!isWasmInitialized) {
17011                         throw new Error("initializeWasm() must be awaited first!");
17012                 }
17013                 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);
17014                 return nativeResponseValue;
17015         }
17016         // void Scorer_free(struct LDKScorer this_obj);
17017         export function Scorer_free(this_obj: number): void {
17018                 if(!isWasmInitialized) {
17019                         throw new Error("initializeWasm() must be awaited first!");
17020                 }
17021                 const nativeResponseValue = wasm.Scorer_free(this_obj);
17022                 // debug statements here
17023         }
17024         // MUST_USE_RES struct LDKScorer Scorer_new(uint64_t base_penalty_msat);
17025         export function Scorer_new(base_penalty_msat: number): number {
17026                 if(!isWasmInitialized) {
17027                         throw new Error("initializeWasm() must be awaited first!");
17028                 }
17029                 const nativeResponseValue = wasm.Scorer_new(base_penalty_msat);
17030                 return nativeResponseValue;
17031         }
17032         // MUST_USE_RES struct LDKScorer Scorer_default(void);
17033         export function Scorer_default(): number {
17034                 if(!isWasmInitialized) {
17035                         throw new Error("initializeWasm() must be awaited first!");
17036                 }
17037                 const nativeResponseValue = wasm.Scorer_default();
17038                 return nativeResponseValue;
17039         }
17040         // struct LDKScore Scorer_as_Score(const struct LDKScorer *NONNULL_PTR this_arg);
17041         export function Scorer_as_Score(this_arg: number): number {
17042                 if(!isWasmInitialized) {
17043                         throw new Error("initializeWasm() must be awaited first!");
17044                 }
17045                 const nativeResponseValue = wasm.Scorer_as_Score(this_arg);
17046                 return nativeResponseValue;
17047         }
17048         // void FilesystemPersister_free(struct LDKFilesystemPersister this_obj);
17049         export function FilesystemPersister_free(this_obj: number): void {
17050                 if(!isWasmInitialized) {
17051                         throw new Error("initializeWasm() must be awaited first!");
17052                 }
17053                 const nativeResponseValue = wasm.FilesystemPersister_free(this_obj);
17054                 // debug statements here
17055         }
17056         // MUST_USE_RES struct LDKFilesystemPersister FilesystemPersister_new(struct LDKStr path_to_channel_data);
17057         export function FilesystemPersister_new(path_to_channel_data: String): number {
17058                 if(!isWasmInitialized) {
17059                         throw new Error("initializeWasm() must be awaited first!");
17060                 }
17061                 const nativeResponseValue = wasm.FilesystemPersister_new(path_to_channel_data);
17062                 return nativeResponseValue;
17063         }
17064         // MUST_USE_RES struct LDKStr FilesystemPersister_get_data_dir(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
17065         export function FilesystemPersister_get_data_dir(this_arg: number): String {
17066                 if(!isWasmInitialized) {
17067                         throw new Error("initializeWasm() must be awaited first!");
17068                 }
17069                 const nativeResponseValue = wasm.FilesystemPersister_get_data_dir(this_arg);
17070                 return nativeResponseValue;
17071         }
17072         // MUST_USE_RES struct LDKCResult_NoneErrorZ FilesystemPersister_persist_manager(struct LDKStr data_dir, const struct LDKChannelManager *NONNULL_PTR manager);
17073         export function FilesystemPersister_persist_manager(data_dir: String, manager: number): number {
17074                 if(!isWasmInitialized) {
17075                         throw new Error("initializeWasm() must be awaited first!");
17076                 }
17077                 const nativeResponseValue = wasm.FilesystemPersister_persist_manager(data_dir, manager);
17078                 return nativeResponseValue;
17079         }
17080         // MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ FilesystemPersister_read_channelmonitors(const struct LDKFilesystemPersister *NONNULL_PTR this_arg, struct LDKKeysInterface keys_manager);
17081         export function FilesystemPersister_read_channelmonitors(this_arg: number, keys_manager: number): number {
17082                 if(!isWasmInitialized) {
17083                         throw new Error("initializeWasm() must be awaited first!");
17084                 }
17085                 const nativeResponseValue = wasm.FilesystemPersister_read_channelmonitors(this_arg, keys_manager);
17086                 return nativeResponseValue;
17087         }
17088         // struct LDKPersist FilesystemPersister_as_Persist(const struct LDKFilesystemPersister *NONNULL_PTR this_arg);
17089         export function FilesystemPersister_as_Persist(this_arg: number): number {
17090                 if(!isWasmInitialized) {
17091                         throw new Error("initializeWasm() must be awaited first!");
17092                 }
17093                 const nativeResponseValue = wasm.FilesystemPersister_as_Persist(this_arg);
17094                 return nativeResponseValue;
17095         }
17096         // void BackgroundProcessor_free(struct LDKBackgroundProcessor this_obj);
17097         export function BackgroundProcessor_free(this_obj: number): void {
17098                 if(!isWasmInitialized) {
17099                         throw new Error("initializeWasm() must be awaited first!");
17100                 }
17101                 const nativeResponseValue = wasm.BackgroundProcessor_free(this_obj);
17102                 // debug statements here
17103         }
17104         // void ChannelManagerPersister_free(struct LDKChannelManagerPersister this_ptr);
17105         export function ChannelManagerPersister_free(this_ptr: number): void {
17106                 if(!isWasmInitialized) {
17107                         throw new Error("initializeWasm() must be awaited first!");
17108                 }
17109                 const nativeResponseValue = wasm.ChannelManagerPersister_free(this_ptr);
17110                 // debug statements here
17111         }
17112         // 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);
17113         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 {
17114                 if(!isWasmInitialized) {
17115                         throw new Error("initializeWasm() must be awaited first!");
17116                 }
17117                 const nativeResponseValue = wasm.BackgroundProcessor_start(persister, event_handler, chain_monitor, channel_manager, net_graph_msg_handler, peer_manager, logger);
17118                 return nativeResponseValue;
17119         }
17120         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_join(struct LDKBackgroundProcessor this_arg);
17121         export function BackgroundProcessor_join(this_arg: number): number {
17122                 if(!isWasmInitialized) {
17123                         throw new Error("initializeWasm() must be awaited first!");
17124                 }
17125                 const nativeResponseValue = wasm.BackgroundProcessor_join(this_arg);
17126                 return nativeResponseValue;
17127         }
17128         // MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg);
17129         export function BackgroundProcessor_stop(this_arg: number): number {
17130                 if(!isWasmInitialized) {
17131                         throw new Error("initializeWasm() must be awaited first!");
17132                 }
17133                 const nativeResponseValue = wasm.BackgroundProcessor_stop(this_arg);
17134                 return nativeResponseValue;
17135         }
17136         // void check_platform(void);
17137         export function check_platform(): void {
17138                 if(!isWasmInitialized) {
17139                         throw new Error("initializeWasm() must be awaited first!");
17140                 }
17141                 const nativeResponseValue = wasm.check_platform();
17142                 // debug statements here
17143         }
17144         // void Invoice_free(struct LDKInvoice this_obj);
17145         export function Invoice_free(this_obj: number): void {
17146                 if(!isWasmInitialized) {
17147                         throw new Error("initializeWasm() must be awaited first!");
17148                 }
17149                 const nativeResponseValue = wasm.Invoice_free(this_obj);
17150                 // debug statements here
17151         }
17152         // bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice *NONNULL_PTR b);
17153         export function Invoice_eq(a: number, b: number): boolean {
17154                 if(!isWasmInitialized) {
17155                         throw new Error("initializeWasm() must be awaited first!");
17156                 }
17157                 const nativeResponseValue = wasm.Invoice_eq(a, b);
17158                 return nativeResponseValue;
17159         }
17160         // struct LDKInvoice Invoice_clone(const struct LDKInvoice *NONNULL_PTR orig);
17161         export function Invoice_clone(orig: number): number {
17162                 if(!isWasmInitialized) {
17163                         throw new Error("initializeWasm() must be awaited first!");
17164                 }
17165                 const nativeResponseValue = wasm.Invoice_clone(orig);
17166                 return nativeResponseValue;
17167         }
17168         // void SignedRawInvoice_free(struct LDKSignedRawInvoice this_obj);
17169         export function SignedRawInvoice_free(this_obj: number): void {
17170                 if(!isWasmInitialized) {
17171                         throw new Error("initializeWasm() must be awaited first!");
17172                 }
17173                 const nativeResponseValue = wasm.SignedRawInvoice_free(this_obj);
17174                 // debug statements here
17175         }
17176         // bool SignedRawInvoice_eq(const struct LDKSignedRawInvoice *NONNULL_PTR a, const struct LDKSignedRawInvoice *NONNULL_PTR b);
17177         export function SignedRawInvoice_eq(a: number, b: number): boolean {
17178                 if(!isWasmInitialized) {
17179                         throw new Error("initializeWasm() must be awaited first!");
17180                 }
17181                 const nativeResponseValue = wasm.SignedRawInvoice_eq(a, b);
17182                 return nativeResponseValue;
17183         }
17184         // struct LDKSignedRawInvoice SignedRawInvoice_clone(const struct LDKSignedRawInvoice *NONNULL_PTR orig);
17185         export function SignedRawInvoice_clone(orig: number): number {
17186                 if(!isWasmInitialized) {
17187                         throw new Error("initializeWasm() must be awaited first!");
17188                 }
17189                 const nativeResponseValue = wasm.SignedRawInvoice_clone(orig);
17190                 return nativeResponseValue;
17191         }
17192         // void RawInvoice_free(struct LDKRawInvoice this_obj);
17193         export function RawInvoice_free(this_obj: number): void {
17194                 if(!isWasmInitialized) {
17195                         throw new Error("initializeWasm() must be awaited first!");
17196                 }
17197                 const nativeResponseValue = wasm.RawInvoice_free(this_obj);
17198                 // debug statements here
17199         }
17200         // struct LDKRawDataPart RawInvoice_get_data(const struct LDKRawInvoice *NONNULL_PTR this_ptr);
17201         export function RawInvoice_get_data(this_ptr: number): number {
17202                 if(!isWasmInitialized) {
17203                         throw new Error("initializeWasm() must be awaited first!");
17204                 }
17205                 const nativeResponseValue = wasm.RawInvoice_get_data(this_ptr);
17206                 return nativeResponseValue;
17207         }
17208         // void RawInvoice_set_data(struct LDKRawInvoice *NONNULL_PTR this_ptr, struct LDKRawDataPart val);
17209         export function RawInvoice_set_data(this_ptr: number, val: number): void {
17210                 if(!isWasmInitialized) {
17211                         throw new Error("initializeWasm() must be awaited first!");
17212                 }
17213                 const nativeResponseValue = wasm.RawInvoice_set_data(this_ptr, val);
17214                 // debug statements here
17215         }
17216         // bool RawInvoice_eq(const struct LDKRawInvoice *NONNULL_PTR a, const struct LDKRawInvoice *NONNULL_PTR b);
17217         export function RawInvoice_eq(a: number, b: number): boolean {
17218                 if(!isWasmInitialized) {
17219                         throw new Error("initializeWasm() must be awaited first!");
17220                 }
17221                 const nativeResponseValue = wasm.RawInvoice_eq(a, b);
17222                 return nativeResponseValue;
17223         }
17224         // struct LDKRawInvoice RawInvoice_clone(const struct LDKRawInvoice *NONNULL_PTR orig);
17225         export function RawInvoice_clone(orig: number): number {
17226                 if(!isWasmInitialized) {
17227                         throw new Error("initializeWasm() must be awaited first!");
17228                 }
17229                 const nativeResponseValue = wasm.RawInvoice_clone(orig);
17230                 return nativeResponseValue;
17231         }
17232         // void RawDataPart_free(struct LDKRawDataPart this_obj);
17233         export function RawDataPart_free(this_obj: number): void {
17234                 if(!isWasmInitialized) {
17235                         throw new Error("initializeWasm() must be awaited first!");
17236                 }
17237                 const nativeResponseValue = wasm.RawDataPart_free(this_obj);
17238                 // debug statements here
17239         }
17240         // struct LDKPositiveTimestamp RawDataPart_get_timestamp(const struct LDKRawDataPart *NONNULL_PTR this_ptr);
17241         export function RawDataPart_get_timestamp(this_ptr: number): number {
17242                 if(!isWasmInitialized) {
17243                         throw new Error("initializeWasm() must be awaited first!");
17244                 }
17245                 const nativeResponseValue = wasm.RawDataPart_get_timestamp(this_ptr);
17246                 return nativeResponseValue;
17247         }
17248         // void RawDataPart_set_timestamp(struct LDKRawDataPart *NONNULL_PTR this_ptr, struct LDKPositiveTimestamp val);
17249         export function RawDataPart_set_timestamp(this_ptr: number, val: number): void {
17250                 if(!isWasmInitialized) {
17251                         throw new Error("initializeWasm() must be awaited first!");
17252                 }
17253                 const nativeResponseValue = wasm.RawDataPart_set_timestamp(this_ptr, val);
17254                 // debug statements here
17255         }
17256         // bool RawDataPart_eq(const struct LDKRawDataPart *NONNULL_PTR a, const struct LDKRawDataPart *NONNULL_PTR b);
17257         export function RawDataPart_eq(a: number, b: number): boolean {
17258                 if(!isWasmInitialized) {
17259                         throw new Error("initializeWasm() must be awaited first!");
17260                 }
17261                 const nativeResponseValue = wasm.RawDataPart_eq(a, b);
17262                 return nativeResponseValue;
17263         }
17264         // struct LDKRawDataPart RawDataPart_clone(const struct LDKRawDataPart *NONNULL_PTR orig);
17265         export function RawDataPart_clone(orig: number): number {
17266                 if(!isWasmInitialized) {
17267                         throw new Error("initializeWasm() must be awaited first!");
17268                 }
17269                 const nativeResponseValue = wasm.RawDataPart_clone(orig);
17270                 return nativeResponseValue;
17271         }
17272         // void PositiveTimestamp_free(struct LDKPositiveTimestamp this_obj);
17273         export function PositiveTimestamp_free(this_obj: number): void {
17274                 if(!isWasmInitialized) {
17275                         throw new Error("initializeWasm() must be awaited first!");
17276                 }
17277                 const nativeResponseValue = wasm.PositiveTimestamp_free(this_obj);
17278                 // debug statements here
17279         }
17280         // bool PositiveTimestamp_eq(const struct LDKPositiveTimestamp *NONNULL_PTR a, const struct LDKPositiveTimestamp *NONNULL_PTR b);
17281         export function PositiveTimestamp_eq(a: number, b: number): boolean {
17282                 if(!isWasmInitialized) {
17283                         throw new Error("initializeWasm() must be awaited first!");
17284                 }
17285                 const nativeResponseValue = wasm.PositiveTimestamp_eq(a, b);
17286                 return nativeResponseValue;
17287         }
17288         // struct LDKPositiveTimestamp PositiveTimestamp_clone(const struct LDKPositiveTimestamp *NONNULL_PTR orig);
17289         export function PositiveTimestamp_clone(orig: number): number {
17290                 if(!isWasmInitialized) {
17291                         throw new Error("initializeWasm() must be awaited first!");
17292                 }
17293                 const nativeResponseValue = wasm.PositiveTimestamp_clone(orig);
17294                 return nativeResponseValue;
17295         }
17296         // enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig);
17297         export function SiPrefix_clone(orig: number): SiPrefix {
17298                 if(!isWasmInitialized) {
17299                         throw new Error("initializeWasm() must be awaited first!");
17300                 }
17301                 const nativeResponseValue = wasm.SiPrefix_clone(orig);
17302                 return nativeResponseValue;
17303         }
17304         // enum LDKSiPrefix SiPrefix_milli(void);
17305         export function SiPrefix_milli(): SiPrefix {
17306                 if(!isWasmInitialized) {
17307                         throw new Error("initializeWasm() must be awaited first!");
17308                 }
17309                 const nativeResponseValue = wasm.SiPrefix_milli();
17310                 return nativeResponseValue;
17311         }
17312         // enum LDKSiPrefix SiPrefix_micro(void);
17313         export function SiPrefix_micro(): SiPrefix {
17314                 if(!isWasmInitialized) {
17315                         throw new Error("initializeWasm() must be awaited first!");
17316                 }
17317                 const nativeResponseValue = wasm.SiPrefix_micro();
17318                 return nativeResponseValue;
17319         }
17320         // enum LDKSiPrefix SiPrefix_nano(void);
17321         export function SiPrefix_nano(): SiPrefix {
17322                 if(!isWasmInitialized) {
17323                         throw new Error("initializeWasm() must be awaited first!");
17324                 }
17325                 const nativeResponseValue = wasm.SiPrefix_nano();
17326                 return nativeResponseValue;
17327         }
17328         // enum LDKSiPrefix SiPrefix_pico(void);
17329         export function SiPrefix_pico(): SiPrefix {
17330                 if(!isWasmInitialized) {
17331                         throw new Error("initializeWasm() must be awaited first!");
17332                 }
17333                 const nativeResponseValue = wasm.SiPrefix_pico();
17334                 return nativeResponseValue;
17335         }
17336         // bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b);
17337         export function SiPrefix_eq(a: number, b: number): boolean {
17338                 if(!isWasmInitialized) {
17339                         throw new Error("initializeWasm() must be awaited first!");
17340                 }
17341                 const nativeResponseValue = wasm.SiPrefix_eq(a, b);
17342                 return nativeResponseValue;
17343         }
17344         // MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR this_arg);
17345         export function SiPrefix_multiplier(this_arg: number): number {
17346                 if(!isWasmInitialized) {
17347                         throw new Error("initializeWasm() must be awaited first!");
17348                 }
17349                 const nativeResponseValue = wasm.SiPrefix_multiplier(this_arg);
17350                 return nativeResponseValue;
17351         }
17352         // enum LDKCurrency Currency_clone(const enum LDKCurrency *NONNULL_PTR orig);
17353         export function Currency_clone(orig: number): Currency {
17354                 if(!isWasmInitialized) {
17355                         throw new Error("initializeWasm() must be awaited first!");
17356                 }
17357                 const nativeResponseValue = wasm.Currency_clone(orig);
17358                 return nativeResponseValue;
17359         }
17360         // enum LDKCurrency Currency_bitcoin(void);
17361         export function Currency_bitcoin(): Currency {
17362                 if(!isWasmInitialized) {
17363                         throw new Error("initializeWasm() must be awaited first!");
17364                 }
17365                 const nativeResponseValue = wasm.Currency_bitcoin();
17366                 return nativeResponseValue;
17367         }
17368         // enum LDKCurrency Currency_bitcoin_testnet(void);
17369         export function Currency_bitcoin_testnet(): Currency {
17370                 if(!isWasmInitialized) {
17371                         throw new Error("initializeWasm() must be awaited first!");
17372                 }
17373                 const nativeResponseValue = wasm.Currency_bitcoin_testnet();
17374                 return nativeResponseValue;
17375         }
17376         // enum LDKCurrency Currency_regtest(void);
17377         export function Currency_regtest(): Currency {
17378                 if(!isWasmInitialized) {
17379                         throw new Error("initializeWasm() must be awaited first!");
17380                 }
17381                 const nativeResponseValue = wasm.Currency_regtest();
17382                 return nativeResponseValue;
17383         }
17384         // enum LDKCurrency Currency_simnet(void);
17385         export function Currency_simnet(): Currency {
17386                 if(!isWasmInitialized) {
17387                         throw new Error("initializeWasm() must be awaited first!");
17388                 }
17389                 const nativeResponseValue = wasm.Currency_simnet();
17390                 return nativeResponseValue;
17391         }
17392         // enum LDKCurrency Currency_signet(void);
17393         export function Currency_signet(): Currency {
17394                 if(!isWasmInitialized) {
17395                         throw new Error("initializeWasm() must be awaited first!");
17396                 }
17397                 const nativeResponseValue = wasm.Currency_signet();
17398                 return nativeResponseValue;
17399         }
17400         // uint64_t Currency_hash(const enum LDKCurrency *NONNULL_PTR o);
17401         export function Currency_hash(o: number): number {
17402                 if(!isWasmInitialized) {
17403                         throw new Error("initializeWasm() must be awaited first!");
17404                 }
17405                 const nativeResponseValue = wasm.Currency_hash(o);
17406                 return nativeResponseValue;
17407         }
17408         // bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b);
17409         export function Currency_eq(a: number, b: number): boolean {
17410                 if(!isWasmInitialized) {
17411                         throw new Error("initializeWasm() must be awaited first!");
17412                 }
17413                 const nativeResponseValue = wasm.Currency_eq(a, b);
17414                 return nativeResponseValue;
17415         }
17416         // void Sha256_free(struct LDKSha256 this_obj);
17417         export function Sha256_free(this_obj: number): void {
17418                 if(!isWasmInitialized) {
17419                         throw new Error("initializeWasm() must be awaited first!");
17420                 }
17421                 const nativeResponseValue = wasm.Sha256_free(this_obj);
17422                 // debug statements here
17423         }
17424         // struct LDKSha256 Sha256_clone(const struct LDKSha256 *NONNULL_PTR orig);
17425         export function Sha256_clone(orig: number): number {
17426                 if(!isWasmInitialized) {
17427                         throw new Error("initializeWasm() must be awaited first!");
17428                 }
17429                 const nativeResponseValue = wasm.Sha256_clone(orig);
17430                 return nativeResponseValue;
17431         }
17432         // uint64_t Sha256_hash(const struct LDKSha256 *NONNULL_PTR o);
17433         export function Sha256_hash(o: number): number {
17434                 if(!isWasmInitialized) {
17435                         throw new Error("initializeWasm() must be awaited first!");
17436                 }
17437                 const nativeResponseValue = wasm.Sha256_hash(o);
17438                 return nativeResponseValue;
17439         }
17440         // bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b);
17441         export function Sha256_eq(a: number, b: number): boolean {
17442                 if(!isWasmInitialized) {
17443                         throw new Error("initializeWasm() must be awaited first!");
17444                 }
17445                 const nativeResponseValue = wasm.Sha256_eq(a, b);
17446                 return nativeResponseValue;
17447         }
17448         // void Description_free(struct LDKDescription this_obj);
17449         export function Description_free(this_obj: number): void {
17450                 if(!isWasmInitialized) {
17451                         throw new Error("initializeWasm() must be awaited first!");
17452                 }
17453                 const nativeResponseValue = wasm.Description_free(this_obj);
17454                 // debug statements here
17455         }
17456         // struct LDKDescription Description_clone(const struct LDKDescription *NONNULL_PTR orig);
17457         export function Description_clone(orig: number): number {
17458                 if(!isWasmInitialized) {
17459                         throw new Error("initializeWasm() must be awaited first!");
17460                 }
17461                 const nativeResponseValue = wasm.Description_clone(orig);
17462                 return nativeResponseValue;
17463         }
17464         // uint64_t Description_hash(const struct LDKDescription *NONNULL_PTR o);
17465         export function Description_hash(o: number): number {
17466                 if(!isWasmInitialized) {
17467                         throw new Error("initializeWasm() must be awaited first!");
17468                 }
17469                 const nativeResponseValue = wasm.Description_hash(o);
17470                 return nativeResponseValue;
17471         }
17472         // bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b);
17473         export function Description_eq(a: number, b: number): boolean {
17474                 if(!isWasmInitialized) {
17475                         throw new Error("initializeWasm() must be awaited first!");
17476                 }
17477                 const nativeResponseValue = wasm.Description_eq(a, b);
17478                 return nativeResponseValue;
17479         }
17480         // void PayeePubKey_free(struct LDKPayeePubKey this_obj);
17481         export function PayeePubKey_free(this_obj: number): void {
17482                 if(!isWasmInitialized) {
17483                         throw new Error("initializeWasm() must be awaited first!");
17484                 }
17485                 const nativeResponseValue = wasm.PayeePubKey_free(this_obj);
17486                 // debug statements here
17487         }
17488         // struct LDKPayeePubKey PayeePubKey_clone(const struct LDKPayeePubKey *NONNULL_PTR orig);
17489         export function PayeePubKey_clone(orig: number): number {
17490                 if(!isWasmInitialized) {
17491                         throw new Error("initializeWasm() must be awaited first!");
17492                 }
17493                 const nativeResponseValue = wasm.PayeePubKey_clone(orig);
17494                 return nativeResponseValue;
17495         }
17496         // uint64_t PayeePubKey_hash(const struct LDKPayeePubKey *NONNULL_PTR o);
17497         export function PayeePubKey_hash(o: number): number {
17498                 if(!isWasmInitialized) {
17499                         throw new Error("initializeWasm() must be awaited first!");
17500                 }
17501                 const nativeResponseValue = wasm.PayeePubKey_hash(o);
17502                 return nativeResponseValue;
17503         }
17504         // bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b);
17505         export function PayeePubKey_eq(a: number, b: number): boolean {
17506                 if(!isWasmInitialized) {
17507                         throw new Error("initializeWasm() must be awaited first!");
17508                 }
17509                 const nativeResponseValue = wasm.PayeePubKey_eq(a, b);
17510                 return nativeResponseValue;
17511         }
17512         // void ExpiryTime_free(struct LDKExpiryTime this_obj);
17513         export function ExpiryTime_free(this_obj: number): void {
17514                 if(!isWasmInitialized) {
17515                         throw new Error("initializeWasm() must be awaited first!");
17516                 }
17517                 const nativeResponseValue = wasm.ExpiryTime_free(this_obj);
17518                 // debug statements here
17519         }
17520         // struct LDKExpiryTime ExpiryTime_clone(const struct LDKExpiryTime *NONNULL_PTR orig);
17521         export function ExpiryTime_clone(orig: number): number {
17522                 if(!isWasmInitialized) {
17523                         throw new Error("initializeWasm() must be awaited first!");
17524                 }
17525                 const nativeResponseValue = wasm.ExpiryTime_clone(orig);
17526                 return nativeResponseValue;
17527         }
17528         // uint64_t ExpiryTime_hash(const struct LDKExpiryTime *NONNULL_PTR o);
17529         export function ExpiryTime_hash(o: number): number {
17530                 if(!isWasmInitialized) {
17531                         throw new Error("initializeWasm() must be awaited first!");
17532                 }
17533                 const nativeResponseValue = wasm.ExpiryTime_hash(o);
17534                 return nativeResponseValue;
17535         }
17536         // bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b);
17537         export function ExpiryTime_eq(a: number, b: number): boolean {
17538                 if(!isWasmInitialized) {
17539                         throw new Error("initializeWasm() must be awaited first!");
17540                 }
17541                 const nativeResponseValue = wasm.ExpiryTime_eq(a, b);
17542                 return nativeResponseValue;
17543         }
17544         // void MinFinalCltvExpiry_free(struct LDKMinFinalCltvExpiry this_obj);
17545         export function MinFinalCltvExpiry_free(this_obj: number): void {
17546                 if(!isWasmInitialized) {
17547                         throw new Error("initializeWasm() must be awaited first!");
17548                 }
17549                 const nativeResponseValue = wasm.MinFinalCltvExpiry_free(this_obj);
17550                 // debug statements here
17551         }
17552         // struct LDKMinFinalCltvExpiry MinFinalCltvExpiry_clone(const struct LDKMinFinalCltvExpiry *NONNULL_PTR orig);
17553         export function MinFinalCltvExpiry_clone(orig: number): number {
17554                 if(!isWasmInitialized) {
17555                         throw new Error("initializeWasm() must be awaited first!");
17556                 }
17557                 const nativeResponseValue = wasm.MinFinalCltvExpiry_clone(orig);
17558                 return nativeResponseValue;
17559         }
17560         // uint64_t MinFinalCltvExpiry_hash(const struct LDKMinFinalCltvExpiry *NONNULL_PTR o);
17561         export function MinFinalCltvExpiry_hash(o: number): number {
17562                 if(!isWasmInitialized) {
17563                         throw new Error("initializeWasm() must be awaited first!");
17564                 }
17565                 const nativeResponseValue = wasm.MinFinalCltvExpiry_hash(o);
17566                 return nativeResponseValue;
17567         }
17568         // bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b);
17569         export function MinFinalCltvExpiry_eq(a: number, b: number): boolean {
17570                 if(!isWasmInitialized) {
17571                         throw new Error("initializeWasm() must be awaited first!");
17572                 }
17573                 const nativeResponseValue = wasm.MinFinalCltvExpiry_eq(a, b);
17574                 return nativeResponseValue;
17575         }
17576         // void Fallback_free(struct LDKFallback this_ptr);
17577         export function Fallback_free(this_ptr: number): void {
17578                 if(!isWasmInitialized) {
17579                         throw new Error("initializeWasm() must be awaited first!");
17580                 }
17581                 const nativeResponseValue = wasm.Fallback_free(this_ptr);
17582                 // debug statements here
17583         }
17584         // struct LDKFallback Fallback_clone(const struct LDKFallback *NONNULL_PTR orig);
17585         export function Fallback_clone(orig: number): number {
17586                 if(!isWasmInitialized) {
17587                         throw new Error("initializeWasm() must be awaited first!");
17588                 }
17589                 const nativeResponseValue = wasm.Fallback_clone(orig);
17590                 return nativeResponseValue;
17591         }
17592         // struct LDKFallback Fallback_seg_wit_program(struct LDKu5 version, struct LDKCVec_u8Z program);
17593         export function Fallback_seg_wit_program(version: number, program: Uint8Array): number {
17594                 if(!isWasmInitialized) {
17595                         throw new Error("initializeWasm() must be awaited first!");
17596                 }
17597                 const nativeResponseValue = wasm.Fallback_seg_wit_program(version, encodeArray(program));
17598                 return nativeResponseValue;
17599         }
17600         // struct LDKFallback Fallback_pub_key_hash(struct LDKTwentyBytes a);
17601         export function Fallback_pub_key_hash(a: Uint8Array): number {
17602                 if(!isWasmInitialized) {
17603                         throw new Error("initializeWasm() must be awaited first!");
17604                 }
17605                 const nativeResponseValue = wasm.Fallback_pub_key_hash(encodeArray(a));
17606                 return nativeResponseValue;
17607         }
17608         // struct LDKFallback Fallback_script_hash(struct LDKTwentyBytes a);
17609         export function Fallback_script_hash(a: Uint8Array): number {
17610                 if(!isWasmInitialized) {
17611                         throw new Error("initializeWasm() must be awaited first!");
17612                 }
17613                 const nativeResponseValue = wasm.Fallback_script_hash(encodeArray(a));
17614                 return nativeResponseValue;
17615         }
17616         // uint64_t Fallback_hash(const struct LDKFallback *NONNULL_PTR o);
17617         export function Fallback_hash(o: number): number {
17618                 if(!isWasmInitialized) {
17619                         throw new Error("initializeWasm() must be awaited first!");
17620                 }
17621                 const nativeResponseValue = wasm.Fallback_hash(o);
17622                 return nativeResponseValue;
17623         }
17624         // bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b);
17625         export function Fallback_eq(a: number, b: number): boolean {
17626                 if(!isWasmInitialized) {
17627                         throw new Error("initializeWasm() must be awaited first!");
17628                 }
17629                 const nativeResponseValue = wasm.Fallback_eq(a, b);
17630                 return nativeResponseValue;
17631         }
17632         // void InvoiceSignature_free(struct LDKInvoiceSignature this_obj);
17633         export function InvoiceSignature_free(this_obj: number): void {
17634                 if(!isWasmInitialized) {
17635                         throw new Error("initializeWasm() must be awaited first!");
17636                 }
17637                 const nativeResponseValue = wasm.InvoiceSignature_free(this_obj);
17638                 // debug statements here
17639         }
17640         // struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignature *NONNULL_PTR orig);
17641         export function InvoiceSignature_clone(orig: number): number {
17642                 if(!isWasmInitialized) {
17643                         throw new Error("initializeWasm() must be awaited first!");
17644                 }
17645                 const nativeResponseValue = wasm.InvoiceSignature_clone(orig);
17646                 return nativeResponseValue;
17647         }
17648         // bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b);
17649         export function InvoiceSignature_eq(a: number, b: number): boolean {
17650                 if(!isWasmInitialized) {
17651                         throw new Error("initializeWasm() must be awaited first!");
17652                 }
17653                 const nativeResponseValue = wasm.InvoiceSignature_eq(a, b);
17654                 return nativeResponseValue;
17655         }
17656         // void PrivateRoute_free(struct LDKPrivateRoute this_obj);
17657         export function PrivateRoute_free(this_obj: number): void {
17658                 if(!isWasmInitialized) {
17659                         throw new Error("initializeWasm() must be awaited first!");
17660                 }
17661                 const nativeResponseValue = wasm.PrivateRoute_free(this_obj);
17662                 // debug statements here
17663         }
17664         // struct LDKPrivateRoute PrivateRoute_clone(const struct LDKPrivateRoute *NONNULL_PTR orig);
17665         export function PrivateRoute_clone(orig: number): number {
17666                 if(!isWasmInitialized) {
17667                         throw new Error("initializeWasm() must be awaited first!");
17668                 }
17669                 const nativeResponseValue = wasm.PrivateRoute_clone(orig);
17670                 return nativeResponseValue;
17671         }
17672         // uint64_t PrivateRoute_hash(const struct LDKPrivateRoute *NONNULL_PTR o);
17673         export function PrivateRoute_hash(o: number): number {
17674                 if(!isWasmInitialized) {
17675                         throw new Error("initializeWasm() must be awaited first!");
17676                 }
17677                 const nativeResponseValue = wasm.PrivateRoute_hash(o);
17678                 return nativeResponseValue;
17679         }
17680         // bool PrivateRoute_eq(const struct LDKPrivateRoute *NONNULL_PTR a, const struct LDKPrivateRoute *NONNULL_PTR b);
17681         export function PrivateRoute_eq(a: number, b: number): boolean {
17682                 if(!isWasmInitialized) {
17683                         throw new Error("initializeWasm() must be awaited first!");
17684                 }
17685                 const nativeResponseValue = wasm.PrivateRoute_eq(a, b);
17686                 return nativeResponseValue;
17687         }
17688         // MUST_USE_RES struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ SignedRawInvoice_into_parts(struct LDKSignedRawInvoice this_arg);
17689         export function SignedRawInvoice_into_parts(this_arg: number): number {
17690                 if(!isWasmInitialized) {
17691                         throw new Error("initializeWasm() must be awaited first!");
17692                 }
17693                 const nativeResponseValue = wasm.SignedRawInvoice_into_parts(this_arg);
17694                 return nativeResponseValue;
17695         }
17696         // MUST_USE_RES struct LDKRawInvoice SignedRawInvoice_raw_invoice(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
17697         export function SignedRawInvoice_raw_invoice(this_arg: number): number {
17698                 if(!isWasmInitialized) {
17699                         throw new Error("initializeWasm() must be awaited first!");
17700                 }
17701                 const nativeResponseValue = wasm.SignedRawInvoice_raw_invoice(this_arg);
17702                 return nativeResponseValue;
17703         }
17704         // MUST_USE_RES const uint8_t (*SignedRawInvoice_hash(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg))[32];
17705         export function SignedRawInvoice_hash(this_arg: number): Uint8Array {
17706                 if(!isWasmInitialized) {
17707                         throw new Error("initializeWasm() must be awaited first!");
17708                 }
17709                 const nativeResponseValue = wasm.SignedRawInvoice_hash(this_arg);
17710                 return decodeArray(nativeResponseValue);
17711         }
17712         // MUST_USE_RES struct LDKInvoiceSignature SignedRawInvoice_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
17713         export function SignedRawInvoice_signature(this_arg: number): number {
17714                 if(!isWasmInitialized) {
17715                         throw new Error("initializeWasm() must be awaited first!");
17716                 }
17717                 const nativeResponseValue = wasm.SignedRawInvoice_signature(this_arg);
17718                 return nativeResponseValue;
17719         }
17720         // MUST_USE_RES struct LDKCResult_PayeePubKeyErrorZ SignedRawInvoice_recover_payee_pub_key(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
17721         export function SignedRawInvoice_recover_payee_pub_key(this_arg: number): number {
17722                 if(!isWasmInitialized) {
17723                         throw new Error("initializeWasm() must be awaited first!");
17724                 }
17725                 const nativeResponseValue = wasm.SignedRawInvoice_recover_payee_pub_key(this_arg);
17726                 return nativeResponseValue;
17727         }
17728         // MUST_USE_RES bool SignedRawInvoice_check_signature(const struct LDKSignedRawInvoice *NONNULL_PTR this_arg);
17729         export function SignedRawInvoice_check_signature(this_arg: number): boolean {
17730                 if(!isWasmInitialized) {
17731                         throw new Error("initializeWasm() must be awaited first!");
17732                 }
17733                 const nativeResponseValue = wasm.SignedRawInvoice_check_signature(this_arg);
17734                 return nativeResponseValue;
17735         }
17736         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17737         export function RawInvoice_hash(this_arg: number): Uint8Array {
17738                 if(!isWasmInitialized) {
17739                         throw new Error("initializeWasm() must be awaited first!");
17740                 }
17741                 const nativeResponseValue = wasm.RawInvoice_hash(this_arg);
17742                 return decodeArray(nativeResponseValue);
17743         }
17744         // MUST_USE_RES struct LDKSha256 RawInvoice_payment_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17745         export function RawInvoice_payment_hash(this_arg: number): number {
17746                 if(!isWasmInitialized) {
17747                         throw new Error("initializeWasm() must be awaited first!");
17748                 }
17749                 const nativeResponseValue = wasm.RawInvoice_payment_hash(this_arg);
17750                 return nativeResponseValue;
17751         }
17752         // MUST_USE_RES struct LDKDescription RawInvoice_description(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17753         export function RawInvoice_description(this_arg: number): number {
17754                 if(!isWasmInitialized) {
17755                         throw new Error("initializeWasm() must be awaited first!");
17756                 }
17757                 const nativeResponseValue = wasm.RawInvoice_description(this_arg);
17758                 return nativeResponseValue;
17759         }
17760         // MUST_USE_RES struct LDKPayeePubKey RawInvoice_payee_pub_key(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17761         export function RawInvoice_payee_pub_key(this_arg: number): number {
17762                 if(!isWasmInitialized) {
17763                         throw new Error("initializeWasm() must be awaited first!");
17764                 }
17765                 const nativeResponseValue = wasm.RawInvoice_payee_pub_key(this_arg);
17766                 return nativeResponseValue;
17767         }
17768         // MUST_USE_RES struct LDKSha256 RawInvoice_description_hash(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17769         export function RawInvoice_description_hash(this_arg: number): number {
17770                 if(!isWasmInitialized) {
17771                         throw new Error("initializeWasm() must be awaited first!");
17772                 }
17773                 const nativeResponseValue = wasm.RawInvoice_description_hash(this_arg);
17774                 return nativeResponseValue;
17775         }
17776         // MUST_USE_RES struct LDKExpiryTime RawInvoice_expiry_time(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17777         export function RawInvoice_expiry_time(this_arg: number): number {
17778                 if(!isWasmInitialized) {
17779                         throw new Error("initializeWasm() must be awaited first!");
17780                 }
17781                 const nativeResponseValue = wasm.RawInvoice_expiry_time(this_arg);
17782                 return nativeResponseValue;
17783         }
17784         // MUST_USE_RES struct LDKMinFinalCltvExpiry RawInvoice_min_final_cltv_expiry(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17785         export function RawInvoice_min_final_cltv_expiry(this_arg: number): number {
17786                 if(!isWasmInitialized) {
17787                         throw new Error("initializeWasm() must be awaited first!");
17788                 }
17789                 const nativeResponseValue = wasm.RawInvoice_min_final_cltv_expiry(this_arg);
17790                 return nativeResponseValue;
17791         }
17792         // MUST_USE_RES struct LDKThirtyTwoBytes RawInvoice_payment_secret(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17793         export function RawInvoice_payment_secret(this_arg: number): Uint8Array {
17794                 if(!isWasmInitialized) {
17795                         throw new Error("initializeWasm() must be awaited first!");
17796                 }
17797                 const nativeResponseValue = wasm.RawInvoice_payment_secret(this_arg);
17798                 return decodeArray(nativeResponseValue);
17799         }
17800         // MUST_USE_RES struct LDKInvoiceFeatures RawInvoice_features(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17801         export function RawInvoice_features(this_arg: number): number {
17802                 if(!isWasmInitialized) {
17803                         throw new Error("initializeWasm() must be awaited first!");
17804                 }
17805                 const nativeResponseValue = wasm.RawInvoice_features(this_arg);
17806                 return nativeResponseValue;
17807         }
17808         // MUST_USE_RES struct LDKCVec_PrivateRouteZ RawInvoice_private_routes(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17809         export function RawInvoice_private_routes(this_arg: number): number[] {
17810                 if(!isWasmInitialized) {
17811                         throw new Error("initializeWasm() must be awaited first!");
17812                 }
17813                 const nativeResponseValue = wasm.RawInvoice_private_routes(this_arg);
17814                 return nativeResponseValue;
17815         }
17816         // MUST_USE_RES struct LDKCOption_u64Z RawInvoice_amount_pico_btc(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17817         export function RawInvoice_amount_pico_btc(this_arg: number): number {
17818                 if(!isWasmInitialized) {
17819                         throw new Error("initializeWasm() must be awaited first!");
17820                 }
17821                 const nativeResponseValue = wasm.RawInvoice_amount_pico_btc(this_arg);
17822                 return nativeResponseValue;
17823         }
17824         // MUST_USE_RES enum LDKCurrency RawInvoice_currency(const struct LDKRawInvoice *NONNULL_PTR this_arg);
17825         export function RawInvoice_currency(this_arg: number): Currency {
17826                 if(!isWasmInitialized) {
17827                         throw new Error("initializeWasm() must be awaited first!");
17828                 }
17829                 const nativeResponseValue = wasm.RawInvoice_currency(this_arg);
17830                 return nativeResponseValue;
17831         }
17832         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_unix_timestamp(uint64_t unix_seconds);
17833         export function PositiveTimestamp_from_unix_timestamp(unix_seconds: number): number {
17834                 if(!isWasmInitialized) {
17835                         throw new Error("initializeWasm() must be awaited first!");
17836                 }
17837                 const nativeResponseValue = wasm.PositiveTimestamp_from_unix_timestamp(unix_seconds);
17838                 return nativeResponseValue;
17839         }
17840         // MUST_USE_RES struct LDKCResult_PositiveTimestampCreationErrorZ PositiveTimestamp_from_system_time(uint64_t time);
17841         export function PositiveTimestamp_from_system_time(time: number): number {
17842                 if(!isWasmInitialized) {
17843                         throw new Error("initializeWasm() must be awaited first!");
17844                 }
17845                 const nativeResponseValue = wasm.PositiveTimestamp_from_system_time(time);
17846                 return nativeResponseValue;
17847         }
17848         // MUST_USE_RES uint64_t PositiveTimestamp_as_unix_timestamp(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
17849         export function PositiveTimestamp_as_unix_timestamp(this_arg: number): number {
17850                 if(!isWasmInitialized) {
17851                         throw new Error("initializeWasm() must be awaited first!");
17852                 }
17853                 const nativeResponseValue = wasm.PositiveTimestamp_as_unix_timestamp(this_arg);
17854                 return nativeResponseValue;
17855         }
17856         // MUST_USE_RES uint64_t PositiveTimestamp_as_time(const struct LDKPositiveTimestamp *NONNULL_PTR this_arg);
17857         export function PositiveTimestamp_as_time(this_arg: number): number {
17858                 if(!isWasmInitialized) {
17859                         throw new Error("initializeWasm() must be awaited first!");
17860                 }
17861                 const nativeResponseValue = wasm.PositiveTimestamp_as_time(this_arg);
17862                 return nativeResponseValue;
17863         }
17864         // MUST_USE_RES struct LDKSignedRawInvoice Invoice_into_signed_raw(struct LDKInvoice this_arg);
17865         export function Invoice_into_signed_raw(this_arg: number): number {
17866                 if(!isWasmInitialized) {
17867                         throw new Error("initializeWasm() must be awaited first!");
17868                 }
17869                 const nativeResponseValue = wasm.Invoice_into_signed_raw(this_arg);
17870                 return nativeResponseValue;
17871         }
17872         // MUST_USE_RES struct LDKCResult_NoneSemanticErrorZ Invoice_check_signature(const struct LDKInvoice *NONNULL_PTR this_arg);
17873         export function Invoice_check_signature(this_arg: number): number {
17874                 if(!isWasmInitialized) {
17875                         throw new Error("initializeWasm() must be awaited first!");
17876                 }
17877                 const nativeResponseValue = wasm.Invoice_check_signature(this_arg);
17878                 return nativeResponseValue;
17879         }
17880         // MUST_USE_RES struct LDKCResult_InvoiceSemanticErrorZ Invoice_from_signed(struct LDKSignedRawInvoice signed_invoice);
17881         export function Invoice_from_signed(signed_invoice: number): number {
17882                 if(!isWasmInitialized) {
17883                         throw new Error("initializeWasm() must be awaited first!");
17884                 }
17885                 const nativeResponseValue = wasm.Invoice_from_signed(signed_invoice);
17886                 return nativeResponseValue;
17887         }
17888         // MUST_USE_RES uint64_t Invoice_timestamp(const struct LDKInvoice *NONNULL_PTR this_arg);
17889         export function Invoice_timestamp(this_arg: number): number {
17890                 if(!isWasmInitialized) {
17891                         throw new Error("initializeWasm() must be awaited first!");
17892                 }
17893                 const nativeResponseValue = wasm.Invoice_timestamp(this_arg);
17894                 return nativeResponseValue;
17895         }
17896         // MUST_USE_RES const uint8_t (*Invoice_payment_hash(const struct LDKInvoice *NONNULL_PTR this_arg))[32];
17897         export function Invoice_payment_hash(this_arg: number): Uint8Array {
17898                 if(!isWasmInitialized) {
17899                         throw new Error("initializeWasm() must be awaited first!");
17900                 }
17901                 const nativeResponseValue = wasm.Invoice_payment_hash(this_arg);
17902                 return decodeArray(nativeResponseValue);
17903         }
17904         // MUST_USE_RES struct LDKPublicKey Invoice_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
17905         export function Invoice_payee_pub_key(this_arg: number): Uint8Array {
17906                 if(!isWasmInitialized) {
17907                         throw new Error("initializeWasm() must be awaited first!");
17908                 }
17909                 const nativeResponseValue = wasm.Invoice_payee_pub_key(this_arg);
17910                 return decodeArray(nativeResponseValue);
17911         }
17912         // MUST_USE_RES struct LDKThirtyTwoBytes Invoice_payment_secret(const struct LDKInvoice *NONNULL_PTR this_arg);
17913         export function Invoice_payment_secret(this_arg: number): Uint8Array {
17914                 if(!isWasmInitialized) {
17915                         throw new Error("initializeWasm() must be awaited first!");
17916                 }
17917                 const nativeResponseValue = wasm.Invoice_payment_secret(this_arg);
17918                 return decodeArray(nativeResponseValue);
17919         }
17920         // MUST_USE_RES struct LDKInvoiceFeatures Invoice_features(const struct LDKInvoice *NONNULL_PTR this_arg);
17921         export function Invoice_features(this_arg: number): number {
17922                 if(!isWasmInitialized) {
17923                         throw new Error("initializeWasm() must be awaited first!");
17924                 }
17925                 const nativeResponseValue = wasm.Invoice_features(this_arg);
17926                 return nativeResponseValue;
17927         }
17928         // MUST_USE_RES struct LDKPublicKey Invoice_recover_payee_pub_key(const struct LDKInvoice *NONNULL_PTR this_arg);
17929         export function Invoice_recover_payee_pub_key(this_arg: number): Uint8Array {
17930                 if(!isWasmInitialized) {
17931                         throw new Error("initializeWasm() must be awaited first!");
17932                 }
17933                 const nativeResponseValue = wasm.Invoice_recover_payee_pub_key(this_arg);
17934                 return decodeArray(nativeResponseValue);
17935         }
17936         // MUST_USE_RES uint64_t Invoice_expiry_time(const struct LDKInvoice *NONNULL_PTR this_arg);
17937         export function Invoice_expiry_time(this_arg: number): number {
17938                 if(!isWasmInitialized) {
17939                         throw new Error("initializeWasm() must be awaited first!");
17940                 }
17941                 const nativeResponseValue = wasm.Invoice_expiry_time(this_arg);
17942                 return nativeResponseValue;
17943         }
17944         // MUST_USE_RES uint64_t Invoice_min_final_cltv_expiry(const struct LDKInvoice *NONNULL_PTR this_arg);
17945         export function Invoice_min_final_cltv_expiry(this_arg: number): number {
17946                 if(!isWasmInitialized) {
17947                         throw new Error("initializeWasm() must be awaited first!");
17948                 }
17949                 const nativeResponseValue = wasm.Invoice_min_final_cltv_expiry(this_arg);
17950                 return nativeResponseValue;
17951         }
17952         // MUST_USE_RES struct LDKCVec_PrivateRouteZ Invoice_private_routes(const struct LDKInvoice *NONNULL_PTR this_arg);
17953         export function Invoice_private_routes(this_arg: number): number[] {
17954                 if(!isWasmInitialized) {
17955                         throw new Error("initializeWasm() must be awaited first!");
17956                 }
17957                 const nativeResponseValue = wasm.Invoice_private_routes(this_arg);
17958                 return nativeResponseValue;
17959         }
17960         // MUST_USE_RES struct LDKCVec_RouteHintZ Invoice_route_hints(const struct LDKInvoice *NONNULL_PTR this_arg);
17961         export function Invoice_route_hints(this_arg: number): number[] {
17962                 if(!isWasmInitialized) {
17963                         throw new Error("initializeWasm() must be awaited first!");
17964                 }
17965                 const nativeResponseValue = wasm.Invoice_route_hints(this_arg);
17966                 return nativeResponseValue;
17967         }
17968         // MUST_USE_RES enum LDKCurrency Invoice_currency(const struct LDKInvoice *NONNULL_PTR this_arg);
17969         export function Invoice_currency(this_arg: number): Currency {
17970                 if(!isWasmInitialized) {
17971                         throw new Error("initializeWasm() must be awaited first!");
17972                 }
17973                 const nativeResponseValue = wasm.Invoice_currency(this_arg);
17974                 return nativeResponseValue;
17975         }
17976         // MUST_USE_RES struct LDKCOption_u64Z Invoice_amount_pico_btc(const struct LDKInvoice *NONNULL_PTR this_arg);
17977         export function Invoice_amount_pico_btc(this_arg: number): number {
17978                 if(!isWasmInitialized) {
17979                         throw new Error("initializeWasm() must be awaited first!");
17980                 }
17981                 const nativeResponseValue = wasm.Invoice_amount_pico_btc(this_arg);
17982                 return nativeResponseValue;
17983         }
17984         // MUST_USE_RES struct LDKCResult_DescriptionCreationErrorZ Description_new(struct LDKStr description);
17985         export function Description_new(description: String): number {
17986                 if(!isWasmInitialized) {
17987                         throw new Error("initializeWasm() must be awaited first!");
17988                 }
17989                 const nativeResponseValue = wasm.Description_new(description);
17990                 return nativeResponseValue;
17991         }
17992         // MUST_USE_RES struct LDKStr Description_into_inner(struct LDKDescription this_arg);
17993         export function Description_into_inner(this_arg: number): String {
17994                 if(!isWasmInitialized) {
17995                         throw new Error("initializeWasm() must be awaited first!");
17996                 }
17997                 const nativeResponseValue = wasm.Description_into_inner(this_arg);
17998                 return nativeResponseValue;
17999         }
18000         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_seconds(uint64_t seconds);
18001         export function ExpiryTime_from_seconds(seconds: number): number {
18002                 if(!isWasmInitialized) {
18003                         throw new Error("initializeWasm() must be awaited first!");
18004                 }
18005                 const nativeResponseValue = wasm.ExpiryTime_from_seconds(seconds);
18006                 return nativeResponseValue;
18007         }
18008         // MUST_USE_RES struct LDKCResult_ExpiryTimeCreationErrorZ ExpiryTime_from_duration(uint64_t duration);
18009         export function ExpiryTime_from_duration(duration: number): number {
18010                 if(!isWasmInitialized) {
18011                         throw new Error("initializeWasm() must be awaited first!");
18012                 }
18013                 const nativeResponseValue = wasm.ExpiryTime_from_duration(duration);
18014                 return nativeResponseValue;
18015         }
18016         // MUST_USE_RES uint64_t ExpiryTime_as_seconds(const struct LDKExpiryTime *NONNULL_PTR this_arg);
18017         export function ExpiryTime_as_seconds(this_arg: number): number {
18018                 if(!isWasmInitialized) {
18019                         throw new Error("initializeWasm() must be awaited first!");
18020                 }
18021                 const nativeResponseValue = wasm.ExpiryTime_as_seconds(this_arg);
18022                 return nativeResponseValue;
18023         }
18024         // MUST_USE_RES uint64_t ExpiryTime_as_duration(const struct LDKExpiryTime *NONNULL_PTR this_arg);
18025         export function ExpiryTime_as_duration(this_arg: number): number {
18026                 if(!isWasmInitialized) {
18027                         throw new Error("initializeWasm() must be awaited first!");
18028                 }
18029                 const nativeResponseValue = wasm.ExpiryTime_as_duration(this_arg);
18030                 return nativeResponseValue;
18031         }
18032         // MUST_USE_RES struct LDKCResult_PrivateRouteCreationErrorZ PrivateRoute_new(struct LDKRouteHint hops);
18033         export function PrivateRoute_new(hops: number): number {
18034                 if(!isWasmInitialized) {
18035                         throw new Error("initializeWasm() must be awaited first!");
18036                 }
18037                 const nativeResponseValue = wasm.PrivateRoute_new(hops);
18038                 return nativeResponseValue;
18039         }
18040         // MUST_USE_RES struct LDKRouteHint PrivateRoute_into_inner(struct LDKPrivateRoute this_arg);
18041         export function PrivateRoute_into_inner(this_arg: number): number {
18042                 if(!isWasmInitialized) {
18043                         throw new Error("initializeWasm() must be awaited first!");
18044                 }
18045                 const nativeResponseValue = wasm.PrivateRoute_into_inner(this_arg);
18046                 return nativeResponseValue;
18047         }
18048         // enum LDKCreationError CreationError_clone(const enum LDKCreationError *NONNULL_PTR orig);
18049         export function CreationError_clone(orig: number): CreationError {
18050                 if(!isWasmInitialized) {
18051                         throw new Error("initializeWasm() must be awaited first!");
18052                 }
18053                 const nativeResponseValue = wasm.CreationError_clone(orig);
18054                 return nativeResponseValue;
18055         }
18056         // enum LDKCreationError CreationError_description_too_long(void);
18057         export function CreationError_description_too_long(): CreationError {
18058                 if(!isWasmInitialized) {
18059                         throw new Error("initializeWasm() must be awaited first!");
18060                 }
18061                 const nativeResponseValue = wasm.CreationError_description_too_long();
18062                 return nativeResponseValue;
18063         }
18064         // enum LDKCreationError CreationError_route_too_long(void);
18065         export function CreationError_route_too_long(): CreationError {
18066                 if(!isWasmInitialized) {
18067                         throw new Error("initializeWasm() must be awaited first!");
18068                 }
18069                 const nativeResponseValue = wasm.CreationError_route_too_long();
18070                 return nativeResponseValue;
18071         }
18072         // enum LDKCreationError CreationError_timestamp_out_of_bounds(void);
18073         export function CreationError_timestamp_out_of_bounds(): CreationError {
18074                 if(!isWasmInitialized) {
18075                         throw new Error("initializeWasm() must be awaited first!");
18076                 }
18077                 const nativeResponseValue = wasm.CreationError_timestamp_out_of_bounds();
18078                 return nativeResponseValue;
18079         }
18080         // enum LDKCreationError CreationError_expiry_time_out_of_bounds(void);
18081         export function CreationError_expiry_time_out_of_bounds(): CreationError {
18082                 if(!isWasmInitialized) {
18083                         throw new Error("initializeWasm() must be awaited first!");
18084                 }
18085                 const nativeResponseValue = wasm.CreationError_expiry_time_out_of_bounds();
18086                 return nativeResponseValue;
18087         }
18088         // bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b);
18089         export function CreationError_eq(a: number, b: number): boolean {
18090                 if(!isWasmInitialized) {
18091                         throw new Error("initializeWasm() must be awaited first!");
18092                 }
18093                 const nativeResponseValue = wasm.CreationError_eq(a, b);
18094                 return nativeResponseValue;
18095         }
18096         // struct LDKStr CreationError_to_str(const enum LDKCreationError *NONNULL_PTR o);
18097         export function CreationError_to_str(o: number): String {
18098                 if(!isWasmInitialized) {
18099                         throw new Error("initializeWasm() must be awaited first!");
18100                 }
18101                 const nativeResponseValue = wasm.CreationError_to_str(o);
18102                 return nativeResponseValue;
18103         }
18104         // enum LDKSemanticError SemanticError_clone(const enum LDKSemanticError *NONNULL_PTR orig);
18105         export function SemanticError_clone(orig: number): SemanticError {
18106                 if(!isWasmInitialized) {
18107                         throw new Error("initializeWasm() must be awaited first!");
18108                 }
18109                 const nativeResponseValue = wasm.SemanticError_clone(orig);
18110                 return nativeResponseValue;
18111         }
18112         // enum LDKSemanticError SemanticError_no_payment_hash(void);
18113         export function SemanticError_no_payment_hash(): SemanticError {
18114                 if(!isWasmInitialized) {
18115                         throw new Error("initializeWasm() must be awaited first!");
18116                 }
18117                 const nativeResponseValue = wasm.SemanticError_no_payment_hash();
18118                 return nativeResponseValue;
18119         }
18120         // enum LDKSemanticError SemanticError_multiple_payment_hashes(void);
18121         export function SemanticError_multiple_payment_hashes(): SemanticError {
18122                 if(!isWasmInitialized) {
18123                         throw new Error("initializeWasm() must be awaited first!");
18124                 }
18125                 const nativeResponseValue = wasm.SemanticError_multiple_payment_hashes();
18126                 return nativeResponseValue;
18127         }
18128         // enum LDKSemanticError SemanticError_no_description(void);
18129         export function SemanticError_no_description(): SemanticError {
18130                 if(!isWasmInitialized) {
18131                         throw new Error("initializeWasm() must be awaited first!");
18132                 }
18133                 const nativeResponseValue = wasm.SemanticError_no_description();
18134                 return nativeResponseValue;
18135         }
18136         // enum LDKSemanticError SemanticError_multiple_descriptions(void);
18137         export function SemanticError_multiple_descriptions(): SemanticError {
18138                 if(!isWasmInitialized) {
18139                         throw new Error("initializeWasm() must be awaited first!");
18140                 }
18141                 const nativeResponseValue = wasm.SemanticError_multiple_descriptions();
18142                 return nativeResponseValue;
18143         }
18144         // enum LDKSemanticError SemanticError_no_payment_secret(void);
18145         export function SemanticError_no_payment_secret(): SemanticError {
18146                 if(!isWasmInitialized) {
18147                         throw new Error("initializeWasm() must be awaited first!");
18148                 }
18149                 const nativeResponseValue = wasm.SemanticError_no_payment_secret();
18150                 return nativeResponseValue;
18151         }
18152         // enum LDKSemanticError SemanticError_multiple_payment_secrets(void);
18153         export function SemanticError_multiple_payment_secrets(): SemanticError {
18154                 if(!isWasmInitialized) {
18155                         throw new Error("initializeWasm() must be awaited first!");
18156                 }
18157                 const nativeResponseValue = wasm.SemanticError_multiple_payment_secrets();
18158                 return nativeResponseValue;
18159         }
18160         // enum LDKSemanticError SemanticError_invalid_features(void);
18161         export function SemanticError_invalid_features(): SemanticError {
18162                 if(!isWasmInitialized) {
18163                         throw new Error("initializeWasm() must be awaited first!");
18164                 }
18165                 const nativeResponseValue = wasm.SemanticError_invalid_features();
18166                 return nativeResponseValue;
18167         }
18168         // enum LDKSemanticError SemanticError_invalid_recovery_id(void);
18169         export function SemanticError_invalid_recovery_id(): SemanticError {
18170                 if(!isWasmInitialized) {
18171                         throw new Error("initializeWasm() must be awaited first!");
18172                 }
18173                 const nativeResponseValue = wasm.SemanticError_invalid_recovery_id();
18174                 return nativeResponseValue;
18175         }
18176         // enum LDKSemanticError SemanticError_invalid_signature(void);
18177         export function SemanticError_invalid_signature(): SemanticError {
18178                 if(!isWasmInitialized) {
18179                         throw new Error("initializeWasm() must be awaited first!");
18180                 }
18181                 const nativeResponseValue = wasm.SemanticError_invalid_signature();
18182                 return nativeResponseValue;
18183         }
18184         // enum LDKSemanticError SemanticError_imprecise_amount(void);
18185         export function SemanticError_imprecise_amount(): SemanticError {
18186                 if(!isWasmInitialized) {
18187                         throw new Error("initializeWasm() must be awaited first!");
18188                 }
18189                 const nativeResponseValue = wasm.SemanticError_imprecise_amount();
18190                 return nativeResponseValue;
18191         }
18192         // bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b);
18193         export function SemanticError_eq(a: number, b: number): boolean {
18194                 if(!isWasmInitialized) {
18195                         throw new Error("initializeWasm() must be awaited first!");
18196                 }
18197                 const nativeResponseValue = wasm.SemanticError_eq(a, b);
18198                 return nativeResponseValue;
18199         }
18200         // struct LDKStr SemanticError_to_str(const enum LDKSemanticError *NONNULL_PTR o);
18201         export function SemanticError_to_str(o: number): String {
18202                 if(!isWasmInitialized) {
18203                         throw new Error("initializeWasm() must be awaited first!");
18204                 }
18205                 const nativeResponseValue = wasm.SemanticError_to_str(o);
18206                 return nativeResponseValue;
18207         }
18208         // void SignOrCreationError_free(struct LDKSignOrCreationError this_ptr);
18209         export function SignOrCreationError_free(this_ptr: number): void {
18210                 if(!isWasmInitialized) {
18211                         throw new Error("initializeWasm() must be awaited first!");
18212                 }
18213                 const nativeResponseValue = wasm.SignOrCreationError_free(this_ptr);
18214                 // debug statements here
18215         }
18216         // struct LDKSignOrCreationError SignOrCreationError_clone(const struct LDKSignOrCreationError *NONNULL_PTR orig);
18217         export function SignOrCreationError_clone(orig: number): number {
18218                 if(!isWasmInitialized) {
18219                         throw new Error("initializeWasm() must be awaited first!");
18220                 }
18221                 const nativeResponseValue = wasm.SignOrCreationError_clone(orig);
18222                 return nativeResponseValue;
18223         }
18224         // struct LDKSignOrCreationError SignOrCreationError_sign_error(void);
18225         export function SignOrCreationError_sign_error(): number {
18226                 if(!isWasmInitialized) {
18227                         throw new Error("initializeWasm() must be awaited first!");
18228                 }
18229                 const nativeResponseValue = wasm.SignOrCreationError_sign_error();
18230                 return nativeResponseValue;
18231         }
18232         // struct LDKSignOrCreationError SignOrCreationError_creation_error(enum LDKCreationError a);
18233         export function SignOrCreationError_creation_error(a: CreationError): number {
18234                 if(!isWasmInitialized) {
18235                         throw new Error("initializeWasm() must be awaited first!");
18236                 }
18237                 const nativeResponseValue = wasm.SignOrCreationError_creation_error(a);
18238                 return nativeResponseValue;
18239         }
18240         // bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b);
18241         export function SignOrCreationError_eq(a: number, b: number): boolean {
18242                 if(!isWasmInitialized) {
18243                         throw new Error("initializeWasm() must be awaited first!");
18244                 }
18245                 const nativeResponseValue = wasm.SignOrCreationError_eq(a, b);
18246                 return nativeResponseValue;
18247         }
18248         // struct LDKStr SignOrCreationError_to_str(const struct LDKSignOrCreationError *NONNULL_PTR o);
18249         export function SignOrCreationError_to_str(o: number): String {
18250                 if(!isWasmInitialized) {
18251                         throw new Error("initializeWasm() must be awaited first!");
18252                 }
18253                 const nativeResponseValue = wasm.SignOrCreationError_to_str(o);
18254                 return nativeResponseValue;
18255         }
18256         // 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);
18257         export function create_invoice_from_channelmanager(channelmanager: number, keys_manager: number, network: Currency, amt_msat: number, description: String): number {
18258                 if(!isWasmInitialized) {
18259                         throw new Error("initializeWasm() must be awaited first!");
18260                 }
18261                 const nativeResponseValue = wasm.create_invoice_from_channelmanager(channelmanager, keys_manager, network, amt_msat, description);
18262                 return nativeResponseValue;
18263         }
18264         // struct LDKCResult_SiPrefixNoneZ SiPrefix_from_str(struct LDKStr s);
18265         export function SiPrefix_from_str(s: String): number {
18266                 if(!isWasmInitialized) {
18267                         throw new Error("initializeWasm() must be awaited first!");
18268                 }
18269                 const nativeResponseValue = wasm.SiPrefix_from_str(s);
18270                 return nativeResponseValue;
18271         }
18272         // struct LDKCResult_InvoiceNoneZ Invoice_from_str(struct LDKStr s);
18273         export function Invoice_from_str(s: String): number {
18274                 if(!isWasmInitialized) {
18275                         throw new Error("initializeWasm() must be awaited first!");
18276                 }
18277                 const nativeResponseValue = wasm.Invoice_from_str(s);
18278                 return nativeResponseValue;
18279         }
18280         // struct LDKCResult_SignedRawInvoiceNoneZ SignedRawInvoice_from_str(struct LDKStr s);
18281         export function SignedRawInvoice_from_str(s: String): number {
18282                 if(!isWasmInitialized) {
18283                         throw new Error("initializeWasm() must be awaited first!");
18284                 }
18285                 const nativeResponseValue = wasm.SignedRawInvoice_from_str(s);
18286                 return nativeResponseValue;
18287         }
18288         // struct LDKStr Invoice_to_str(const struct LDKInvoice *NONNULL_PTR o);
18289         export function Invoice_to_str(o: number): String {
18290                 if(!isWasmInitialized) {
18291                         throw new Error("initializeWasm() must be awaited first!");
18292                 }
18293                 const nativeResponseValue = wasm.Invoice_to_str(o);
18294                 return nativeResponseValue;
18295         }
18296         // struct LDKStr SignedRawInvoice_to_str(const struct LDKSignedRawInvoice *NONNULL_PTR o);
18297         export function SignedRawInvoice_to_str(o: number): String {
18298                 if(!isWasmInitialized) {
18299                         throw new Error("initializeWasm() must be awaited first!");
18300                 }
18301                 const nativeResponseValue = wasm.SignedRawInvoice_to_str(o);
18302                 return nativeResponseValue;
18303         }
18304         // struct LDKStr Currency_to_str(const enum LDKCurrency *NONNULL_PTR o);
18305         export function Currency_to_str(o: number): String {
18306                 if(!isWasmInitialized) {
18307                         throw new Error("initializeWasm() must be awaited first!");
18308                 }
18309                 const nativeResponseValue = wasm.Currency_to_str(o);
18310                 return nativeResponseValue;
18311         }
18312         // struct LDKStr SiPrefix_to_str(const enum LDKSiPrefix *NONNULL_PTR o);
18313         export function SiPrefix_to_str(o: number): String {
18314                 if(!isWasmInitialized) {
18315                         throw new Error("initializeWasm() must be awaited first!");
18316                 }
18317                 const nativeResponseValue = wasm.SiPrefix_to_str(o);
18318                 return nativeResponseValue;
18319         }
18320
18321         export async function initializeWasm(allowDoubleInitialization: boolean = false): Promise<void> {
18322             if(isWasmInitialized && !allowDoubleInitialization) {
18323                 return;
18324             }
18325             const wasmInstance = await WebAssembly.instantiate(wasmModule, imports)
18326             wasm = wasmInstance.exports;
18327             isWasmInitialized = true;
18328         }
18329